Skip to content

loom any lifo race for PR 8069#8071

Draft
kushudai wants to merge 1 commit intotokio-rs:eliza/should-notify-againfrom
kushudai:kudai/loom-any-lifo-race
Draft

loom any lifo race for PR 8069#8071
kushudai wants to merge 1 commit intotokio-rs:eliza/should-notify-againfrom
kushudai:kudai/loom-any-lifo-race

Conversation

@kushudai
Copy link
Copy Markdown

@kushudai kushudai commented Apr 19, 2026

Suspected race allowed by the memory model.
Built on top of #8069
Does not model LIFO_EXCLUSIVITY_TIMEOUT
Ran with

RUSTFLAGS="--cfg loom -C debug-assertions" \
  cargo test --release --lib --features full \
  runtime::tests::loom_multi_thread::lifo_bit_race

Output shows a race is possible in a particular interleaving that leaves a task undiscoverable

running 3 tests
test runtime::tests::loom_multi_thread::lifo_bit_race::lifo_bit_race_pre_set ... FAILED
test runtime::tests::loom_multi_thread::lifo_bit_race::control_no_preset_is_safe ... ok
test runtime::tests::loom_multi_thread::lifo_bit_race::control_always_notify_is_safe ... ok

@github-actions github-actions Bot added the R-loom-multi-thread Run loom multi-thread tests on this PR label Apr 19, 2026
@kushudai kushudai force-pushed the kudai/loom-any-lifo-race branch from c1e4ad0 to 1878b18 Compare April 19, 2026 00:15
Adds a loom test that reproduces a stranded-task race in the `any_lifo`
global-bit + bounded-timeout-park protocol introduced on top of tokio-rs#8069.
Also run rustfmt --edition 2021
@kushudai kushudai force-pushed the kudai/loom-any-lifo-race branch from 1878b18 to 1da06ec Compare April 19, 2026 00:20
@kushudai kushudai changed the base branch from master to eliza/should-notify-again April 19, 2026 05:12
@hawkw
Copy link
Copy Markdown
Member

hawkw commented Apr 19, 2026

Thanks for this, I appreciate the tests! Let me take a look at getting them integrated with the main PR and continue iterating on the design.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

R-loom-multi-thread Run loom multi-thread tests on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants