Open
Description
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.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
and test_interpreters
type_ready_set_new
:Line 8509 in 7b2e01b
type_ready
: (see Data race ontp_flags
with subinterpreters and static types #129817)- File descriptor race in
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
.- pegen
memo_statistics
mutex is currently only used in free threading build (seen in test_create_many_threaded) - version tags on static types:
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
- race on
NEXT_GLOBAL_VERSION_TAG
inassign_version_tag
(see above)
Linked PRs
Metadata
Metadata
Assignees
Projects
Status
Todo