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

data races in frame inspection and tracebacks #128421

Open
kumaraditya303 opened this issue Jan 2, 2025 · 2 comments
Open

data races in frame inspection and tracebacks #128421

kumaraditya303 opened this issue Jan 2, 2025 · 2 comments
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) topic-free-threading

Comments

@kumaraditya303
Copy link
Contributor

kumaraditya303 commented Jan 2, 2025

Run the tests with #128147 and tsan enabled:

env TSAN_OPTIONS=suppressions={$PWD}/Tools/tsan/suppressions_free_threading.txt ./python -m test test_asyncio -F 

TSAN Warnings:

WARNING: ThreadSanitizer: data race (pid=31163)
  Read of size 4 at 0x7fe5e3b00578 by thread T59:
    #0 _PyFrame_GetBytecode Include/internal/pycore_frame.h:98 (python+0x3a674a) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #1 PyUnstable_InterpreterFrame_GetLine Python/frame.c:147 (python+0x3a73ab) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #2 dump_frame Python/traceback.c:907 (python+0x42e25e) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #3 dump_traceback Python/traceback.c:988 (python+0x42e454) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #4 _Py_DumpTracebackThreads Python/traceback.c:1095 (python+0x42e64b) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #5 faulthandler_dump_traceback Modules/faulthandler.c:205 (python+0x44a509) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #6 faulthandler_fatal_error Modules/faulthandler.c:323 (python+0x44b5ca) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #7 CallUserSignalHandler ../../../../src/libsanitizer/tsan/tsan_interceptors_posix.cpp:2096 (libtsan.so.2+0x517d5) (BuildId: 38097064631f7912bd33117a9c83d08b42e15571)
    #8 _PyType_GetDict Objects/typeobject.c:408 (python+0x24519f) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #9 _PyType_IsReady Include/internal/pycore_typeobject.h:236 (python+0x1f9347) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #10 _PyObject_GetMethod Objects/object.c:1570 (python+0x1f9347)
    #11 PyObject_VectorcallMethod Objects/call.c:839 (python+0x16b980) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #12 PyObject_CallMethodNoArgs Include/cpython/abstract.h:65 (_asyncio.cpython-314td-x86_64-linux-gnu.so+0xba13) (BuildId: 0ce27d6138d5c42260be0fb214f10957647a4978)
    #13 add_one_task Modules/_asynciomodule.c:3717 (_asyncio.cpython-314td-x86_64-linux-gnu.so+0xba13)
    #14 _asyncio_all_tasks_impl Modules/_asynciomodule.c:3827 (_asyncio.cpython-314td-x86_64-linux-gnu.so+0x11117) (BuildId: 0ce27d6138d5c42260be0fb214f10957647a4978)
    #15 _asyncio_all_tasks Modules/clinic/_asynciomodule.c.h:2086 (_asyncio.cpython-314td-x86_64-linux-gnu.so+0x11315) (BuildId: 0ce27d6138d5c42260be0fb214f10957647a4978)
    #16 _PyEval_EvalFrameDefault Python/generated_cases.c.h:1527 (python+0x33d97b) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #17 _PyEval_EvalFrame Include/internal/pycore_ceval.h:116 (python+0x368276) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #18 _PyEval_Vector Python/ceval.c:1911 (python+0x3684fc) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #19 _PyFunction_Vectorcall Objects/call.c:413 (python+0x16a4a1) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #20 _PyObject_VectorcallTstate Include/internal/pycore_call.h:167 (python+0x16ec05) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #21 method_vectorcall Objects/classobject.c:71 (python+0x16ef25) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #22 _PyVectorcall_Call Objects/call.c:273 (python+0x16c8e1) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #23 _PyObject_Call Objects/call.c:348 (python+0x16cd2b) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #24 PyObject_Call Objects/call.c:373 (python+0x16cd8f) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #25 thread_run Modules/_threadmodule.c:346 (python+0x4d3322) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #26 pythread_wrapper Python/thread_pthread.h:242 (python+0x429f2a) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)

  Previous write of size 8 at 0x7fe5e3b00578 by thread T57:
    #0 _PyFrame_SetStackPointer Include/internal/pycore_frame.h:253 (python+0x32a38b) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #1 _PyEval_EvalFrameDefault Python/generated_cases.c.h:7058 (python+0x35fee5) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #2 _PyEval_EvalFrame Include/internal/pycore_ceval.h:116 (python+0x368276) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #3 _PyEval_Vector Python/ceval.c:1911 (python+0x3684fc) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #4 _PyFunction_Vectorcall Objects/call.c:413 (python+0x16a4a1) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #5 _PyObject_VectorcallTstate Include/internal/pycore_call.h:167 (python+0x421a37) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #6 sys_audit_tstate Python/sysmodule.c:283 (python+0x421dda) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #7 _PySys_Audit Python/sysmodule.c:324 (python+0x4270d2) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #8 _PyEval_SetAsyncGenFirstiter Python/ceval.c:2509 (python+0x331eb0) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #9 sys_set_asyncgen_hooks Python/sysmodule.c:1400 (python+0x4239b0) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #10 cfunction_call Objects/methodobject.c:551 (python+0x1ee9e6) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #11 _PyObject_Call Objects/call.c:361 (python+0x16cc68) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #12 PyObject_Call Objects/call.c:373 (python+0x16cd8f) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #13 _PyEval_EvalFrameDefault Python/generated_cases.c.h:1762 (python+0x33ec1f) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #14 _PyEval_EvalFrame Include/internal/pycore_ceval.h:116 (python+0x368276) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #15 _PyEval_Vector Python/ceval.c:1911 (python+0x3684fc) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #16 _PyFunction_Vectorcall Objects/call.c:413 (python+0x16a4a1) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #17 _PyObject_VectorcallTstate Include/internal/pycore_call.h:167 (python+0x16ec05) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #18 method_vectorcall Objects/classobject.c:71 (python+0x16ef25) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #19 _PyVectorcall_Call Objects/call.c:273 (python+0x16c8e1) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #20 _PyObject_Call Objects/call.c:348 (python+0x16cd2b) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #21 PyObject_Call Objects/call.c:373 (python+0x16cd8f) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #22 thread_run Modules/_threadmodule.c:346 (python+0x4d3322) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #23 pythread_wrapper Python/thread_pthread.h:242 (python+0x429f2a) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)

  Thread T59 'Thread-59 (runn' (tid=31269, running) created by main thread at:
    #0 pthread_create ../../../../src/libsanitizer/tsan/tsan_interceptors_posix.cpp:1022 (libtsan.so.2+0x5ac1a) (BuildId: 38097064631f7912bd33117a9c83d08b42e15571)
    #1 do_start_joinable_thread Python/thread_pthread.h:289 (python+0x42a37b) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #2 PyThread_start_joinable_thread Python/thread_pthread.h:313 (python+0x42a571) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #3 ThreadHandle_start Modules/_threadmodule.c:431 (python+0x4d2cb7) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #4 do_start_new_thread Modules/_threadmodule.c:1794 (python+0x4d2ec0) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #5 thread_PyThread_start_joinable_thread Modules/_threadmodule.c:1917 (python+0x4d312e) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #6 cfunction_call Objects/methodobject.c:551 (python+0x1ee9e6) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #7 _PyObject_MakeTpCall Objects/call.c:242 (python+0x16a6fc) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #8 _PyObject_VectorcallTstate Include/internal/pycore_call.h:165 (python+0x16a9b9) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #9 PyObject_Vectorcall Objects/call.c:327 (python+0x16aa71) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #10 _PyEval_EvalFrameDefault Python/generated_cases.c.h:2199 (python+0x341ba1) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #11 _PyEval_EvalFrame Include/internal/pycore_ceval.h:116 (python+0x1943d6) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #12 gen_send_ex2 Objects/genobject.c:245 (python+0x1948fd) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #13 gen_iternext Objects/genobject.c:618 (python+0x196a44) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #14 builtin_next Python/bltinmodule.c:1638 (python+0x3250e6) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #15 _PyEval_EvalFrameDefault Python/generated_cases.c.h:1440 (python+0x33cfc8) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #16 _PyEval_EvalFrame Include/internal/pycore_ceval.h:116 (python+0x368276) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #17 _PyEval_Vector Python/ceval.c:1911 (python+0x3684fc) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #18 _PyFunction_Vectorcall Objects/call.c:413 (python+0x16a4a1) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #19 _PyObject_VectorcallTstate Include/internal/pycore_call.h:167 (python+0x16ec05) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #20 method_vectorcall Objects/classobject.c:93 (python+0x16ede3) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #21 _PyVectorcall_Call Objects/call.c:273 (python+0x16c8e1) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #22 _PyObject_Call Objects/call.c:348 (python+0x16cd2b) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #23 PyObject_Call Objects/call.c:373 (python+0x16cd8f) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #24 _PyEval_EvalFrameDefault Python/generated_cases.c.h:1762 (python+0x33ec1f) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #25 _PyEval_EvalFrame Include/internal/pycore_ceval.h:116 (python+0x368276) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #26 _PyEval_Vector Python/ceval.c:1911 (python+0x3684fc) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #27 _PyFunction_Vectorcall Objects/call.c:413 (python+0x16a4a1) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #28 _PyObject_VectorcallDictTstate Objects/call.c:135 (python+0x16c514) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #29 _PyObject_Call_Prepend Objects/call.c:504 (python+0x16c7e9) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #30 slot_tp_call Objects/typeobject.c:9987 (python+0x251089) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #31 _PyObject_MakeTpCall Objects/call.c:242 (python+0x16a6fc) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #32 _PyObject_VectorcallTstate Include/internal/pycore_call.h:165 (python+0x16a9b9) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #33 PyObject_Vectorcall Objects/call.c:327 (python+0x16aa71) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #34 _PyEval_EvalFrameDefault Python/generated_cases.c.h:2772 (python+0x345ab7) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #35 _PyEval_EvalFrame Include/internal/pycore_ceval.h:116 (python+0x368276) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #36 _PyEval_Vector Python/ceval.c:1911 (python+0x3684fc) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #37 _PyFunction_Vectorcall Objects/call.c:413 (python+0x16a4a1) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #38 _PyObject_VectorcallTstate Include/internal/pycore_call.h:167 (python+0x16ec05) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #39 method_vectorcall Objects/classobject.c:93 (python+0x16ede3) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #40 _PyVectorcall_Call Objects/call.c:273 (python+0x16c8e1) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #41 _PyObject_Call Objects/call.c:348 (python+0x16cd2b) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #42 PyObject_Call Objects/call.c:373 (python+0x16cd8f) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #43 _PyEval_EvalFrameDefault Python/generated_cases.c.h:1762 (python+0x33ec1f) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #44 _PyEval_EvalFrame Include/internal/pycore_ceval.h:116 (python+0x368276) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #45 _PyEval_Vector Python/ceval.c:1911 (python+0x3684fc) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #46 _PyFunction_Vectorcall Objects/call.c:413 (python+0x16a4a1) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #47 _PyObject_VectorcallDictTstate Objects/call.c:135 (python+0x16c514) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #48 _PyObject_Call_Prepend Objects/call.c:504 (python+0x16c7e9) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #49 slot_tp_call Objects/typeobject.c:9987 (python+0x251089) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #50 _PyObject_MakeTpCall Objects/call.c:242 (python+0x16a6fc) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #51 _PyObject_VectorcallTstate Include/internal/pycore_call.h:165 (python+0x16a9b9) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #52 PyObject_Vectorcall Objects/call.c:327 (python+0x16aa71) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #53 _PyEval_EvalFrameDefault Python/generated_cases.c.h:2772 (python+0x345ab7) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #54 _PyEval_EvalFrame Include/internal/pycore_ceval.h:116 (python+0x368276) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #55 _PyEval_Vector Python/ceval.c:1911 (python+0x3684fc) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #56 _PyFunction_Vectorcall Objects/call.c:413 (python+0x16a4a1) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #57 _PyObject_VectorcallTstate Include/internal/pycore_call.h:167 (python+0x16ec05) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #58 method_vectorcall Objects/classobject.c:93 (python+0x16ede3) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #59 _PyVectorcall_Call Objects/call.c:273 (python+0x16c8e1) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #60 _PyObject_Call Objects/call.c:348 (python+0x16cd2b) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #61 PyObject_Call Objects/call.c:373 (python+0x16cd8f) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #62 _PyEval_EvalFrameDefault Python/generated_cases.c.h:1762 (python+0x33ec1f) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #63 _PyEval_EvalFrame Include/internal/pycore_ceval.h:116 (python+0x368276) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #64 _PyEval_Vector Python/ceval.c:1911 (python+0x3684fc) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #65 _PyFunction_Vectorcall Objects/call.c:413 (python+0x16a4a1) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #66 _PyObject_VectorcallDictTstate Objects/call.c:135 (python+0x16c514) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #67 _PyObject_Call_Prepend Objects/call.c:504 (python+0x16c7e9) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #68 slot_tp_call Objects/typeobject.c:9987 (python+0x251089) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #69 _PyObject_MakeTpCall Objects/call.c:242 (python+0x16a6fc) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #70 _PyObject_VectorcallTstate Include/internal/pycore_call.h:165 (python+0x16a9b9) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #71 PyObject_Vectorcall Objects/call.c:327 (python+0x16aa71) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #72 _PyEval_EvalFrameDefault Python/generated_cases.c.h:2772 (python+0x345ab7) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #73 _PyEval_EvalFrame Include/internal/pycore_ceval.h:116 (python+0x368276) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #74 _PyEval_Vector Python/ceval.c:1911 (python+0x3684fc) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #75 PyEval_EvalCode Python/ceval.c:658 (python+0x368671) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #76 builtin_exec_impl Python/bltinmodule.c:1158 (python+0x3269ec) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #77 builtin_exec Python/clinic/bltinmodule.c.h:560 (python+0x326b38) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #78 cfunction_vectorcall_FASTCALL_KEYWORDS Objects/methodobject.c:452 (python+0x1eda82) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #79 _PyObject_VectorcallTstate Include/internal/pycore_call.h:167 (python+0x16a928) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #80 PyObject_Vectorcall Objects/call.c:327 (python+0x16aa71) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #81 _PyEval_EvalFrameDefault Python/generated_cases.c.h:960 (python+0x33a0e6) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #82 _PyEval_EvalFrame Include/internal/pycore_ceval.h:116 (python+0x368276) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #83 _PyEval_Vector Python/ceval.c:1911 (python+0x3684fc) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #84 _PyFunction_Vectorcall Objects/call.c:413 (python+0x16a4a1) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #85 _PyVectorcall_Call Objects/call.c:273 (python+0x16c8e1) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #86 _PyObject_Call Objects/call.c:348 (python+0x16cd2b) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #87 PyObject_Call Objects/call.c:373 (python+0x16cd8f) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #88 pymain_run_module Modules/main.c:349 (python+0x4452e7) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #89 pymain_run_python Modules/main.c:691 (python+0x4465b6) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #90 Py_RunMain Modules/main.c:776 (python+0x446961) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #91 pymain_main Modules/main.c:806 (python+0x446a18) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #92 Py_BytesMain Modules/main.c:830 (python+0x446b77) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #93 main Programs/python.c:15 (python+0x84aeb) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)

  Thread T57 'Thread-57 (runn' (tid=31267, running) created by main thread at:
    #0 pthread_create ../../../../src/libsanitizer/tsan/tsan_interceptors_posix.cpp:1022 (libtsan.so.2+0x5ac1a) (BuildId: 38097064631f7912bd33117a9c83d08b42e15571)
    #1 do_start_joinable_thread Python/thread_pthread.h:289 (python+0x42a37b) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #2 PyThread_start_joinable_thread Python/thread_pthread.h:313 (python+0x42a571) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #3 ThreadHandle_start Modules/_threadmodule.c:431 (python+0x4d2cb7) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #4 do_start_new_thread Modules/_threadmodule.c:1794 (python+0x4d2ec0) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #5 thread_PyThread_start_joinable_thread Modules/_threadmodule.c:1917 (python+0x4d312e) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #6 cfunction_call Objects/methodobject.c:551 (python+0x1ee9e6) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #7 _PyObject_MakeTpCall Objects/call.c:242 (python+0x16a6fc) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #8 _PyObject_VectorcallTstate Include/internal/pycore_call.h:165 (python+0x16a9b9) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #9 PyObject_Vectorcall Objects/call.c:327 (python+0x16aa71) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #10 _PyEval_EvalFrameDefault Python/generated_cases.c.h:2199 (python+0x341ba1) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #11 _PyEval_EvalFrame Include/internal/pycore_ceval.h:116 (python+0x1943d6) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #12 gen_send_ex2 Objects/genobject.c:245 (python+0x1948fd) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #13 gen_iternext Objects/genobject.c:618 (python+0x196a44) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #14 builtin_next Python/bltinmodule.c:1638 (python+0x3250e6) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #15 _PyEval_EvalFrameDefault Python/generated_cases.c.h:1440 (python+0x33cfc8) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #16 _PyEval_EvalFrame Include/internal/pycore_ceval.h:116 (python+0x368276) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #17 _PyEval_Vector Python/ceval.c:1911 (python+0x3684fc) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #18 _PyFunction_Vectorcall Objects/call.c:413 (python+0x16a4a1) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #19 _PyObject_VectorcallTstate Include/internal/pycore_call.h:167 (python+0x16ec05) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #20 method_vectorcall Objects/classobject.c:93 (python+0x16ede3) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #21 _PyVectorcall_Call Objects/call.c:273 (python+0x16c8e1) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #22 _PyObject_Call Objects/call.c:348 (python+0x16cd2b) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #23 PyObject_Call Objects/call.c:373 (python+0x16cd8f) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #24 _PyEval_EvalFrameDefault Python/generated_cases.c.h:1762 (python+0x33ec1f) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #25 _PyEval_EvalFrame Include/internal/pycore_ceval.h:116 (python+0x368276) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #26 _PyEval_Vector Python/ceval.c:1911 (python+0x3684fc) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #27 _PyFunction_Vectorcall Objects/call.c:413 (python+0x16a4a1) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #28 _PyObject_VectorcallDictTstate Objects/call.c:135 (python+0x16c514) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #29 _PyObject_Call_Prepend Objects/call.c:504 (python+0x16c7e9) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #30 slot_tp_call Objects/typeobject.c:9987 (python+0x251089) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #31 _PyObject_MakeTpCall Objects/call.c:242 (python+0x16a6fc) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #32 _PyObject_VectorcallTstate Include/internal/pycore_call.h:165 (python+0x16a9b9) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #33 PyObject_Vectorcall Objects/call.c:327 (python+0x16aa71) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #34 _PyEval_EvalFrameDefault Python/generated_cases.c.h:2772 (python+0x345ab7) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #35 _PyEval_EvalFrame Include/internal/pycore_ceval.h:116 (python+0x368276) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #36 _PyEval_Vector Python/ceval.c:1911 (python+0x3684fc) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #37 _PyFunction_Vectorcall Objects/call.c:413 (python+0x16a4a1) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #38 _PyObject_VectorcallTstate Include/internal/pycore_call.h:167 (python+0x16ec05) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #39 method_vectorcall Objects/classobject.c:93 (python+0x16ede3) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #40 _PyVectorcall_Call Objects/call.c:273 (python+0x16c8e1) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #41 _PyObject_Call Objects/call.c:348 (python+0x16cd2b) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #42 PyObject_Call Objects/call.c:373 (python+0x16cd8f) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #43 _PyEval_EvalFrameDefault Python/generated_cases.c.h:1762 (python+0x33ec1f) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #44 _PyEval_EvalFrame Include/internal/pycore_ceval.h:116 (python+0x368276) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #45 _PyEval_Vector Python/ceval.c:1911 (python+0x3684fc) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #46 _PyFunction_Vectorcall Objects/call.c:413 (python+0x16a4a1) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #47 _PyObject_VectorcallDictTstate Objects/call.c:135 (python+0x16c514) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #48 _PyObject_Call_Prepend Objects/call.c:504 (python+0x16c7e9) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #49 slot_tp_call Objects/typeobject.c:9987 (python+0x251089) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #50 _PyObject_MakeTpCall Objects/call.c:242 (python+0x16a6fc) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #51 _PyObject_VectorcallTstate Include/internal/pycore_call.h:165 (python+0x16a9b9) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #52 PyObject_Vectorcall Objects/call.c:327 (python+0x16aa71) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #53 _PyEval_EvalFrameDefault Python/generated_cases.c.h:2772 (python+0x345ab7) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #54 _PyEval_EvalFrame Include/internal/pycore_ceval.h:116 (python+0x368276) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #55 _PyEval_Vector Python/ceval.c:1911 (python+0x3684fc) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #56 _PyFunction_Vectorcall Objects/call.c:413 (python+0x16a4a1) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #57 _PyObject_VectorcallTstate Include/internal/pycore_call.h:167 (python+0x16ec05) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #58 method_vectorcall Objects/classobject.c:93 (python+0x16ede3) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #59 _PyVectorcall_Call Objects/call.c:273 (python+0x16c8e1) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #60 _PyObject_Call Objects/call.c:348 (python+0x16cd2b) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #61 PyObject_Call Objects/call.c:373 (python+0x16cd8f) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #62 _PyEval_EvalFrameDefault Python/generated_cases.c.h:1762 (python+0x33ec1f) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #63 _PyEval_EvalFrame Include/internal/pycore_ceval.h:116 (python+0x368276) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #64 _PyEval_Vector Python/ceval.c:1911 (python+0x3684fc) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #65 _PyFunction_Vectorcall Objects/call.c:413 (python+0x16a4a1) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #66 _PyObject_VectorcallDictTstate Objects/call.c:135 (python+0x16c514) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #67 _PyObject_Call_Prepend Objects/call.c:504 (python+0x16c7e9) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #68 slot_tp_call Objects/typeobject.c:9987 (python+0x251089) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #69 _PyObject_MakeTpCall Objects/call.c:242 (python+0x16a6fc) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #70 _PyObject_VectorcallTstate Include/internal/pycore_call.h:165 (python+0x16a9b9) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #71 PyObject_Vectorcall Objects/call.c:327 (python+0x16aa71) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #72 _PyEval_EvalFrameDefault Python/generated_cases.c.h:2772 (python+0x345ab7) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #73 _PyEval_EvalFrame Include/internal/pycore_ceval.h:116 (python+0x368276) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #74 _PyEval_Vector Python/ceval.c:1911 (python+0x3684fc) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #75 PyEval_EvalCode Python/ceval.c:658 (python+0x368671) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #76 builtin_exec_impl Python/bltinmodule.c:1158 (python+0x3269ec) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #77 builtin_exec Python/clinic/bltinmodule.c.h:560 (python+0x326b38) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #78 cfunction_vectorcall_FASTCALL_KEYWORDS Objects/methodobject.c:452 (python+0x1eda82) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #79 _PyObject_VectorcallTstate Include/internal/pycore_call.h:167 (python+0x16a928) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #80 PyObject_Vectorcall Objects/call.c:327 (python+0x16aa71) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #81 _PyEval_EvalFrameDefault Python/generated_cases.c.h:960 (python+0x33a0e6) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #82 _PyEval_EvalFrame Include/internal/pycore_ceval.h:116 (python+0x368276) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #83 _PyEval_Vector Python/ceval.c:1911 (python+0x3684fc) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #84 _PyFunction_Vectorcall Objects/call.c:413 (python+0x16a4a1) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #85 _PyVectorcall_Call Objects/call.c:273 (python+0x16c8e1) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #86 _PyObject_Call Objects/call.c:348 (python+0x16cd2b) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #87 PyObject_Call Objects/call.c:373 (python+0x16cd8f) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #88 pymain_run_module Modules/main.c:349 (python+0x4452e7) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #89 pymain_run_python Modules/main.c:691 (python+0x4465b6) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #90 Py_RunMain Modules/main.c:776 (python+0x446961) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #91 pymain_main Modules/main.c:806 (python+0x446a18) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #92 Py_BytesMain Modules/main.c:830 (python+0x446b77) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)
    #93 main Programs/python.c:15 (python+0x84aeb) (BuildId: d5d547e374d1a5b2826107abad232e80114df33f)

SUMMARY: ThreadSanitizer: data race Include/internal/pycore_frame.h:98 in _PyFrame_GetBytecode
WARNING: ThreadSanitizer: data race (pid=5796)
  Read of size 8 at 0x7facabdf9248 by main thread:
    #0 PyException_GetTraceback Objects/exceptions.c:415 (python+0x18c803) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #1 PyTraceBack_Here Python/traceback.c:266 (python+0x42cd0d) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #2 _PyEval_EvalFrameDefault Python/ceval.c:952 (python+0x367baf) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #3 _PyEval_EvalFrame Include/internal/pycore_ceval.h:116 (python+0x36826a) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #4 _PyEval_Vector Python/ceval.c:1911 (python+0x3684f0) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #5 _PyFunction_Vectorcall Objects/call.c:413 (python+0x16a497) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #6 _PyObject_VectorcallTstate Include/internal/pycore_call.h:167 (python+0x16ebfb) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #7 method_vectorcall Objects/classobject.c:93 (python+0x16edd9) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #8 _PyVectorcall_Call Objects/call.c:273 (python+0x16c8d7) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #9 _PyObject_Call Objects/call.c:348 (python+0x16cd21) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #10 PyObject_Call Objects/call.c:373 (python+0x16cd85) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #11 _PyEval_EvalFrameDefault Python/generated_cases.c.h:1762 (python+0x33ec13) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #12 _PyEval_EvalFrame Include/internal/pycore_ceval.h:116 (python+0x36826a) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #13 _PyEval_Vector Python/ceval.c:1911 (python+0x3684f0) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #14 _PyFunction_Vectorcall Objects/call.c:413 (python+0x16a497) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #15 _PyObject_VectorcallDictTstate Objects/call.c:135 (python+0x16c50a) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #16 _PyObject_Call_Prepend Objects/call.c:504 (python+0x16c7df) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #17 slot_tp_call Objects/typeobject.c:9987 (python+0x25107f) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #18 _PyObject_MakeTpCall Objects/call.c:242 (python+0x16a6f2) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #19 _PyObject_VectorcallTstate Include/internal/pycore_call.h:165 (python+0x16a9af) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #20 PyObject_Vectorcall Objects/call.c:327 (python+0x16aa67) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #21 _PyEval_EvalFrameDefault Python/generated_cases.c.h:2772 (python+0x345aab) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #22 _PyEval_EvalFrame Include/internal/pycore_ceval.h:116 (python+0x36826a) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #23 _PyEval_Vector Python/ceval.c:1911 (python+0x3684f0) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #24 _PyFunction_Vectorcall Objects/call.c:413 (python+0x16a497) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #25 _PyObject_VectorcallTstate Include/internal/pycore_call.h:167 (python+0x16ebfb) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #26 method_vectorcall Objects/classobject.c:93 (python+0x16edd9) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #27 _PyVectorcall_Call Objects/call.c:273 (python+0x16c8d7) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #28 _PyObject_Call Objects/call.c:348 (python+0x16cd21) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #29 PyObject_Call Objects/call.c:373 (python+0x16cd85) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #30 _PyEval_EvalFrameDefault Python/generated_cases.c.h:1762 (python+0x33ec13) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #31 _PyEval_EvalFrame Include/internal/pycore_ceval.h:116 (python+0x36826a) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #32 _PyEval_Vector Python/ceval.c:1911 (python+0x3684f0) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #33 _PyFunction_Vectorcall Objects/call.c:413 (python+0x16a497) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #34 _PyObject_VectorcallDictTstate Objects/call.c:135 (python+0x16c50a) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #35 _PyObject_Call_Prepend Objects/call.c:504 (python+0x16c7df) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #36 slot_tp_call Objects/typeobject.c:9987 (python+0x25107f) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #37 _PyObject_MakeTpCall Objects/call.c:242 (python+0x16a6f2) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #38 _PyObject_VectorcallTstate Include/internal/pycore_call.h:165 (python+0x16a9af) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #39 PyObject_Vectorcall Objects/call.c:327 (python+0x16aa67) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #40 _PyEval_EvalFrameDefault Python/generated_cases.c.h:2772 (python+0x345aab) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #41 _PyEval_EvalFrame Include/internal/pycore_ceval.h:116 (python+0x36826a) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #42 _PyEval_Vector Python/ceval.c:1911 (python+0x3684f0) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #43 _PyFunction_Vectorcall Objects/call.c:413 (python+0x16a497) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #44 _PyObject_VectorcallTstate Include/internal/pycore_call.h:167 (python+0x16ebfb) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #45 method_vectorcall Objects/classobject.c:93 (python+0x16edd9) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #46 _PyVectorcall_Call Objects/call.c:273 (python+0x16c8d7) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #47 _PyObject_Call Objects/call.c:348 (python+0x16cd21) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #48 PyObject_Call Objects/call.c:373 (python+0x16cd85) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #49 _PyEval_EvalFrameDefault Python/generated_cases.c.h:1762 (python+0x33ec13) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #50 _PyEval_EvalFrame Include/internal/pycore_ceval.h:116 (python+0x36826a) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #51 _PyEval_Vector Python/ceval.c:1911 (python+0x3684f0) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #52 _PyFunction_Vectorcall Objects/call.c:413 (python+0x16a497) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #53 _PyObject_VectorcallDictTstate Objects/call.c:135 (python+0x16c50a) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #54 _PyObject_Call_Prepend Objects/call.c:504 (python+0x16c7df) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #55 slot_tp_call Objects/typeobject.c:9987 (python+0x25107f) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #56 _PyObject_MakeTpCall Objects/call.c:242 (python+0x16a6f2) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #57 _PyObject_VectorcallTstate Include/internal/pycore_call.h:165 (python+0x16a9af) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #58 PyObject_Vectorcall Objects/call.c:327 (python+0x16aa67) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #59 _PyEval_EvalFrameDefault Python/generated_cases.c.h:960 (python+0x33a0da) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #60 _PyEval_EvalFrame Include/internal/pycore_ceval.h:116 (python+0x36826a) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #61 _PyEval_Vector Python/ceval.c:1911 (python+0x3684f0) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #62 PyEval_EvalCode Python/ceval.c:658 (python+0x368665) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #63 builtin_exec_impl Python/bltinmodule.c:1158 (python+0x3269e0) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #64 builtin_exec Python/clinic/bltinmodule.c.h:560 (python+0x326b2c) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #65 cfunction_vectorcall_FASTCALL_KEYWORDS Objects/methodobject.c:452 (python+0x1eda78) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #66 _PyObject_VectorcallTstate Include/internal/pycore_call.h:167 (python+0x16a91e) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #67 PyObject_Vectorcall Objects/call.c:327 (python+0x16aa67) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #68 _PyEval_EvalFrameDefault Python/generated_cases.c.h:960 (python+0x33a0da) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #69 _PyEval_EvalFrame Include/internal/pycore_ceval.h:116 (python+0x36826a) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #70 _PyEval_Vector Python/ceval.c:1911 (python+0x3684f0) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #71 _PyFunction_Vectorcall Objects/call.c:413 (python+0x16a497) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #72 _PyVectorcall_Call Objects/call.c:273 (python+0x16c8d7) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #73 _PyObject_Call Objects/call.c:348 (python+0x16cd21) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #74 PyObject_Call Objects/call.c:373 (python+0x16cd85) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #75 pymain_run_module Modules/main.c:349 (python+0x445287) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #76 pymain_run_python Modules/main.c:691 (python+0x446556) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #77 Py_RunMain Modules/main.c:776 (python+0x446901) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #78 pymain_main Modules/main.c:806 (python+0x4469b8) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #79 Py_BytesMain Modules/main.c:830 (python+0x446b17) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #80 main Programs/python.c:15 (python+0x84aeb) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)

  Previous write of size 8 at 0x7facabdf9248 by thread T5:
    #0 _PyErr_Restore Python/errors.c:99 (python+0x39a7a0) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #1 _PyErr_SetObject Python/errors.c:244 (python+0x39a1ea) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #2 do_raise Python/ceval.c:2077 (python+0x32d89d) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #3 _PyEval_EvalFrameDefault Python/generated_cases.c.h:6858 (python+0x35ec05) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #4 _PyEval_EvalFrame Include/internal/pycore_ceval.h:116 (python+0x36826a) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #5 _PyEval_Vector Python/ceval.c:1911 (python+0x3684f0) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #6 _PyFunction_Vectorcall Objects/call.c:413 (python+0x16a497) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #7 _PyObject_VectorcallTstate Include/internal/pycore_call.h:167 (python+0x16ebfb) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #8 method_vectorcall Objects/classobject.c:71 (python+0x16ef1b) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #9 _PyVectorcall_Call Objects/call.c:273 (python+0x16c8d7) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #10 _PyObject_Call Objects/call.c:348 (python+0x16cd21) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #11 PyObject_Call Objects/call.c:373 (python+0x16cd85) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #12 thread_run Modules/_threadmodule.c:346 (python+0x4d30f8) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #13 pythread_wrapper Python/thread_pthread.h:242 (python+0x429eca) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)

  Thread T5 'asyncio_0' (tid=7980, running) created by main thread at:
    #0 pthread_create ../../../../src/libsanitizer/tsan/tsan_interceptors_posix.cpp:1022 (libtsan.so.2+0x5ac1a) (BuildId: 38097064631f7912bd33117a9c83d08b42e15571)
    #1 do_start_joinable_thread Python/thread_pthread.h:289 (python+0x42a31b) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #2 PyThread_start_joinable_thread Python/thread_pthread.h:313 (python+0x42a511) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #3 ThreadHandle_start Modules/_threadmodule.c:431 (python+0x4d2a8d) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #4 do_start_new_thread Modules/_threadmodule.c:1794 (python+0x4d2c96) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #5 thread_PyThread_start_joinable_thread Modules/_threadmodule.c:1917 (python+0x4d2f04) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #6 cfunction_call Objects/methodobject.c:551 (python+0x1ee9dc) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #7 _PyObject_MakeTpCall Objects/call.c:242 (python+0x16a6f2) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #8 _PyObject_VectorcallTstate Include/internal/pycore_call.h:165 (python+0x16a9af) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #9 PyObject_Vectorcall Objects/call.c:327 (python+0x16aa67) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #10 _PyEval_EvalFrameDefault Python/generated_cases.c.h:2199 (python+0x341b95) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #11 _PyEval_EvalFrame Include/internal/pycore_ceval.h:116 (python+0x36826a) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #12 _PyEval_Vector Python/ceval.c:1911 (python+0x3684f0) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #13 _PyFunction_Vectorcall Objects/call.c:413 (python+0x16a497) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #14 _PyObject_VectorcallTstate Include/internal/pycore_call.h:167 (python+0x16ebfb) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #15 method_vectorcall Objects/classobject.c:93 (python+0x16edd9) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #16 _PyVectorcall_Call Objects/call.c:273 (python+0x16c8d7) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #17 _PyObject_Call Objects/call.c:348 (python+0x16cd21) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #18 PyObject_Call Objects/call.c:373 (python+0x16cd85) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #19 _PyEval_EvalFrameDefault Python/generated_cases.c.h:1762 (python+0x33ec13) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #20 _PyEval_EvalFrame Include/internal/pycore_ceval.h:116 (python+0x36826a) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #21 _PyEval_Vector Python/ceval.c:1911 (python+0x3684f0) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #22 _PyFunction_Vectorcall Objects/call.c:413 (python+0x16a497) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #23 _PyObject_VectorcallTstate Include/internal/pycore_call.h:167 (python+0x16ebfb) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #24 method_vectorcall Objects/classobject.c:93 (python+0x16edd9) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #25 _PyVectorcall_Call Objects/call.c:273 (python+0x16c8d7) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #26 _PyObject_Call Objects/call.c:348 (python+0x16cd21) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #27 PyObject_Call Objects/call.c:373 (python+0x16cd85) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #28 _PyEval_EvalFrameDefault Python/generated_cases.c.h:1762 (python+0x33ec13) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #29 _PyEval_EvalFrame Include/internal/pycore_ceval.h:116 (python+0x36826a) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #30 _PyEval_Vector Python/ceval.c:1911 (python+0x3684f0) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #31 _PyFunction_Vectorcall Objects/call.c:413 (python+0x16a497) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #32 _PyObject_VectorcallDictTstate Objects/call.c:135 (python+0x16c50a) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #33 _PyObject_Call_Prepend Objects/call.c:504 (python+0x16c7df) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #34 slot_tp_call Objects/typeobject.c:9987 (python+0x25107f) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #35 _PyObject_MakeTpCall Objects/call.c:242 (python+0x16a6f2) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #36 _PyObject_VectorcallTstate Include/internal/pycore_call.h:165 (python+0x16a9af) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #37 PyObject_Vectorcall Objects/call.c:327 (python+0x16aa67) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #38 _PyEval_EvalFrameDefault Python/generated_cases.c.h:2772 (python+0x345aab) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #39 _PyEval_EvalFrame Include/internal/pycore_ceval.h:116 (python+0x36826a) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #40 _PyEval_Vector Python/ceval.c:1911 (python+0x3684f0) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #41 _PyFunction_Vectorcall Objects/call.c:413 (python+0x16a497) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #42 _PyObject_VectorcallTstate Include/internal/pycore_call.h:167 (python+0x16ebfb) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #43 method_vectorcall Objects/classobject.c:93 (python+0x16edd9) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #44 _PyVectorcall_Call Objects/call.c:273 (python+0x16c8d7) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #45 _PyObject_Call Objects/call.c:348 (python+0x16cd21) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #46 PyObject_Call Objects/call.c:373 (python+0x16cd85) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #47 _PyEval_EvalFrameDefault Python/generated_cases.c.h:1762 (python+0x33ec13) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #48 _PyEval_EvalFrame Include/internal/pycore_ceval.h:116 (python+0x36826a) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #49 _PyEval_Vector Python/ceval.c:1911 (python+0x3684f0) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #50 _PyFunction_Vectorcall Objects/call.c:413 (python+0x16a497) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #51 _PyObject_VectorcallDictTstate Objects/call.c:135 (python+0x16c50a) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #52 _PyObject_Call_Prepend Objects/call.c:504 (python+0x16c7df) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #53 slot_tp_call Objects/typeobject.c:9987 (python+0x25107f) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #54 _PyObject_MakeTpCall Objects/call.c:242 (python+0x16a6f2) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #55 _PyObject_VectorcallTstate Include/internal/pycore_call.h:165 (python+0x16a9af) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #56 PyObject_Vectorcall Objects/call.c:327 (python+0x16aa67) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #57 _PyEval_EvalFrameDefault Python/generated_cases.c.h:2772 (python+0x345aab) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #58 _PyEval_EvalFrame Include/internal/pycore_ceval.h:116 (python+0x36826a) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #59 _PyEval_Vector Python/ceval.c:1911 (python+0x3684f0) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #60 _PyFunction_Vectorcall Objects/call.c:413 (python+0x16a497) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #61 _PyObject_VectorcallTstate Include/internal/pycore_call.h:167 (python+0x16ebfb) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #62 method_vectorcall Objects/classobject.c:93 (python+0x16edd9) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #63 _PyVectorcall_Call Objects/call.c:273 (python+0x16c8d7) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #64 _PyObject_Call Objects/call.c:348 (python+0x16cd21) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #65 PyObject_Call Objects/call.c:373 (python+0x16cd85) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #66 _PyEval_EvalFrameDefault Python/generated_cases.c.h:1762 (python+0x33ec13) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #67 _PyEval_EvalFrame Include/internal/pycore_ceval.h:116 (python+0x36826a) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #68 _PyEval_Vector Python/ceval.c:1911 (python+0x3684f0) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #69 _PyFunction_Vectorcall Objects/call.c:413 (python+0x16a497) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #70 _PyObject_VectorcallDictTstate Objects/call.c:135 (python+0x16c50a) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #71 _PyObject_Call_Prepend Objects/call.c:504 (python+0x16c7df) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #72 slot_tp_call Objects/typeobject.c:9987 (python+0x25107f) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #73 _PyObject_MakeTpCall Objects/call.c:242 (python+0x16a6f2) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #74 _PyObject_VectorcallTstate Include/internal/pycore_call.h:165 (python+0x16a9af) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #75 PyObject_Vectorcall Objects/call.c:327 (python+0x16aa67) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #76 _PyEval_EvalFrameDefault Python/generated_cases.c.h:960 (python+0x33a0da) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #77 _PyEval_EvalFrame Include/internal/pycore_ceval.h:116 (python+0x36826a) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #78 _PyEval_Vector Python/ceval.c:1911 (python+0x3684f0) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #79 PyEval_EvalCode Python/ceval.c:658 (python+0x368665) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #80 builtin_exec_impl Python/bltinmodule.c:1158 (python+0x3269e0) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #81 builtin_exec Python/clinic/bltinmodule.c.h:560 (python+0x326b2c) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #82 cfunction_vectorcall_FASTCALL_KEYWORDS Objects/methodobject.c:452 (python+0x1eda78) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #83 _PyObject_VectorcallTstate Include/internal/pycore_call.h:167 (python+0x16a91e) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #84 PyObject_Vectorcall Objects/call.c:327 (python+0x16aa67) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #85 _PyEval_EvalFrameDefault Python/generated_cases.c.h:960 (python+0x33a0da) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #86 _PyEval_EvalFrame Include/internal/pycore_ceval.h:116 (python+0x36826a) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #87 _PyEval_Vector Python/ceval.c:1911 (python+0x3684f0) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #88 _PyFunction_Vectorcall Objects/call.c:413 (python+0x16a497) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #89 _PyVectorcall_Call Objects/call.c:273 (python+0x16c8d7) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #90 _PyObject_Call Objects/call.c:348 (python+0x16cd21) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #91 PyObject_Call Objects/call.c:373 (python+0x16cd85) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #92 pymain_run_module Modules/main.c:349 (python+0x445287) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #93 pymain_run_python Modules/main.c:691 (python+0x446556) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #94 Py_RunMain Modules/main.c:776 (python+0x446901) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #95 pymain_main Modules/main.c:806 (python+0x4469b8) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #96 Py_BytesMain Modules/main.c:830 (python+0x446b17) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)
    #97 main Programs/python.c:15 (python+0x84aeb) (BuildId: 2a7129e7efc6d9757fb757ba515af9799469be95)

SUMMARY: ThreadSanitizer: data race Objects/exceptions.c:415 in PyException_GetTraceback
==================

Linked PRs

@colesbury
Copy link
Contributor

Hmmm... this looks like a TSan report during a crash. Faulthandler's dumping of threads isn't thread-safe and we should deal with that (most likely by only printing the stack trace of the faulting thread), but the important thing is that test_asyncio is apparently crashing with the PR. The underlying crash is not going to be fixed by suppressions.

@kumaraditya303
Copy link
Contributor Author

✦ ❯ env TSAN_OPTIONS=suppressions={$PWD}/Tools/tsan/suppressions_free_threading.txt ./python -m test test_asyncio.test_free_threading -j4 -F
Using random seed: 3369581851
0:00:00 load avg: 6.42 Run tests in parallel using 4 worker processes
0:00:24 load avg: 7.00 [  1] test_asyncio.test_free_threading passed
0:00:24 load avg: 7.00 [  2] test_asyncio.test_free_threading passed
0:00:25 load avg: 7.00 [  3] test_asyncio.test_free_threading passed
0:00:25 load avg: 7.00 [  4] test_asyncio.test_free_threading passed
0:00:50 load avg: 8.56 [  5] test_asyncio.test_free_threading passed
0:00:50 load avg: 8.56 [  6] test_asyncio.test_free_threading passed
0:00:51 load avg: 8.56 [  7] test_asyncio.test_free_threading passed
0:01:18 load avg: 7.61 [  8] test_asyncio.test_free_threading passed -- running (1): test_asyncio.test_free_threading (53.0 sec)
0:01:18 load avg: 7.61 [  9] test_asyncio.test_free_threading passed -- running (1): test_asyncio.test_free_threading (53.8 sec)
0:01:19 load avg: 7.61 [ 10] test_asyncio.test_free_threading passed -- running (1): test_asyncio.test_free_threading (54.0 sec)
0:01:25 load avg: 7.56 [ 11/1] test_asyncio.test_free_threading worker non-zero exit code (Exit code -6 (SIGABRT))
Debug memory block at address p=0x7f6a1e112930: API 'o'
    176 bytes originally requested
    The 7 pad bytes at p-7 are FORBIDDENBYTE, as expected.
    The 8 pad bytes at tail=0x7f6a1e1129e0 are not all FORBIDDENBYTE (0xfd):
        at tail+0: 0x0c *** OUCH
        at tail+1: 0xfd
        at tail+2: 0xfd
        at tail+3: 0xfd
        at tail+4: 0xfd
        at tail+5: 0xfd
        at tail+6: 0xfd
        at tail+7: 0xfd
    Data at p: 00 00 00 00 00 00 00 00 ... 0a 0b 08 09 07 04 03 02

Enable tracemalloc to get the memory block allocation traceback

Fatal Python error: _PyMem_DebugRawFree: bad trailing pad byte
Python runtime state: initialized

Thread 0x00007f6a02bfe6c0 (most recent call first):
  File "/home/realkumaraditya/cpython/Lib/asyncio/futures.py", line 183 in done
python: ./Include/internal/pycore_frame.h:88: _PyFrame_GetCode: Assertion `PyCode_Check(executable)' failed.
Fatal Python error: Aborted

<Cannot show all threads while the GIL is disabled>
Stack (most recent call first):
  File "/home/realkumaraditya/cpython/Lib/asyncio/runners.py", line 208 in _cancel_all_tasks
  File "/home/realkumaraditya/cpython/Lib/asyncio/runners.py", line 71 in close
  File "/home/realkumaraditya/cpython/Lib/asyncio/runners.py", line 63 in __exit__
  File "/home/realkumaraditya/cpython/Lib/test/test_asyncio/test_free_threading.py", line 46 in runner
  File "/home/realkumaraditya/cpython/Lib/threading.py", line 996 in run
  File "/home/realkumaraditya/cpython/Lib/threading.py", line 1054 in _bootstrap_inner
  File "/home/realkumaraditya/cpython/Lib/threading.py", line 1016 in _bootstrap
Kill <WorkerThread #2 running test=test_asyncio.test_free_threading pid=11853 time=6.8 sec> process group
Kill <WorkerThread #3 running test=test_asyncio.test_free_threading pid=11860 time=6.5 sec> process group
Kill <WorkerThread #4 running test=test_asyncio.test_free_threading pid=11852 time=7.5 sec> process group

== Tests result: FAILURE ==

1 test failed:
    test_asyncio.test_free_threading

10 tests OK.

Total duration: 1 min 25 sec
Total tests: run=160
Total test files: run=11 failed=1
Result: FAILURE

@colesbury I wrote more thread safety tests for asyncio at #128480 and I see this crash sometimes. I'll try to write more tests to find these.

colesbury added a commit to colesbury/cpython that referenced this issue Mar 19, 2025
This makes more operations on frame objects thread-safe in the free
threaded build, which fixes some data races that occurred when passing
exceptions between threads.

However, accessing local variables from another thread while its running
is still not thread-safe and may crash the interpreter.
colesbury added a commit to colesbury/cpython that referenced this issue Mar 19, 2025
This makes more operations on frame objects thread-safe in the free
threaded build, which fixes some data races that occurred when passing
exceptions between threads.

However, accessing local variables from another thread while its running
is still not thread-safe and may crash the interpreter.
colesbury added a commit to colesbury/cpython that referenced this issue Mar 21, 2025
colesbury added a commit that referenced this issue Mar 21, 2025
This makes more operations on frame objects thread-safe in the free
threaded build, which fixes some data races that occurred when passing
exceptions between threads.

However, accessing local variables from another thread while its running
is still not thread-safe and may crash the interpreter.
colesbury added a commit to colesbury/cpython that referenced this issue Mar 21, 2025
This tells TSAN not to sanitize PyUnstable_InterpreterFrame_GetLine().
There's a possible data race on the access to the frame's instr_ptr
if the frame is currently executing. We don't really care about the
race. In theory, we could use relaxed atomics for every access to
`instr_ptr`, but that would create more code churn and current compilers
are overly conservative with optimizations around relaxed atomic
accesses.

We also don't sanitize _PyFrame_IsIncomplete() because it accesses
`instr_ptr` and is called from assertions within PyFrame_GetCode().
colesbury added a commit to colesbury/cpython that referenced this issue Mar 22, 2025
This tells TSAN not to sanitize PyUnstable_InterpreterFrame_GetLine().
There's a possible data race on the access to the frame's instr_ptr
if the frame is currently executing. We don't really care about the
race. In theory, we could use relaxed atomics for every access to
`instr_ptr`, but that would create more code churn and current compilers
are overly conservative with optimizations around relaxed atomic
accesses.

We also don't sanitize _PyFrame_IsIncomplete() because it accesses
`instr_ptr` and is called from assertions within PyFrame_GetCode().
colesbury added a commit that referenced this issue Mar 24, 2025
This tells TSAN not to sanitize `PyUnstable_InterpreterFrame_GetLine()`.
There's a possible data race on the access to the frame's `instr_ptr`
if the frame is currently executing. We don't really care about the
race. In theory, we could use relaxed atomics for every access to
`instr_ptr`, but that would create more code churn and current compilers
are overly conservative with optimizations around relaxed atomic
accesses.

We also don't sanitize `_PyFrame_IsIncomplete()` because it accesses
`instr_ptr` and is called from assertions within PyFrame_GetCode().
colesbury added a commit to colesbury/cpython that referenced this issue Mar 25, 2025
The recent PR pythongh-131479 added locking to `take_ownership` in the free
threading build. The cost is not really the locking -- that path isn't
taken frequently -- but the inlined code causes extra register spills
and slows down RETURN_VALUE, even when it's not taken.

Mark `take_ownership` as `Py_NO_INLINE` to avoid the regression.
colesbury added a commit to colesbury/cpython that referenced this issue Mar 25, 2025
The recent PR pythongh-131479 added locking to `take_ownership` in the free
threading build. The cost is not really the locking -- that path isn't
taken frequently -- but the inlined code causes extra register spills
and slows down RETURN_VALUE, even when it's not taken.

Mark `take_ownership` as `Py_NO_INLINE` to avoid the regression.

Also limit locking in PyFrameObject to Python functions, not the C API.
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-free-threading
Projects
None yet
Development

No branches or pull requests

3 participants