You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When accept4 returns -1, eventcore doesn't check any errno value, and when it returns errno 24 (too many files), an infinite loop occurs.
A loop somewhere between epoll_wait and accept4 occurs when trying to connect to vibe.d webpage when worker then attempts lots of connections to other servers:
#0 0x00007f02e7476ff7 in accept4 (fd=21, addr=..., addr_len=0x7ffc4d279388, flags=526336) at ../sysdeps/unix/sysv/linux/accept4.c:40
#1 0x000056425a54e756 in _D9eventcore7drivers5posix7sockets__T23PosixEventDriverSocketsHTCQClQCeQBz5epoll14EpollEventLoopZQCi8onAcceptMFNbNfSQEk6driver__T6HandleVAyaa2_6664TmVmN1ZQzZ9__lambda2MFNbNiNeZv (this=0x7ffc4d279400) at ../../.dub/packages/eventcore-0.8.27/eventcore/source/eventcore/drivers/posix/sockets.d:244
#2 0x000056425a54e551 in _D9eventcore7drivers5posix7sockets__T23PosixEventDriverSocketsHTCQClQCeQBz5epoll14EpollEventLoopZQCi8onAcceptMFNbNfSQEk6driver__T6HandleVAyaa2_6664TmVmN1ZQzZv (this=0x7f02e966f000, listenfd=...) at ../../.dub/packages/eventcore-0.8.27/eventcore/source/eventcore/drivers/posix/sockets.d:244
#3 0x000056425a5605fa in _D9eventcore7drivers5posix6driver14PosixEventLoop__T6notifyVEQChQCaQBvQBs9EventTypei0ZQBiMFNbNfSQDqQCv__T6HandleVAyaa2_6664TmVmN1ZQzZv ( this=0x7f02e966d080, fd=...) at ../../.dub/packages/eventcore-0.8.27/eventcore/source/eventcore/drivers/posix/driver.d:230
#4 0x000056425a54c43a in eventcore.drivers.posix.epoll.EpollEventLoop.doProcessEvents(core.time.Duration) (this=0x7f02e966d080, timeout=...) at ../../.dub/packages/eventcore-0.8.27/eventcore/source/eventcore/drivers/posix/epoll.d:55
#5 0x000056425a54bf20 in _D9eventcore7drivers5posix6driver__T20PosixEventDriverCoreHTCQChQCaQBv5epoll14EpollEventLoopHTCQDpQDi5timer22LoopTimeoutTimerDriverHTCQFcQEvQEq6events__T22PosixEventDriverEventsHTQEpHTCQHbQGuQGp7sockets__T23PosixEventDriverSocketsHTQGqZQBfZQDjZQIa13processEventsMFNbNfS4core4time8DurationZEQLcQKh10ExitReason ( this=0x7f02e9670040, timeout=...) at ../../.dub/packages/eventcore-0.8.27/eventcore/source/eventcore/drivers/posix/driver.d:141
#6 0x000056425a525eeb in vibe.core.task.TaskScheduler.process() (this=...) at ../../.dub/packages/vibe-core-1.4.0-alpha.1/vibe-core/source/vibe/core/task.d:675
#7 0x000056425a525fcd in vibe.core.task.TaskScheduler.waitAndProcess() (this=...) at ../../.dub/packages/vibe-core-1.4.0-alpha.1/vibe-core/source/vibe/core/task.d:713
#8 0x000056425a50a76c in _D4vibe4coreQf12runEventLoopFNbNfZi () at ../../.dub/packages/vibe-core-1.4.0-alpha.1/vibe-core/source/vibe/core/core.d:218
#9 0x000056425a50a5f2 in _D4vibe4coreQf14runApplicationFNfPAAyaZi (args_out=0x0) at ../../.dub/packages/vibe-core-1.4.0-alpha.1/vibe-core/source/vibe/core/core.d:111
#10 0x000056425a289c44 in D main () at source/app.d:65
#0 0x00007f02e74760f3 in epoll_wait () at ../sysdeps/unix/syscall-template.S:84
#1 0x000056425a54c378 in eventcore.drivers.posix.epoll.EpollEventLoop.doProcessEvents(core.time.Duration) (this=0x7f02e966d080, timeout=...) at ../../.dub/packages/eventcore-0.8.27/eventcore/source/eventcore/drivers/posix/epoll.d:47
#2 0x000056425a54bf20 in _D9eventcore7drivers5posix6driver__T20PosixEventDriverCoreHTCQChQCaQBv5epoll14EpollEventLoopHTCQDpQDi5timer22LoopTimeoutTimerDriverHTCQFcQEvQEq6events__T22PosixEventDriverEventsHTQEpHTCQHbQGuQGp7sockets__T23PosixEventDriverSocketsHTQGqZQBfZQDjZQIa13processEventsMFNbNfS4core4time8DurationZEQLcQKh10ExitReason ( this=0x7f02e9670040, timeout=...) at ../../.dub/packages/eventcore-0.8.27/eventcore/source/eventcore/drivers/posix/driver.d:141
#3 0x000056425a525eeb in vibe.core.task.TaskScheduler.process() (this=...) at ../../.dub/packages/vibe-core-1.4.0-alpha.1/vibe-core/source/vibe/core/task.d:675
#4 0x000056425a525fcd in vibe.core.task.TaskScheduler.waitAndProcess() (this=...) at ../../.dub/packages/vibe-core-1.4.0-alpha.1/vibe-core/source/vibe/core/task.d:713
#5 0x000056425a50a76c in _D4vibe4coreQf12runEventLoopFNbNfZi () at ../../.dub/packages/vibe-core-1.4.0-alpha.1/vibe-core/source/vibe/core/core.d:218
#6 0x000056425a50a5f2 in _D4vibe4coreQf14runApplicationFNfPAAyaZi (args_out=0x0) at ../../.dub/packages/vibe-core-1.4.0-alpha.1/vibe-core/source/vibe/core/core.d:111
#7 0x000056425a289c44 in D main () at source/app.d:65
Worker thread function normally. Connections to webpage from client hang going from Established state to FIN wait 2. Single connection may exit loop after a long time (timeout seems random, connection can terminate on client side, but still left hanging on the server) and throw this on vibe.d server:
While at least one connection is hung, main thread always uses 100% CPU (about 55% usermode, 45% kernelmode).
Another symptom when I noticed when the server was malfunctioning is that vibe.d server couldn't serve static files (404 error):
[main(Oumu) dbg] Failed to open file public/css/dataTables.bootstrap.css: object.Exception@../../.dub/packages/vibe-core-1.4.0-alpha.1/vibe-core/source/vibe/core/file.d(41): Failed to open file 'public/css/dataTables.bootstrap.css'
The text was updated successfully, but these errors were encountered:
TETYYS
changed the title
Loop between epoll_wait and accept
Loop between epoll_wait and accept4
Feb 12, 2018
I think this not an infinite loop, it is a busy loop.
When accept/accept4 returns EMFILE or ENFILE, it does not discard the pending request and readable in epoll_wait.
Possibly solution in userland is sleep +10ms after seeing an EMFILE return code as Facebook says.
When accept4 returns -1, eventcore doesn't check any errno value, and when it returns errno 24 (too many files), an infinite loop occurs.
A loop somewhere between epoll_wait and accept4 occurs when trying to connect to vibe.d webpage when worker then attempts lots of connections to other servers:Worker thread function normally. Connections to webpage from client hang going from Established state to FIN wait 2. Single connection may exit loop after a long time (timeout seems random, connection can terminate on client side, but still left hanging on the server) and throw this on vibe.d server:While at least one connection is hung, main thread always uses 100% CPU (about 55% usermode, 45% kernelmode).Another symptom when I noticed when the server was malfunctioning is that vibe.d server couldn't serve static files (404 error):The text was updated successfully, but these errors were encountered: