Do not write to event ring after going out of stw participant set.#13529
Merged
sadiqj merged 1 commit intoocaml:trunkfrom Oct 5, 2024
Merged
Do not write to event ring after going out of stw participant set.#13529sadiqj merged 1 commit intoocaml:trunkfrom
sadiqj merged 1 commit intoocaml:trunkfrom
Conversation
This was referenced Oct 5, 2024
f7b1162 to
e3ce324
Compare
sadiqj
approved these changes
Oct 5, 2024
Contributor
sadiqj
left a comment
There was a problem hiding this comment.
Thanks for finding and fixing this @kayceesrk
One thing - could you add a comment to update_major_slice_work noting that it might be called outside of the stw set and that's also why we have a logging flag (in addition to the opportunistic spam)?
At the moment the only information that is the case is on the caller side.
e3ce324 to
570cf11
Compare
When the runtime events ring is destroyed, only the domains that are part of the stop-the-world (stw) participant list are stopped. So it is unsafe to write to ring when the domain is not part of the stw participant set. This fixes the data race in `lib-runtime-events/test_dropped_events`.
570cf11 to
dfabc40
Compare
Contributor
Author
|
Done in dfabc40. |
Contributor
|
Thanks @kayceesrk ! |
dra27
pushed a commit
that referenced
this pull request
Oct 14, 2024
When the runtime events ring is destroyed, only the domains that are part of the stop-the-world (stw) participant list are stopped. So it is unsafe to write to ring when the domain is not part of the stw participant set. This fixes the data race in `lib-runtime-events/test_dropped_events`. (cherry picked from commit 27c82c4)
Member
|
Cherry-picked to 5.3 in b190c7c, but I've not cherry-picked to 5.2 on the basis that the failures we saw on trunk were related to work added after 5.2.0 was released (unless you'd really like it in 5.2.1?) |
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.
When the runtime events ring is destroyed, only the domains that are part of the stop-the-world (stw) participant list are stopped. So it is unsafe to write to ring when the domain is not part of the stw participant set.
This fixes the data race in
lib-runtime-events/test_dropped_events. I was able to reliably trigger data race intest_dropped_eventson M2 macOS on trunk.With this PR, the data race is gone.