Repository navigation
Keep EIO completion notifications active - #299
pauljccode wants to merge 1 commit into
Conversation
Keep the async watcher active while libeio drains its queue. A worker can finish between stopping and restarting the watcher, and ev_async_start clears that pending notification. Retain the required done-poll callback as a no-op; bundled libeio invokes it unconditionally.
|
I also ran a source-pinned Linux acceptance comparison with identical queue/watcher diagnostics and no forced scheduling delay. The baseline finished with two failures; this correction passed all 51 examples. The baseline recorded notification clears across watcher restart and two stalls with completed work accumulating while callback counts stopped advancing. The corrected build recorded no clears. Source and installed-binary hashes were verified for both builds. The final notification transition in each stalled session was not directly sampled; the captured queue state supports the earlier controlled reproduction. |
|
Could someone restart and approve CI for this PR when they have a chance? The runs expired while awaiting approval. The separate fix in #298 has the same CI blocker. Happy to help with any additional testing. Thanks! |
|
Cosing and re-opening to trigger the CI again |
|
Cosing and re-opening to trigger the CI again |
|
@coderabbitai full review |
An I/O completion can be stranded when a worker notifies the event loop between
eio_done_pollstopping the async watcher andeio_async_cbrestarting it.ev_async_startclears the pending notification, leaving a completed request queued without an event-loop callback.Keep the watcher active while polling. Retain the required done-poll callback as a no-op because bundled libeio invokes it unconditionally.
Verification:
check-eio-notifications.pyandeio-notification-probe.cfrom the reproducer directory into the same directory. The runner requires Python 3, a C compiler, make and tar; it builds the bundled libeio 1.0.2 and libev 4.33.python3 check-eio-notifications.py /path/to/mettle baselineagainst master (4dd76ae), then repeat withcandidateagainst this branch. The probe extracts the actual callbacks and forces the worker to finish in the stop/start interval.The race reproducer passed on Linux, Intel macOS and Apple Silicon macOS. Mettle Verify passed all eight Ruby/platform jobs, each with 65 examples and zero failures.
Acceptance of this commit passed 51 Linux and 46 Intel macOS examples. Both jobs build this PR's commit and verify installed files against the retained packages. The deterministic probe above isolates the notification race.