René's URL Explorer Experiment


Title: Socket file descriptor races in GIL-enabled build · Issue #132886 · python/cpython · GitHub

Open Graph Title: Socket file descriptor races in GIL-enabled build · Issue #132886 · python/cpython

X Title: Socket file descriptor races in GIL-enabled build · Issue #132886 · python/cpython

Description: Bug report In the free threading build, but not the default GIL-enabled build, the reads and writes sock_fd use relaxed atomics. This can lead to data races because the sock_fd field is read when the GIL is released. cpython/Modules/sock...

Open Graph Description: Bug report In the free threading build, but not the default GIL-enabled build, the reads and writes sock_fd use relaxed atomics. This can lead to data races because the sock_fd field is read when t...

X Description: Bug report In the free threading build, but not the default GIL-enabled build, the reads and writes sock_fd use relaxed atomics. This can lead to data races because the sock_fd field is read when t...

Opengraph URL: https://github.com/python/cpython/issues/132886

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Socket file descriptor races in GIL-enabled build","articleBody":"# Bug report\n\nIn the free threading build, but not the default GIL-enabled build, the reads and writes `sock_fd` use relaxed atomics. \n\nThis can lead to data races because the `sock_fd` field is read when the GIL is released.\n\nhttps://github.com/python/cpython/blob/e1c09fff054ebcb90e72bba25ef7332bcabec92b/Modules/socketmodule.c#L571-L587\n\nhttps://github.com/python/cpython/actions/runs/14630615998/job/41052077715?pr=131174\n\nThread sanitizer:\n\n```\nWARNING: ThreadSanitizer: data race (pid=10596)\n  Read of size 4 at 0x7feeb9bc4470 by thread T32:\n    #0 get_sock_fd /home/runner/work/cpython/cpython/./Modules/socketmodule.c:603:15 (_socket.cpython-314d-x86_64-linux-gnu.so+0x147a2) (BuildId: 5fd9421785689189a09a4eaff953e770708561c7)\n    #1 sock_send_impl /home/runner/work/cpython/cpython/./Modules/socketmodule.c:4568:24 (_socket.cpython-314d-x86_64-linux-gnu.so+0x147a2)\n    #2 sock_call_ex /home/runner/work/cpython/cpython/./Modules/socketmodule.c:10[13](https://github.com/python/cpython/actions/runs/14630615998/job/41052077715?pr=131174#step:14:14):19 (_socket.cpython-314d-x86_64-linux-gnu.so+0x120e0) (BuildId: 5fd9421785689189a09a4eaff953e770708561c7)\n    #3 sock_call /home/runner/work/cpython/cpython/./Modules/socketmodule.c:1065:12 (_socket.cpython-3[14](https://github.com/python/cpython/actions/runs/14630615998/job/41052077715?pr=131174#step:14:15)d-x86_64-linux-gnu.so+0x120e0)\n    #4 sock_send /home/runner/work/cpython/cpython/./Modules/socketmodule.c:4594:9 (_socket.cpython-314d-x86_64-linux-gnu.so+0xf18c) (BuildId: 5fd9421785689189a09a4eaff953e770708561c7)\n    #5 method_vectorcall_VARARGS /home/runner/work/cpython/cpython/Objects/descrobject.c:325:24 (python+0x265e8f) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #6 _PyObject_VectorcallTstate /home/runner/work/cpython/cpython/./Include/internal/pycore_call.h:169:11 (python+0x24db5b) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #7 PyObject_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c:327:12 (python+0x24f340) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #8 _PyEval_EvalFrameDefault /home/runner/work/cpython/cpython/Python/generated_cases.c.h:3886:35 (python+0x47f974) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #9 _PyEval_EvalFrame /home/runner/work/cpython/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x46ab79) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #10 _PyEval_Vector /home/runner/work/cpython/cpython/Python/ceval.c:1967:12 (python+0x46ab79)\n    #11 _PyFunction_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c (python+0x24f82c) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #12 _PyObject_VectorcallTstate /home/runner/work/cpython/cpython/./Include/internal/pycore_call.h:169:11 (python+0x2550cb) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #13 method_vectorcall /home/runner/work/cpython/cpython/Objects/classobject.c:94:18 (python+0x2537c1) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #14 _PyVectorcall_Call /home/runner/work/cpython/cpython/Objects/call.c:273:16 (python+0x24f247) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #[15](https://github.com/python/cpython/actions/runs/14630615998/job/41052077715?pr=131174#step:14:16) _PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:348:16 (python+0x24f458) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #[16](https://github.com/python/cpython/actions/runs/14630615998/job/41052077715?pr=131174#step:14:17) PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:373:12 (python+0x24f657) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #17 _PyEval_EvalFrameDefault /home/runner/work/cpython/cpython/Python/generated_cases.c.h:2475:32 (python+0x477cac) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #18 _PyEval_EvalFrame /home/runner/work/cpython/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x46ab79) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #19 _PyEval_Vector /home/runner/work/cpython/cpython/Python/ceval.c:1967:12 (python+0x46ab79)\n    #20 _PyFunction_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c (python+0x24f82c) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #21 _PyObject_VectorcallTstate /home/runner/work/cpython/cpython/./Include/internal/pycore_call.h:169:11 (python+0x2550cb) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #22 method_vectorcall /home/runner/work/cpython/cpython/Objects/classobject.c:94:18 (python+0x2537c1) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #23 _PyVectorcall_Call /home/runner/work/cpython/cpython/Objects/call.c:273:16 (python+0x24f247) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #24 _PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:348:16 (python+0x24f458) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #25 PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:373:12 (python+0x24f657) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #26 _PyEval_EvalFrameDefault /home/runner/work/cpython/cpython/Python/generated_cases.c.h:2475:32 (python+0x477cac) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #27 _PyEval_EvalFrame /home/runner/work/cpython/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x46ab79) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #28 _PyEval_Vector /home/runner/work/cpython/cpython/Python/ceval.c:1967:12 (python+0x46ab79)\n    #29 _PyFunction_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c (python+0x24f82c) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #30 _PyObject_VectorcallTstate /home/runner/work/cpython/cpython/./Include/internal/pycore_call.h:169:11 (python+0x2550cb) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #31 method_vectorcall /home/runner/work/cpython/cpython/Objects/classobject.c:72:20 (python+0x253745) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #32 _PyObject_VectorcallTstate /home/runner/work/cpython/cpython/./Include/internal/pycore_call.h:169:11 (python+0x4e42d9) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #33 context_run /home/runner/work/cpython/cpython/Python/context.c:728:29 (python+0x4e42d9)\n    #34 _PyEval_EvalFrameDefault /home/runner/work/cpython/cpython/Python/generated_cases.c.h:3551:35 (python+0x47dd02) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #35 _PyEval_EvalFrame /home/runner/work/cpython/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x46ab79) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #40 call_method /home/runner/work/cpython/cpython/Objects/typeobject.c:3006:19 (python+0x362dc3) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #41 slot_tp_call /home/runner/work/cpython/cpython/Objects/typeobject.c:10268:12 (python+0x362dc3)\n    #42 _PyObject_MakeTpCall /home/runner/work/cpython/cpython/Objects/call.c:242:18 (python+0x24e2ba) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #43 _PyObject_VectorcallTstate /home/runner/work/cpython/cpython/./Include/internal/pycore_call.h:167:16 (python+0x24dbbd) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #44 PyObject_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c:327:12 (python+0x24f340) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #45 _PyEval_EvalFrameDefault /home/runner/work/cpython/cpython/Python/generated_cases.c.h:3886:35 (python+0x47f974) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #46 _PyEval_EvalFrame /home/runner/work/cpython/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x46ab79) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #47 _PyEval_Vector /home/runner/work/cpython/cpython/Python/ceval.c:1967:12 (python+0x46ab79)\n    #48 _PyFunction_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c (python+0x24f82c) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #49 _PyObject_VectorcallTstate /home/runner/work/cpython/cpython/./Include/internal/pycore_call.h:169:11 (python+0x2550cb) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #50 method_vectorcall /home/runner/work/cpython/cpython/Objects/classobject.c:94:18 (python+0x2537c1) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #51 _PyVectorcall_Call /home/runner/work/cpython/cpython/Objects/call.c:273:16 (python+0x24f247) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #52 _PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:348:16 (python+0x24f458) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #53 PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:373:12 (python+0x24f657) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #54 _PyEval_EvalFrameDefault /home/runner/work/cpython/cpython/Python/generated_cases.c.h:2475:32 (python+0x477cac) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #55 _PyEval_EvalFrame /home/runner/work/cpython/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x46ab79) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #56 _PyEval_Vector /home/runner/work/cpython/cpython/Python/ceval.c:1967:12 (python+0x46ab79)\n    #57 _PyFunction_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c (python+0x24f82c) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #58 _PyObject_VectorcallDictTstate /home/runner/work/cpython/cpython/Objects/call.c:135:15 (python+0x24de89) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #59 _PyObject_Call_Prepend /home/runner/work/cpython/cpython/Objects/call.c:504:24 (python+0x24fc4d) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #60 call_method /home/runner/work/cpython/cpython/Objects/typeobject.c:3006:19 (python+0x362dc3) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #61 slot_tp_call /home/runner/work/cpython/cpython/Objects/typeobject.c:10268:12 (python+0x362dc3)\n    #62 _PyObject_MakeTpCall /home/runner/work/cpython/cpython/Objects/call.c:242:18 (python+0x24e2ba) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #63 _PyObject_VectorcallTstate /home/runner/work/cpython/cpython/./Include/internal/pycore_call.h:167:16 (python+0x24dbbd) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #64 PyObject_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c:327:12 (python+0x24f340) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #65 _PyEval_EvalFrameDefault /home/runner/work/cpython/cpython/Python/generated_cases.c.h:3886:35 (python+0x47f974) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #66 _PyEval_EvalFrame /home/runner/work/cpython/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x46ab79) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #67 _PyEval_Vector /home/runner/work/cpython/cpython/Python/ceval.c:1967:12 (python+0x46ab79)\n    #68 _PyFunction_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c (python+0x24f82c) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #69 _PyObject_VectorcallTstate /home/runner/work/cpython/cpython/./Include/internal/pycore_call.h:169:11 (python+0x2550cb) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #70 method_vectorcall /home/runner/work/cpython/cpython/Objects/classobject.c:94:18 (python+0x2537c1) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #71 _PyVectorcall_Call /home/runner/work/cpython/cpython/Objects/call.c:273:16 (python+0x24f247) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #72 _PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:348:16 (python+0x24f458) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #73 PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:373:12 (python+0x24f657) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #74 _PyEval_EvalFrameDefault /home/runner/work/cpython/cpython/Python/generated_cases.c.h:2475:32 (python+0x477cac) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #75 _PyEval_EvalFrame /home/runner/work/cpython/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x46ab79) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #76 _PyEval_Vector /home/runner/work/cpython/cpython/Python/ceval.c:1967:12 (python+0x46ab79)\n    #77 _PyFunction_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c (python+0x24f82c) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #78 _PyObject_VectorcallDictTstate /home/runner/work/cpython/cpython/Objects/call.c:135:15 (python+0x24de89) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #79 _PyObject_Call_Prepend /home/runner/work/cpython/cpython/Objects/call.c:504:24 (python+0x24fc4d) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #80 call_method /home/runner/work/cpython/cpython/Objects/typeobject.c:3006:19 (python+0x362dc3) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #81 slot_tp_call /home/runner/work/cpython/cpython/Objects/typeobject.c:10268:12 (python+0x362dc3)\n    #82 _PyObject_MakeTpCall /home/runner/work/cpython/cpython/Objects/call.c:242:18 (python+0x24e2ba) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #83 _PyObject_VectorcallTstate /home/runner/work/cpython/cpython/./Include/internal/pycore_call.h:167:16 (python+0x24dbbd) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #84 PyObject_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c:327:12 (python+0x24f340) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #85 _PyEval_EvalFrameDefault /home/runner/work/cpython/cpython/Python/generated_cases.c.h:1451:35 (python+0x47265b) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #86 _PyEval_EvalFrame /home/runner/work/cpython/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x46ab79) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #87 _PyEval_Vector /home/runner/work/cpython/cpython/Python/ceval.c:1967:12 (python+0x46ab79)\n    #88 PyEval_EvalCode /home/runner/work/cpython/cpython/Python/ceval.c:870:21 (python+0x46a727) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #89 builtin_exec_impl /home/runner/work/cpython/cpython/Python/bltinmodule.c:1158:[17](https://github.com/python/cpython/actions/runs/14630615998/job/41052077715?pr=131174#step:14:18) (python+0x463291) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #90 builtin_exec /home/runner/work/cpython/cpython/Python/clinic/bltinmodule.c.h:568:20 (python+0x463291)\n    #91 cfunction_vectorcall_FASTCALL_KEYWORDS /home/runner/work/cpython/cpython/Objects/methodobject.c:470:24 (python+0x2ef6c7) (BuildId: aaa34bd06c4565b8343ea0751a4b01[18](https://github.com/python/cpython/actions/runs/14630615998/job/41052077715?pr=131174#step:14:19)212c23b3)\n    #92 _PyObject_VectorcallTstate /home/runner/work/cpython/cpython/./Include/internal/pycore_call.h:169:11 (python+0x24db5b) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #93 PyObject_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c:327:12 (python+0x24f340) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #94 _PyEval_EvalFrameDefault /home/runner/work/cpython/cpython/Python/generated_cases.c.h:1451:35 (python+0x47265b) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #95 _PyEval_EvalFrame /home/runner/work/cpython/cpython/./Include/internal/pycore_ceval.h:1[19](https://github.com/python/cpython/actions/runs/14630615998/job/41052077715?pr=131174#step:14:20):16 (python+0x46ab79) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #96 _PyEval_Vector /home/runner/work/cpython/cpython/Python/ceval.c:1967:12 (python+0x46ab79)\n    #97 _PyFunction_Vectorcall /home/runner/work/cpython/cpython/Objects/call.c (python+0x24f82c) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #98 _PyVectorcall_Call /home/runner/work/cpython/cpython/Objects/call.c:273:16 (python+0x24f247) (BuildId: aaa34bd06c4565b8343ea0751a4b0118[21](https://github.com/python/cpython/actions/runs/14630615998/job/41052077715?pr=131174#step:14:22)2c23b3)\n    #99 _PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:348:16 (python+0x24f458) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #100 PyObject_Call /home/runner/work/cpython/cpython/Objects/call.c:373:12 (python+0x24f657) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #101 pymain_run_module /home/runner/work/cpython/cpython/Modules/main.c:345:14 (python+0x5d44b7) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c[23](https://github.com/python/cpython/actions/runs/14630615998/job/41052077715?pr=131174#step:14:24)b3)\n    #102 pymain_run_python /home/runner/work/cpython/cpython/Modules/main.c (python+0x5d3285) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #103 Py_RunMain /home/runner/work/cpython/cpython/Modules/main.c:767:5 (python+0x5d3285)\n    #104 pymain_main /home/runner/work/cpython/cpython/Modules/main.c:797:12 (python+0x5d4369) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #105 Py_BytesMain /home/runner/work/cpython/cpython/Modules/main.c:821:12 (python+0x5d43e9) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n    #106 main /home/runner/work/cpython/cpython/./Programs/python.c:15:12 (python+0x168de0) (BuildId: aaa34bd06c4565b8343ea0751a4b0118212c23b3)\n\nSUMMARY: ThreadSanitizer: data race /home/runner/work/cpython/cpython/./Modules/socketmodule.c:603:15 in get_sock_fd\n==================\nThreadSanitizer: reported 1 warnings\n```\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-133208\n* gh-133683\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/colesbury","@type":"Person","name":"colesbury"},"datePublished":"2025-04-24T17:59:56.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/132886/cpython/issues/132886"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:0d9f4abe-2c50-e907-5d5b-42771500f2fe
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idEE16:23950F:188853F:21C3B3D:6A53E7A6
html-safe-nonce3a1cfb181d6211523ee2b1fe25c8916171a2a637c657eb5b82f4abe84e1d3c3c
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFRTE2OjIzOTUwRjoxODg4NTNGOjIxQzNCM0Q6NkE1M0U3QTYiLCJ2aXNpdG9yX2lkIjoiMzAzMjEzMzQxMzk1NDExOTU5MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac3d4080b80995a8dc1345b87bbfa8783d02e81c8bff156ab4731b4bade9c2eddb
hovercard-subject-tagissue:3018050962
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/132886/issue_layout
twitter:imagehttps://opengraph.githubassets.com/c3393fd5b52751741968caa52e9a276339ab972a0a15194a906518bf5071c061/python/cpython/issues/132886
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/c3393fd5b52751741968caa52e9a276339ab972a0a15194a906518bf5071c061/python/cpython/issues/132886
og:image:altBug report In the free threading build, but not the default GIL-enabled build, the reads and writes sock_fd use relaxed atomics. This can lead to data races because the sock_fd field is read when t...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamecolesbury
hostnamegithub.com
expected-hostnamegithub.com
Noneb9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb
turbo-cache-controlno-preview
go-importgithub.com/python/cpython git https://github.com/python/cpython.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id81598961
octolytics-dimension-repository_nwopython/cpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id81598961
octolytics-dimension-repository_network_root_nwopython/cpython
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release07a982c1d40157c619b364352b704c3ce66bb332
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/issues/132886#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F132886
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F132886
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/issues/132886
Reloadhttps://github.com/python/cpython/issues/132886
Reloadhttps://github.com/python/cpython/issues/132886
Please reload this pagehttps://github.com/python/cpython/issues/132886
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/issues/132886
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 35k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 73.8k https://github.com/login?return_to=%2Fpython%2Fcpython
Code https://github.com/python/cpython
Issues 5k+ https://github.com/python/cpython/issues
Pull requests 2.3k https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security and quality 0 https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
Code https://github.com/python/cpython
Issues https://github.com/python/cpython/issues
Pull requests https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security and quality https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
Socket file descriptor races in GIL-enabled buildhttps://github.com/python/cpython/issues/132886#top
extension-modulesC modules in the Modules dirhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22extension-modules%22
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
https://github.com/colesbury
colesburyhttps://github.com/colesbury
on Apr 24, 2025https://github.com/python/cpython/issues/132886#issue-3018050962
cpython/Modules/socketmodule.chttps://github.com/python/cpython/blob/e1c09fff054ebcb90e72bba25ef7332bcabec92b/Modules/socketmodule.c#L571-L587
e1c09ffhttps://github.com/python/cpython/commit/e1c09fff054ebcb90e72bba25ef7332bcabec92b
https://github.com/python/cpython/actions/runs/14630615998/job/41052077715?pr=131174https://github.com/python/cpython/actions/runs/14630615998/job/41052077715?pr=131174
gh-132886: use relaxed atomics for sock_fd in gil builds #133208https://github.com/python/cpython/pull/133208
[3.14] gh-132886: use relaxed atomics for sock_fd in gil builds in socket module (GH-133208) #133683https://github.com/python/cpython/pull/133683
extension-modulesC modules in the Modules dirhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22extension-modules%22
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.