-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
gh-136870: fix race in PyThreadState_Clear
on sys_tracing_threads
#136951
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-136870: fix race in PyThreadState_Clear
on sys_tracing_threads
#136951
Conversation
No news entry? This is fixing public APIs. |
I don't think news entries for data race fixes like this one are useful for user, we haven't been adding news for most of these changes unless it's a large change like fixing all races of a module. |
Thanks @kumaraditya303 for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14. |
…ng_threads` (pythonGH-136951) In free-threading, multiple threads can be cleared concurrently as such the modifications on `sys_tracing_threads` should be done while holding the profile lock, otherwise it can race with other threads setting up profiling. (cherry picked from commit f183996eb77fd2d5662c62667298c292c943ebf5) Co-authored-by: Kumar Aditya <kumaraditya@python.org>
GH-136953 is a backport of this pull request to the 3.14 branch. |
…ing_threads` (GH-136951) (#136953) gh-136870: fix data race in `PyThreadState_Clear` on `sys_tracing_threads` (GH-136951) In free-threading, multiple threads can be cleared concurrently as such the modifications on `sys_tracing_threads` should be done while holding the profile lock, otherwise it can race with other threads setting up profiling. (cherry picked from commit f183996) Co-authored-by: Kumar Aditya <kumaraditya@python.org>
In free-threading multiple threads can be cleared concurrently as such the modifications on
sys_tracing_threads
should be done while holding the profile lock otherwise it can race with other threads setting up profiling.