Add futex wake-path store-buffering reproduction - #1228
Draft
Weiteng Chen (CvvT) wants to merge 1 commit into
Draft
Add futex wake-path store-buffering reproduction#1228Weiteng Chen (CvvT) wants to merge 1 commit into
Weiteng Chen (CvvT) wants to merge 1 commit into
Conversation
Reproduce the lost wakeup where FutexManager::wake's relaxed `done` store races the waiter's SeqCst `WAITING` store: on x86 TSO each side can read the other's stale value, so the waker's fetch_update observes RUNNING_IN_HOST and skips the wake while the waiter blocks and times out. Add a test-only `ordering_stress` rendezvous module, compiled under cfg(test) or the new `futex_ordering_stress` feature, that aligns the two conflicting stores and records whether each side saw the other's old value. - litebox: ignored probabilistic `stress_registered_waiter_does_not_miss_wake` over the mock platform, driving the real wake/fetch_update path. - litebox_platform_linux_userland: a real-platform liveness stress test plus a feature-gated tight reproduction exercising real FUTEX_WAIT/FUTEX_WAKE.
|
🤖 SemverChecks 🤖 No breaking API changes detected Note: this does not mean API is unchanged, or even that there are no breaking changes; simply, none of the detections triggered. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reproduce the lost wakeup where FutexManager::wake's relaxed
donestore races the waiter's SeqCstWAITINGstore: on x86 TSO each side can read the other's stale value, so the waker's fetch_update observes RUNNING_IN_HOST and skips the wake while the waiter blocks and times out.Add a test-only
ordering_stressrendezvous module, compiled under cfg(test) or the newfutex_ordering_stressfeature, that aligns the two conflicting stores and records whether each side saw the other's old value.Two unit tests added to trigger the bug: one using mock platform and the other one uses Linux platform. To run them:
See #820 for more details about this bug.