-
-
Notifications
You must be signed in to change notification settings - Fork 33.5k
Open
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-subinterpreterstype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
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_interruptwhen callingeval()concurrently in free-threading mode #128130posixmodule_execmodifies globalswaitid_result_descandstat_result_desc_PyBuiltins_AddExceptions: modifies globalsPyExc_EnvironmentError, etc.Lines 4354 to 4355 in 49bd47d
INIT_ALIAS(EnvironmentError, OSError); INIT_ALIAS(IOError, OSError); _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->unpack
I think for now it would make sense to skip the InterpreterPoolMixin tests when running with TSAN.
test__interpchannels
find_name_in_mroand_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->tp_flags |= Py_TPFLAGS_DISALLOW_INSTANTIATION; type_ready: (see Data race ontp_flagswith subinterpreters and static types #129817)- File descriptor race in
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.- pegen
memo_statisticsmutex 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_tagmodifications are not thread-safe (seen in test_create_many_threaded)
test_capi.test_misc.assign_version_tag
- race on
NEXT_GLOBAL_VERSION_TAGinassign_version_tag(see above)
Linked PRs
Metadata
Metadata
Assignees
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-subinterpreterstype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Projects
Status
Todo