EPOLL on Linux can be a bit problematic when fork() is used (OSProcess forkSqueak). I wonder if there may also be some issues related to EPOLL on Linux pthreads? Totally guessing but Linux threads are built on top of its process model so it makes me wonder.

Here are some updates I've made in the last year related to EPOLL on Linux when fork() may be involved:

Author: David T Lewis dtlewis290@gmail.com
Date: Fri Jul 23 18:47:02 2021 -0400
Merge pull request #552 from OpenSmalltalk/dtl/epoll-forksqueak
For epoll aio, close and reopen the epoll fd in forked child process

commit 066a431
Author: David T. Lewis lewis@mail.msen.com
Date: Mon Feb 8 15:14:42 2021 -0500
For epoll aio, close and reopen the epoll fd in forked child process
Factor the epoll initiation out of aioInit into new epollInit function
and invoke it via pthread_atfork in the child process after a fork.
Prevents misdelivery of events from the common kernel epoll structures.

commit f376ffb
Author: David T. Lewis lewis@mail.msen.com
Date: Sun Feb 7 23:16:24 2021 -0500
Fix epoll event delivery error messages cut and paste error

commit b6616b2
Author: David T. Lewis lewis@mail.msen.com
Date: Sun Feb 7 12:12:42 2021 -0500
Handle epoll event delivery errors without VM segfault.
Under certain error conditions epoll may deliver event notification to the
wrong process, with empty event data provided by the kernel. If this happens,
handle the condition with a message to stderr and proceed without segfault.
Error messages will look like this:

  aioPoll in process 9055 no readHandler in epollEventData undefined handler called (fd 0, flags 2)

commit 7549807
Author: David T. Lewis lewis@mail.msen.com
Date: Sun Feb 7 12:09:51 2021 -0500
Rearrange forgetXDisplay to disable aio before fd close.
Required for epoll event handling, we should not close the descriptor
before unregistering it.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.Message ID: <OpenSmalltalk/opensmalltalk-vm/issues/615/1047282935@github.com>