Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.4k
gh-117657: Fix QSBR race condition#118843
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Merged
Uh oh!
There was an error while loading.Please reload this page.
Conversation
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
…exit}__` (python#118812)These methods are purely wrappers around `Semlock.{acquire,release}`,which expect a critical section to be held.
…ld (python#118723)The `list_preallocate_exact` function did not zero initialize arraycontents. In the free-threaded build, this could expose uninitializedmemory to concurrent readers between the call to`list_preallocate_exact` and the filling of the array contents withitems.
…t file (python#118808)Some embedders and extensions include parts of the internal API. Thepycore_mimalloc.h file is transitively include by a number of otherinternal headers. This avoids include errors for code that wasalready including those headers.
Avoid immortalizing objects in tests that verify garbage collection ofclasses or modules.This fixes test_ordered_dict and test_struct.
…ython#118722)Using `race:` filters out warnings if the function appears anywhere inthe stack trace. This can hide a lot of unrelated warnings, especiallyfor a function like `_PyEval_EvalFrameDefault`, which is somewhere onthe stack more often than not.Change all free-threaded suppressions to `race_top:`, which only matchesthe top frame, and add any new suppressions this exposes.
…ython#118854)Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
…NULL object (python#115433)" (python#118861)This reverts commitad4f909.The API ended up not being used.
colesbury approved these changesMay 10, 2024
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@SonicField for the PR, and@colesbury for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13. |
miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestMay 10, 2024
`_Py_qsbr_unregister` is called when the PyThreadState is alreadydetached, so the access to `tstate->qsbr` isn't safe without locking theshared mutex. Grab the `struct _qsbr_shared` from the interpreterinstead.(cherry picked from commit33d2019)Co-authored-by: Alex Turner <alexturner@meta.com>
GH-118905 is a backport of this pull request to the3.13 branch. |
colesbury pushed a commit that referenced this pull requestMay 10, 2024
`_Py_qsbr_unregister` is called when the PyThreadState is alreadydetached, so the access to `tstate->qsbr` isn't safe without locking theshared mutex. Grab the `struct _qsbr_shared` from the interpreterinstead.(cherry picked from commit33d2019)Co-authored-by: Alex Turner <alexturner@meta.com>
Closed
estyxx pushed a commit to estyxx/cpython that referenced this pull requestJul 17, 2024
`_Py_qsbr_unregister` is called when the PyThreadState is alreadydetached, so the access to `tstate->qsbr` isn't safe without locking theshared mutex. Grab the `struct _qsbr_shared` from the interpreterinstead.
Sign up for freeto 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.
Uh oh!
There was an error while loading.Please reload this page.
Fix TSAN issues in free threaded build: