Skip to content

test(oneshot): race receiver completion against the sender wake - #363

Merged
tisonkun merged 2 commits into
apache:mainfrom
orthur2:test/oneshot-wake-reclaim-race
Oct 11, 2026
Merged

tisonkun merged 2 commits into
apache:mainfrom
orthur2:test/oneshot-wake-reclaim-race

Conversation

@orthur2

@orthur2 orthur2 commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Add a regression test for the oneshot reclamation race fixed in #361. It registers the receiver's waker first so that sending or dropping the sender always takes the waking path, then completes and drops the receiver while the sender may still be inside that path. A single race rarely lands in the window between the final state swap and the helper's return, so the test repeats it 128 times under Miri.

With asyncband/src/oneshot reverted to the code before #361, the existing oneshot_test passes all 16 seeds in 0..16 under the CI Miri setup, while this test fails at 6 of them, including seeds 0 and 1 that CI runs. With the fix it passes all 16 and adds about 6 seconds per seed under Miri.

@tisonkun tisonkun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@tisonkun
tisonkun marked this pull request as ready for review October 11, 2026 10:32
@tisonkun
tisonkun merged commit 0703e23 into apache:main Oct 11, 2026
9 checks passed
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.

2 participants