ysbaddaden / execution_context

10 stars 2 forks source link

MT context may eventually stall #25

Open ysbaddaden opened 4 months ago

ysbaddaden commented 4 months ago

There is a reported issue where a MT:2 context (maybe even MT:1) will eventually stall.

A debugger session shows that the contexts have nothing to do: their local and global queues are empty; thread is blocked waiting on the event loop (system epoll_wait), as if nothing was transmitted anymore on the sockets, while there should be; the other thread usually parked itself.

So far I haven't been able to understand the issue, or reproduce it (outside of the original code). It feels like it is related to the event-loop, maybe IO::Evented and fibers being awakened on whatever thread? but possible scenarios for race conditions don't stand, and if MT:1 is also affected, then :face_with_diagonal_mouth:

ysbaddaden commented 1 month ago

It seems that #34 fixes the issue.