-
-
Notifications
You must be signed in to change notification settings - Fork 30.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gh-117657: Fix some simple races in instrumentation.c #120118
Conversation
I think these should only be called in contexts in which no other thread is currently executing the bytecode -- I don't think we should need atomic stores. I'm a bit concerned that GCC TSan may report spurious warnings, so I've been sticking to clang-18 for local TSan runs to match the CI. |
There was a crash in the 3.13 buildbot in |
I get the same warnings about those 3 lines on TSAN as well with clang-18.
ISTM we only stop the world in the global events set by Here's an example race by TSAN:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Thanks @Fidget-Spinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13. |
…-120118) * stop the world when setting local events (cherry picked from commit b1b61dc) Co-authored-by: Ken Jin <[email protected]>
GH-120444 is a backport of this pull request to the 3.13 branch. |
Thanks @Fidget-Spinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13. |
…-120118) * stop the world when setting local events (cherry picked from commit b1b61dc) Co-authored-by: Ken Jin <[email protected]>
…-120118) * stop the world when setting local events
…-120118) * stop the world when setting local events
…-120118) * stop the world when setting local events
The other more egregious races are a little trickier.
Also not sure why this only turns up in gcc's tsan but seemingly not in clang's tsan.This turns up in clang-18 TSAN (see below).