Skip to content

Handle interrupted io_uring process waits - #215

Merged
samuel-williams-shopify merged 1 commit into
mainfrom
fix-process-wait-spurious-resume
Aug 26, 2026
Merged

samuel-williams-shopify merged 1 commit into
mainfrom
fix-process-wait-spurious-resume

Conversation

@samuel-williams-shopify

@samuel-williams-shopify samuel-williams-shopify commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • preserve the native selector contract of returning false when process_wait is resumed before process completion
  • safely cancel and drain io_uring waitid operations before stack-backed siginfo goes out of scope
  • return false when cancellation wins, or preserve the real process status when waitid wins the cancellation race
  • add shared coverage for interrupted native process waits

KQueue, EPoll, and legacy pidfd-based io_uring waits already return false on a normal interruption. This makes modern io_uring waitid consistent without imposing retry policy on io-event; higher-level schedulers such as Async can decide whether to retry.

Testing

  • BUNDLE_GEMFILE=gems.rb bundle exec bake build
  • BUNDLE_GEMFILE=gems.rb bundle exec bake test (292 passed, 17 skipped; 911 assertions)

@samuel-williams-shopify
samuel-williams-shopify force-pushed the fix-process-wait-spurious-resume branch from ed699e0 to 20b2e4e Compare August 26, 2026 08:40
@samuel-williams-shopify samuel-williams-shopify changed the title Ignore stale wake-ups in process waits Handle interrupted io_uring process waits Aug 26, 2026
@samuel-williams-shopify
samuel-williams-shopify merged commit d5a7b20 into main Aug 26, 2026
58 of 65 checks passed
@samuel-williams-shopify
samuel-williams-shopify deleted the fix-process-wait-spurious-resume branch August 26, 2026 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant