Repository navigation
Fix completion leak in epoll cancel path when removeFromPollQueue fails - #229
Conversation
When removeFromPollQueue fails after removing the completion from the linked list, the cancel function would return early without completing the target. This left the completion stuck in running state forever. Changes: - removeFromPollQueue now always cleans up poll_queue entry when the completion list is empty, even if epoll_ctl fails - cancel now always completes the target with error.Canceled Fixes #212
📝 WalkthroughWalkthroughThe epoll backend's cancellation flow is refactored to guarantee completion delivery. When removing entries from poll queues fails, the code now always delivers Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
.runningstate forever whenremoveFromPollQueuefailed during cancellationremoveFromPollQueuenow always cleans up thepoll_queueentry when the completion list is empty, even ifepoll_ctlfails (prevents stale entries)cancelnow always completes the target witherror.Canceledregardless of removal successTest plan
Fixes #212