-
-
Notifications
You must be signed in to change notification settings - Fork 31.3k
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
Various data races in subinterpreter tests under TSAN #129824
Labels
interpreter-core
(Objects, Python, Grammar, and Parser dirs)
topic-subinterpreters
type-bug
An unexpected behavior, bug, or error
Comments
colesbury
added a commit
to colesbury/cpython
that referenced
this issue
Feb 7, 2025
There are multiple data races reported when running the InterpreterPoolMixin tests, but it's still useful to run the other test_concurrent_futures tests under TSAN. Add test_concurrent_futures to the TSAN test suite.
InterpreterPoolMixin
tests under TSAN
colesbury
added a commit
to colesbury/cpython
that referenced
this issue
Feb 7, 2025
Also add test_interpreters to the list of TSAN tests. The test_running and test_is_running test cases are skipped for now as they have file descriptor races.
colesbury
added a commit
to colesbury/cpython
that referenced
this issue
Feb 10, 2025
There are multiple data races reported when running the InterpreterPoolMixin tests, but it's still useful to run the other test_concurrent_futures tests under TSAN.
colesbury
added a commit
to colesbury/cpython
that referenced
this issue
Feb 10, 2025
Also add test_interpreters to the list of TSAN tests. The test_running and test_is_running test cases are skipped for now as they have file descriptor races.
colesbury
added a commit
to colesbury/cpython
that referenced
this issue
Feb 13, 2025
There are multiple data races reported when running the InterpreterPoolMixin tests, but it's still useful to run the other test_concurrent_futures tests under TSAN.
colesbury
added a commit
to colesbury/cpython
that referenced
this issue
Feb 13, 2025
Also add test_interpreters to the list of TSAN tests. The test_running and test_is_running test cases are skipped for now as they have file descriptor races.
colesbury
added a commit
to colesbury/cpython
that referenced
this issue
Feb 19, 2025
colesbury
added a commit
that referenced
this issue
Feb 25, 2025
…-129826) There are multiple data races reported when running the InterpreterPoolMixin tests, but it's still useful to run the other test_concurrent_futures tests under TSAN. Add test_concurrent_futures to the TSAN test suite.
colesbury
added a commit
to colesbury/cpython
that referenced
this issue
Feb 27, 2025
Also add test_interpreters to the list of TSAN tests. The test_running and test_is_running test cases are skipped for now as they have file descriptor races.
colesbury
added a commit
to colesbury/cpython
that referenced
this issue
Feb 27, 2025
colesbury
added a commit
to colesbury/cpython
that referenced
this issue
Mar 3, 2025
Also add test_interpreters to the list of TSAN tests. The test_running and test_is_running test cases are skipped for now as they have file descriptor races.
colesbury
added a commit
to colesbury/cpython
that referenced
this issue
Mar 3, 2025
Are you still working on this? I'm happy to take a stab at some of these. |
No, I'm not actively working on them. Go for it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
interpreter-core
(Objects, Python, Grammar, and Parser dirs)
topic-subinterpreters
type-bug
An unexpected behavior, bug, or error
Bug report
Thread sanitizer reports a number of data races when running subinterpreter tests
InterpreterPoolMixin
(test_concurrent_futures
)run_eval_code_obj
: see Race on_PyRuntime.signals.unhandled_keyboard_interrupt
when callingeval()
concurrently in free-threading mode #128130posixmodule_exec
modifies globalswaitid_result_desc
andstat_result_desc
_PyBuiltins_AddExceptions
: modifies globalsPyExc_EnvironmentError
, etc.cpython/Objects/exceptions.c
Lines 4354 to 4355 in 49bd47d
_PyInterpreterState_FinalizeAllocatedBlocks
: modifies _PyRuntime variable _PyInterpreterState_FinalizeAllocatedBlocks_globals_fini
+clear_interpreter
: data race on_globals.module_count
(the read inclear_interpreter
happens outside of a lock)init_static_exctypes
: modifies globals_PyExc_InterpreterError
, etc._structmodule_exec
: data race reported onptr->unpack = native->unpack
I think for now it would make sense to skip the
InterpreterPoolMixin
tests when running with TSAN.test__interpchannels
find_name_in_mro
and_waiting_release
: I don't understand this one, but it happens duringtest_send_recv_different_interpreters_and_threads
test__interpreters
andtest_interpreters
type_ready_set_new
:cpython/Objects/typeobject.c
Line 8509 in 7b2e01b
type_ready
: (see Data race ontp_flags
with subinterpreters and static types #129817)test_api.LowLevelTests.test_is_running
andtest_running
:close()
concurrent withread()
on the same file descriptor.managed_static_type_state_init
intest.test_interpreters.test_stress.StressTests.test_create_many_threaded
: data race on the non-atomic read ofinterp_count
.memo_statistics
mutex is currently only used in free threading build (seen in test_create_many_threaded)NEXT_GLOBAL_VERSION_TAG
,type->tp_versions_used
, andtp->tp_version_tag
modifications are not thread-safe (seen in test_create_many_threaded)test_capi.test_misc.assign_version_tag
NEXT_GLOBAL_VERSION_TAG
inassign_version_tag
(see above)Linked PRs
The text was updated successfully, but these errors were encountered: