Bug report
Thread sanitizer reports a number of data races when running subinterpreter tests
InterpreterPoolMixin (test_concurrent_futures)
I think for now it would make sense to skip the InterpreterPoolMixin tests when running with TSAN.
test__interpchannels
test__interpreters and test_interpreters
test_capi.test_misc.assign_version_tag
Linked PRs
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_interruptwhen callingeval()concurrently in free-threading mode #128130posixmodule_execmodifies globalswaitid_result_descandstat_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_interpreterhappens outside of a lock)init_static_exctypes: modifies globals_PyExc_InterpreterError, etc._structmodule_exec: data race reported onptr->unpack = native->unpackI think for now it would make sense to skip the
InterpreterPoolMixintests when running with TSAN.test__interpchannelsfind_name_in_mroand_waiting_release: I don't understand this one, but it happens duringtest_send_recv_different_interpreters_and_threadstest__interpretersandtest_interpreterstype_ready_set_new:cpython/Objects/typeobject.c
Line 8509 in 7b2e01b
type_ready: (see Data race ontp_flagswith subinterpreters and static types #129817)test_api.LowLevelTests.test_is_runningandtest_running:close()concurrent withread()on the same file descriptor.managed_static_type_state_initintest.test_interpreters.test_stress.StressTests.test_create_many_threaded: data race on the non-atomic read ofinterp_count.memo_statisticsmutex 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_tagmodifications are not thread-safe (seen in test_create_many_threaded)test_capi.test_misc.assign_version_tagNEXT_GLOBAL_VERSION_TAGinassign_version_tag(see above)Linked PRs