Uh oh!
There was an error while loading. Please reload this page.
gh-117657: TSAN fix race on gstate->young.count - #118313
Conversation
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
SonicField
commented
Apr 26, 2024
@DinoV@mpage@colesbury Here is my first go at a pull request. I cannot figure out how to add you are reviewers; I don't think I have permissions to do so or some such. |
colesbury
left a comment
There was a problem hiding this comment.
Thanks Alex - I left a few comments below
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
colesbury
left a comment
There was a problem hiding this comment.
There are two compiler warnings (see the "Files changed" tab) and the NEWS file can be removed.
SonicField
commented
Apr 26, 2024
Hopefullt fixed the compiler warnings (my bad). |
…on#118313)" This reverts commit 2ba1aed.
In gc_free_threading.c at line 1016 the gcstate->young.count is batch incremented via an atomic add. However, at 1162 the count is set to zero during garbage collection and that set is not atomic. This causes a race condition with the addition. Changing to an atomic set solves the race.