Skip to content
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: TSAN fix race on gstate->young.count #118313

Merged
merged 16 commits into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Continuing to whack-a-mole TSAN issues found in No-GIL tests.
SonicField marked this conversation as resolved.
Show resolved Hide resolved
3 changes: 2 additions & 1 deletion Python/gc_free_threading.c
Original file line number Diff line number Diff line change
Expand Up @@ -1159,7 +1159,8 @@ gc_collect_main(PyThreadState *tstate, int generation, _PyGC_Reason reason)
if (generation+1 < NUM_GENERATIONS) {
gcstate->old[generation].count += 1;
}
gcstate->young.count = 0;

_Py_atomic_store_int(&gcstate->young.count, 0);
colesbury marked this conversation as resolved.
Show resolved Hide resolved
for (i = 1; i <= generation; i++) {
gcstate->old[i-1].count = 0;
}
Expand Down
1 change: 0 additions & 1 deletion Tools/tsan/suppressions_free_threading.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ race:_PyObject_GC_TRACK
race:_PyParkingLot_Park
race:_PyType_HasFeature
race:assign_version_tag
race:gc_collect_main
race:gc_restore_tid
race:initialize_new_array
race:insertdict
Expand Down
Loading