Title: Data race in set iterator length_hint under no-gil · Issue #144356 · python/cpython · GitHub
Open Graph Title: Data race in set iterator length_hint under no-gil · Issue #144356 · python/cpython
X Title: Data race in set iterator length_hint under no-gil · Issue #144356 · python/cpython
Description: Bug report Build info $ cd cpython-tsan/bin/ $ ./python3.15 Python 3.15.0a5+ free-threading build (heads/main:96e4cd698a, Jan 31 2026, 11:45:37) [Clang 18.1.3 (1ubuntu1)] on linux Type "help", "copyright", "credits" or "license" for more...
Open Graph Description: Bug report Build info $ cd cpython-tsan/bin/ $ ./python3.15 Python 3.15.0a5+ free-threading build (heads/main:96e4cd698a, Jan 31 2026, 11:45:37) [Clang 18.1.3 (1ubuntu1)] on linux Type "help", "cop...
X Description: Bug report Build info $ cd cpython-tsan/bin/ $ ./python3.15 Python 3.15.0a5+ free-threading build (heads/main:96e4cd698a, Jan 31 2026, 11:45:37) [Clang 18.1.3 (1ubuntu1)] on linux Type "help&q...
Opengraph URL: https://github.com/python/cpython/issues/144356
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Data race in set iterator length_hint under no-gil","articleBody":"# Bug report\n\n### Build info\n``` bash\n$ cd cpython-tsan/bin/\n$ ./python3.15\nPython 3.15.0a5+ free-threading build (heads/main:96e4cd698a, Jan 31 2026, 11:45:37) [Clang 18.1.3 (1ubuntu1)] on linux\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n```\n### Bug description\n\nUnder `Py_GIL_DISABLED`, `setiter_len()` reads `so->used` non-atomically while concurrent set mutations update it atomically.\n\nThis triggers a data race detectable by TSAN when one thread repeatedly calls `iterator.__length_hint__()` while another mutates the same set\n\n#### Python script\n\n```python\nimport threading, time\n\ns = set(range(2000))\nit = iter(s)\nstop = threading.Event()\n\ndef reader():\n while not stop.is_set():\n it.__length_hint__()\n\ndef writer():\n i = 0\n while not stop.is_set():\n s.add(i)\n s.discard(i - 1)\n i += 1\n\nthreads = [threading.Thread(target=reader) for _ in range(4)]\nthreads.append(threading.Thread(target=writer))\n\nfor t in threads: t.start()\ntime.sleep(3)\nstop.set()\nfor t in threads: t.join()\n```\n\n#### TSAN result\n\u003cdetails>\n\n``` bash\n$ TSAN_OPTIONS=\"halt_on_error=1:history_size=7:report_signal_unsafe=0:verbosity=1\" ./python3.15 ./tsan_setiter_len_race.py \n==1703386==WARNING: ThreadSanitizer: memory layout is incompatible, possibly due to high-entropy ASLR.\nRe-execing with fixed virtual address space.\nN.B. reducing ASLR entropy is preferable.\n==1703386==Installed the sigaction for signal 11\n==1703386==Installed the sigaction for signal 7\n==1703386==Installed the sigaction for signal 8\n***** Running under ThreadSanitizer v3 (pid 1703386) *****\n==================\nWARNING: ThreadSanitizer: data race (pid=1703386)\n Atomic write of size 8 at 0x7fffb4395ce8 by thread T5:\n #0 _Py_atomic_store_ssize_relaxed /home/hyongtao/worksapce/cpython/./Include/cpython/pyatomic_gcc.h:513:3 (python3.15+0x30378c) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #1 set_discard_entry /home/hyongtao/worksapce/cpython/Objects/setobject.c:594:5 (python3.15+0x30378c)\n #2 set_discard_key /home/hyongtao/worksapce/cpython/Objects/setobject.c:630:12 (python3.15+0x30378c)\n #3 set_discard_impl /home/hyongtao/worksapce/cpython/Objects/setobject.c:2616:10 (python3.15+0x30b3c3) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #4 set_discard /home/hyongtao/worksapce/cpython/Objects/clinic/setobject.c.h:502:20 (python3.15+0x30b3c3)\n #5 _PyEval_EvalFrameDefault /home/hyongtao/worksapce/cpython/Python/generated_cases.c.h:4033:35 (python3.15+0x42abe4) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #6 _PyEval_EvalFrame /home/hyongtao/worksapce/cpython/./Include/internal/pycore_ceval.h:118:16 (python3.15+0x41f890) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #7 _PyEval_Vector /home/hyongtao/worksapce/cpython/Python/ceval.c:2092:12 (python3.15+0x41f890)\n #8 _PyFunction_Vectorcall /home/hyongtao/worksapce/cpython/Objects/call.c (python3.15+0x20b85f) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #9 _PyObject_VectorcallTstate /home/hyongtao/worksapce/cpython/./Include/internal/pycore_call.h:136:11 (python3.15+0x20ff36) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #10 method_vectorcall /home/hyongtao/worksapce/cpython/Objects/classobject.c:73:20 (python3.15+0x20ff36)\n #11 _PyObject_VectorcallTstate /home/hyongtao/worksapce/cpython/./Include/internal/pycore_call.h:136:11 (python3.15+0x472d31) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #12 context_run /home/hyongtao/worksapce/cpython/Python/context.c:727:29 (python3.15+0x472d31)\n #13 method_vectorcall_FASTCALL_KEYWORDS /home/hyongtao/worksapce/cpython/Objects/descrobject.c:421:24 (python3.15+0x224ab7) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #14 _PyObject_VectorcallTstate /home/hyongtao/worksapce/cpython/./Include/internal/pycore_call.h:136:11 (python3.15+0x20b1e3) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #15 PyObject_Vectorcall /home/hyongtao/worksapce/cpython/Objects/call.c:327:12 (python3.15+0x20b1e3)\n #16 _Py_VectorCallInstrumentation_StackRefSteal /home/hyongtao/worksapce/cpython/Python/ceval.c:762:11 (python3.15+0x4204bc) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #17 _PyEval_EvalFrameDefault /home/hyongtao/worksapce/cpython/Python/generated_cases.c.h:1809:35 (python3.15+0x426376) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #18 _PyEval_EvalFrame /home/hyongtao/worksapce/cpython/./Include/internal/pycore_ceval.h:118:16 (python3.15+0x41f890) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #19 _PyEval_Vector /home/hyongtao/worksapce/cpython/Python/ceval.c:2092:12 (python3.15+0x41f890)\n #20 _PyFunction_Vectorcall /home/hyongtao/worksapce/cpython/Objects/call.c (python3.15+0x20b85f) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #21 _PyObject_VectorcallTstate /home/hyongtao/worksapce/cpython/./Include/internal/pycore_call.h:136:11 (python3.15+0x20ff36) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #22 method_vectorcall /home/hyongtao/worksapce/cpython/Objects/classobject.c:73:20 (python3.15+0x20ff36)\n #23 _PyVectorcall_Call /home/hyongtao/worksapce/cpython/Objects/call.c:273:16 (python3.15+0x20b4eb) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #24 _PyObject_Call /home/hyongtao/worksapce/cpython/Objects/call.c:348:16 (python3.15+0x20b4eb)\n #25 PyObject_Call /home/hyongtao/worksapce/cpython/Objects/call.c:373:12 (python3.15+0x20b555) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #26 thread_run /home/hyongtao/worksapce/cpython/./Modules/_threadmodule.c:387:21 (python3.15+0x5f12e2) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #27 pythread_wrapper /home/hyongtao/worksapce/cpython/Python/thread_pthread.h:234:5 (python3.15+0x522317) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n\n Previous read of size 8 at 0x7fffb4395ce8 by thread T3:\n #0 setiter_len /home/hyongtao/worksapce/cpython/Objects/setobject.c:1059:58 (python3.15+0x304ce9) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #1 _PyEval_EvalFrameDefault /home/hyongtao/worksapce/cpython/Python/generated_cases.c.h:3935:35 (python3.15+0x42a9d4) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #2 _PyEval_EvalFrame /home/hyongtao/worksapce/cpython/./Include/internal/pycore_ceval.h:118:16 (python3.15+0x41f890) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #3 _PyEval_Vector /home/hyongtao/worksapce/cpython/Python/ceval.c:2092:12 (python3.15+0x41f890)\n #4 _PyFunction_Vectorcall /home/hyongtao/worksapce/cpython/Objects/call.c (python3.15+0x20b85f) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #5 _PyObject_VectorcallTstate /home/hyongtao/worksapce/cpython/./Include/internal/pycore_call.h:136:11 (python3.15+0x20ff36) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #6 method_vectorcall /home/hyongtao/worksapce/cpython/Objects/classobject.c:73:20 (python3.15+0x20ff36)\n #7 _PyObject_VectorcallTstate /home/hyongtao/worksapce/cpython/./Include/internal/pycore_call.h:136:11 (python3.15+0x472d31) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #8 context_run /home/hyongtao/worksapce/cpython/Python/context.c:727:29 (python3.15+0x472d31)\n #9 method_vectorcall_FASTCALL_KEYWORDS /home/hyongtao/worksapce/cpython/Objects/descrobject.c:421:24 (python3.15+0x224ab7) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #10 _PyObject_VectorcallTstate /home/hyongtao/worksapce/cpython/./Include/internal/pycore_call.h:136:11 (python3.15+0x20b1e3) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #11 PyObject_Vectorcall /home/hyongtao/worksapce/cpython/Objects/call.c:327:12 (python3.15+0x20b1e3)\n #12 _Py_VectorCallInstrumentation_StackRefSteal /home/hyongtao/worksapce/cpython/Python/ceval.c:762:11 (python3.15+0x4204bc) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #13 _PyEval_EvalFrameDefault /home/hyongtao/worksapce/cpython/Python/generated_cases.c.h:1809:35 (python3.15+0x426376) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #14 _PyEval_EvalFrame /home/hyongtao/worksapce/cpython/./Include/internal/pycore_ceval.h:118:16 (python3.15+0x41f890) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #15 _PyEval_Vector /home/hyongtao/worksapce/cpython/Python/ceval.c:2092:12 (python3.15+0x41f890)\n #16 _PyFunction_Vectorcall /home/hyongtao/worksapce/cpython/Objects/call.c (python3.15+0x20b85f) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #17 _PyObject_VectorcallTstate /home/hyongtao/worksapce/cpython/./Include/internal/pycore_call.h:136:11 (python3.15+0x20ff36) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #18 method_vectorcall /home/hyongtao/worksapce/cpython/Objects/classobject.c:73:20 (python3.15+0x20ff36)\n #19 _PyVectorcall_Call /home/hyongtao/worksapce/cpython/Objects/call.c:273:16 (python3.15+0x20b4eb) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #20 _PyObject_Call /home/hyongtao/worksapce/cpython/Objects/call.c:348:16 (python3.15+0x20b4eb)\n #21 PyObject_Call /home/hyongtao/worksapce/cpython/Objects/call.c:373:12 (python3.15+0x20b555) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #22 thread_run /home/hyongtao/worksapce/cpython/./Modules/_threadmodule.c:387:21 (python3.15+0x5f12e2) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #23 pythread_wrapper /home/hyongtao/worksapce/cpython/Python/thread_pthread.h:234:5 (python3.15+0x522317) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n\n Thread T5 'Thread-5 (write' (tid=1703392, running) created by main thread at:\n #0 pthread_create \u003cnull> (python3.15+0xf421f) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #1 do_start_joinable_thread /home/hyongtao/worksapce/cpython/Python/thread_pthread.h:281:14 (python3.15+0x521424) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #2 PyThread_start_joinable_thread /home/hyongtao/worksapce/cpython/Python/thread_pthread.h:323:9 (python3.15+0x52123a) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #3 ThreadHandle_start /home/hyongtao/worksapce/cpython/./Modules/_threadmodule.c:474:9 (python3.15+0x5f109a) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #4 do_start_new_thread /home/hyongtao/worksapce/cpython/./Modules/_threadmodule.c:1920:9 (python3.15+0x5f0b3f) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #5 thread_PyThread_start_joinable_thread /home/hyongtao/worksapce/cpython/./Modules/_threadmodule.c:2043:14 (python3.15+0x5efc01) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #6 cfunction_call /home/hyongtao/worksapce/cpython/Objects/methodobject.c:564:18 (python3.15+0x2bab87) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #7 _PyObject_MakeTpCall /home/hyongtao/worksapce/cpython/Objects/call.c:242:18 (python3.15+0x20a68f) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #8 _PyObject_VectorcallTstate /home/hyongtao/worksapce/cpython/./Include/internal/pycore_call.h:134:16 (python3.15+0x20b2a7) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #9 PyObject_Vectorcall /home/hyongtao/worksapce/cpython/Objects/call.c:327:12 (python3.15+0x20b2a7)\n #10 _Py_VectorCall_StackRefSteal /home/hyongtao/worksapce/cpython/Python/ceval.c:720:11 (python3.15+0x41fce9) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #11 _PyEval_EvalFrameDefault /home/hyongtao/worksapce/cpython/Python/generated_cases.c.h:3387:35 (python3.15+0x429c79) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #12 _PyEval_EvalFrame /home/hyongtao/worksapce/cpython/./Include/internal/pycore_ceval.h:118:16 (python3.15+0x41f3b0) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #13 _PyEval_Vector /home/hyongtao/worksapce/cpython/Python/ceval.c:2092:12 (python3.15+0x41f3b0)\n #14 PyEval_EvalCode /home/hyongtao/worksapce/cpython/Python/ceval.c:673:21 (python3.15+0x41f3b0)\n #15 run_eval_code_obj /home/hyongtao/worksapce/cpython/Python/pythonrun.c:1366:12 (python3.15+0x4fe967) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #16 run_mod /home/hyongtao/worksapce/cpython/Python/pythonrun.c:1469:19 (python3.15+0x4fe967)\n #17 pyrun_file /home/hyongtao/worksapce/cpython/Python/pythonrun.c:1294:15 (python3.15+0x4f9d13) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #18 _PyRun_SimpleFileObject /home/hyongtao/worksapce/cpython/Python/pythonrun.c:518:13 (python3.15+0x4f9d13)\n #19 _PyRun_AnyFileObject /home/hyongtao/worksapce/cpython/Python/pythonrun.c:81:15 (python3.15+0x4f9498) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #20 pymain_run_file_obj /home/hyongtao/worksapce/cpython/Modules/main.c:410:15 (python3.15+0x53bedf) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #21 pymain_run_file /home/hyongtao/worksapce/cpython/Modules/main.c:429:15 (python3.15+0x53bedf)\n #22 pymain_run_python /home/hyongtao/worksapce/cpython/Modules/main.c:691:21 (python3.15+0x53b20b) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #23 Py_RunMain /home/hyongtao/worksapce/cpython/Modules/main.c:772:5 (python3.15+0x53b20b)\n #24 pymain_main /home/hyongtao/worksapce/cpython/Modules/main.c:802:12 (python3.15+0x53b778) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #25 Py_BytesMain /home/hyongtao/worksapce/cpython/Modules/main.c:826:12 (python3.15+0x53b7fb) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #26 main /home/hyongtao/worksapce/cpython/./Programs/python.c:15:12 (python3.15+0x17282b) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n\n Thread T3 'Thread-3 (reade' (tid=1703390, running) created by main thread at:\n #0 pthread_create \u003cnull> (python3.15+0xf421f) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #1 do_start_joinable_thread /home/hyongtao/worksapce/cpython/Python/thread_pthread.h:281:14 (python3.15+0x521424) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #2 PyThread_start_joinable_thread /home/hyongtao/worksapce/cpython/Python/thread_pthread.h:323:9 (python3.15+0x52123a) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #3 ThreadHandle_start /home/hyongtao/worksapce/cpython/./Modules/_threadmodule.c:474:9 (python3.15+0x5f109a) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #4 do_start_new_thread /home/hyongtao/worksapce/cpython/./Modules/_threadmodule.c:1920:9 (python3.15+0x5f0b3f) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #5 thread_PyThread_start_joinable_thread /home/hyongtao/worksapce/cpython/./Modules/_threadmodule.c:2043:14 (python3.15+0x5efc01) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #6 cfunction_call /home/hyongtao/worksapce/cpython/Objects/methodobject.c:564:18 (python3.15+0x2bab87) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #7 _PyObject_MakeTpCall /home/hyongtao/worksapce/cpython/Objects/call.c:242:18 (python3.15+0x20a68f) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #8 _PyObject_VectorcallTstate /home/hyongtao/worksapce/cpython/./Include/internal/pycore_call.h:134:16 (python3.15+0x20b2a7) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #9 PyObject_Vectorcall /home/hyongtao/worksapce/cpython/Objects/call.c:327:12 (python3.15+0x20b2a7)\n #10 _Py_VectorCall_StackRefSteal /home/hyongtao/worksapce/cpython/Python/ceval.c:720:11 (python3.15+0x41fce9) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #11 _PyEval_EvalFrameDefault /home/hyongtao/worksapce/cpython/Python/generated_cases.c.h:3387:35 (python3.15+0x429c79) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #12 _PyEval_EvalFrame /home/hyongtao/worksapce/cpython/./Include/internal/pycore_ceval.h:118:16 (python3.15+0x41f3b0) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #13 _PyEval_Vector /home/hyongtao/worksapce/cpython/Python/ceval.c:2092:12 (python3.15+0x41f3b0)\n #14 PyEval_EvalCode /home/hyongtao/worksapce/cpython/Python/ceval.c:673:21 (python3.15+0x41f3b0)\n #15 run_eval_code_obj /home/hyongtao/worksapce/cpython/Python/pythonrun.c:1366:12 (python3.15+0x4fe967) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #16 run_mod /home/hyongtao/worksapce/cpython/Python/pythonrun.c:1469:19 (python3.15+0x4fe967)\n #17 pyrun_file /home/hyongtao/worksapce/cpython/Python/pythonrun.c:1294:15 (python3.15+0x4f9d13) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #18 _PyRun_SimpleFileObject /home/hyongtao/worksapce/cpython/Python/pythonrun.c:518:13 (python3.15+0x4f9d13)\n #19 _PyRun_AnyFileObject /home/hyongtao/worksapce/cpython/Python/pythonrun.c:81:15 (python3.15+0x4f9498) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #20 pymain_run_file_obj /home/hyongtao/worksapce/cpython/Modules/main.c:410:15 (python3.15+0x53bedf) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #21 pymain_run_file /home/hyongtao/worksapce/cpython/Modules/main.c:429:15 (python3.15+0x53bedf)\n #22 pymain_run_python /home/hyongtao/worksapce/cpython/Modules/main.c:691:21 (python3.15+0x53b20b) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #23 Py_RunMain /home/hyongtao/worksapce/cpython/Modules/main.c:772:5 (python3.15+0x53b20b)\n #24 pymain_main /home/hyongtao/worksapce/cpython/Modules/main.c:802:12 (python3.15+0x53b778) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #25 Py_BytesMain /home/hyongtao/worksapce/cpython/Modules/main.c:826:12 (python3.15+0x53b7fb) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n #26 main /home/hyongtao/worksapce/cpython/./Programs/python.c:15:12 (python3.15+0x17282b) (BuildId: 00135b3b874b2f13c2b74122623dcba7b1b9ce4a)\n\nSUMMARY: ThreadSanitizer: data race /home/hyongtao/worksapce/cpython/./Include/cpython/pyatomic_gcc.h:513:3 in _Py_atomic_store_ssize_relaxed\n==================\n\n```\n\n\u003c/details>\n\n### CPython versions tested on:\n\nCPython main branch\n\n### Operating systems tested on:\n\nLinux\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-144357\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/hyongtao-code","@type":"Person","name":"hyongtao-code"},"datePublished":"2026-01-31T03:30:04Z","url":"https://github.com/python/cpython/issues/144356"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:49e6de2a-a801-3217-510a-c41972da32f1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DAD2:27E5CD:3C94A2E:4D6D5C2:6B020210 |
| html-safe-nonce | 9e7623204e6a7819d7500d7f7f3d3ec629375ccef17c7195d5ea91fd6a56f54d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQUQyOjI3RTVDRDozQzk0QTJFOjRENkQ1QzI6NkIwMjAyMTAiLCJ2aXNpdG9yX2lkIjoiNjc3MjMxOTkzNDY2NTA2NDk3NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 4fa576269a3a07c11f13c476d2ab4ad9e4c458fd10db5883e93ae542ff7f681e |
| hovercard-subject-tag | issue:3878257240 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/144356/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ea45185237b88079f5eeb1510bcdc1c5a8a795353cadee465b60187a4babe0d3/python/cpython/issues/144356 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ea45185237b88079f5eeb1510bcdc1c5a8a795353cadee465b60187a4babe0d3/python/cpython/issues/144356 |
| og:image:alt | Bug report Build info $ cd cpython-tsan/bin/ $ ./python3.15 Python 3.15.0a5+ free-threading build (heads/main:96e4cd698a, Jan 31 2026, 11:45:37) [Clang 18.1.3 (1ubuntu1)] on linux Type "help", "cop... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | hyongtao-code |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width