Skip to content

gh-132917: fix data race on last_mem in free-threading gc #134692

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

Merged
merged 2 commits into from
May 27, 2025

Conversation

kumaraditya303
Copy link
Contributor

@kumaraditya303 kumaraditya303 commented May 26, 2025

This fixes the data race detected by tsan on last_mem.

WARNING: ThreadSanitizer: data race (pid=21581)
  Write of size 8 at 0x560af591a378 by thread T61:
    #0 gc_collect_internal /home/realkumaraditya/cpython/Python/gc_free_threading.c:2248:30 (python+0x58a73e) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #1 gc_collect_main /home/realkumaraditya/cpython/Python/gc_free_threading.c:2313:5 (python+0x5861e7) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #2 _Py_RunGC /home/realkumaraditya/cpython/Python/gc_free_threading.c:2762:5 (python+0x586d95) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #3 _Py_HandlePending /home/realkumaraditya/cpython/Python/ceval_gil.c:1395:9 (python+0x59b503) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #4 _PyEval_EvalFrameDefault /home/realkumaraditya/cpython/Python/generated_cases.c.h:4138:31 (python+0x4eb89d) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #5 _PyEval_EvalFrame /home/realkumaraditya/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4d228c) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #6 _PyEval_Vector /home/realkumaraditya/cpython/Python/ceval.c:1961:12 (python+0x4d228c)
    #7 _PyFunction_Vectorcall /home/realkumaraditya/cpython/Objects/call.c (python+0x25a73c) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #8 _PyObject_VectorcallTstate /home/realkumaraditya/cpython/./Include/internal/pycore_call.h:169:11 (python+0x7259c0) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #9 partial_vectorcall /home/realkumaraditya/cpython/./Modules/_functoolsmodule.c:414:16 (python+0x72940a) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #10 _PyVectorcall_Call /home/realkumaraditya/cpython/Objects/call.c:273:16 (python+0x25a10d) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #11 _PyObject_Call /home/realkumaraditya/cpython/Objects/call.c:348:16 (python+0x25a3a3) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #12 PyObject_Call /home/realkumaraditya/cpython/Objects/call.c:373:12 (python+0x25a567) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #13 _PyEval_EvalFrameDefault /home/realkumaraditya/cpython/Python/generated_cases.c.h:2654:32 (python+0x4e21b0) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #14 _PyEval_EvalFrame /home/realkumaraditya/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4d228c) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #15 _PyEval_Vector /home/realkumaraditya/cpython/Python/ceval.c:1961:12 (python+0x4d228c)
    #16 _PyFunction_Vectorcall /home/realkumaraditya/cpython/Objects/call.c (python+0x25a73c) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #17 _PyObject_VectorcallTstate /home/realkumaraditya/cpython/./Include/internal/pycore_call.h:169:11 (python+0x2608f0) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #18 method_vectorcall /home/realkumaraditya/cpython/Objects/classobject.c:72:20 (python+0x25ed10) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #19 _PyObject_VectorcallTstate /home/realkumaraditya/cpython/./Include/internal/pycore_call.h:169:11 (python+0x55b9ae) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #20 context_run /home/realkumaraditya/cpython/Python/context.c:728:29 (python+0x55b9ae)
    #21 _PyEval_EvalFrameDefault /home/realkumaraditya/cpython/Python/generated_cases.c.h:3764:35 (python+0x4e95ac) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #22 _PyEval_EvalFrame /home/realkumaraditya/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4d228c) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #23 _PyEval_Vector /home/realkumaraditya/cpython/Python/ceval.c:1961:12 (python+0x4d228c)
    #24 _PyFunction_Vectorcall /home/realkumaraditya/cpython/Objects/call.c (python+0x25a73c) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #25 _PyObject_VectorcallTstate /home/realkumaraditya/cpython/./Include/internal/pycore_call.h:169:11 (python+0x2608f0) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #26 method_vectorcall /home/realkumaraditya/cpython/Objects/classobject.c:72:20 (python+0x25ed10) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #27 _PyVectorcall_Call /home/realkumaraditya/cpython/Objects/call.c:273:16 (python+0x25a10d) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #28 _PyObject_Call /home/realkumaraditya/cpython/Objects/call.c:348:16 (python+0x25a3a3) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #29 PyObject_Call /home/realkumaraditya/cpython/Objects/call.c:373:12 (python+0x25a567) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #30 thread_run /home/realkumaraditya/cpython/./Modules/_threadmodule.c:374:21 (python+0x715ce8) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #31 pythread_wrapper /home/realkumaraditya/cpython/Python/thread_pthread.h:242:5 (python+0x64b62b) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)

  Previous read of size 8 at 0x560af591a378 by thread T57:
    #0 gc_should_collect_mem_usage /home/realkumaraditya/cpython/Python/gc_free_threading.c:2065:36 (python+0x5880d6) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #1 gc_should_collect /home/realkumaraditya/cpython/Python/gc_free_threading.c:2103:12 (python+0x5880d6)
    #2 record_allocation /home/realkumaraditya/cpython/Python/gc_free_threading.c:2120:13 (python+0x586cc8) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #3 _PyObject_GC_Link /home/realkumaraditya/cpython/Python/gc_free_threading.c:2753:5 (python+0x586cc8)
    #4 _PyType_AllocNoTrack /home/realkumaraditya/cpython/Objects/typeobject.c:2357:9 (python+0x393c28) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #5 PyType_GenericAlloc /home/realkumaraditya/cpython/Objects/typeobject.c:2378:21 (python+0x393990) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #6 dict_new /home/realkumaraditya/cpython/Objects/dictobject.c:4852:22 (python+0x301ef5) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #7 type_call /home/realkumaraditya/cpython/Objects/typeobject.c:2291:11 (python+0x39d52a) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #8 _PyObject_MakeTpCall /home/realkumaraditya/cpython/Objects/call.c:242:18 (python+0x258e84) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #9 _PyObject_VectorcallTstate /home/realkumaraditya/cpython/./Include/internal/pycore_call.h:167:16 (python+0x258728) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #10 PyObject_Vectorcall /home/realkumaraditya/cpython/Objects/call.c:327:12 (python+0x25a240) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #11 _PyEval_EvalFrameDefault /home/realkumaraditya/cpython/Python/generated_cases.c.h:4099:35 (python+0x4eb363) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #12 _PyEval_EvalFrame /home/realkumaraditya/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4d228c) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #13 _PyEval_Vector /home/realkumaraditya/cpython/Python/ceval.c:1961:12 (python+0x4d228c)
    #14 _PyFunction_Vectorcall /home/realkumaraditya/cpython/Objects/call.c (python+0x25a73c) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #15 _PyObject_VectorcallTstate /home/realkumaraditya/cpython/./Include/internal/pycore_call.h:169:11 (python+0x7259c0) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #16 partial_vectorcall /home/realkumaraditya/cpython/./Modules/_functoolsmodule.c:414:16 (python+0x72940a) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #17 _PyVectorcall_Call /home/realkumaraditya/cpython/Objects/call.c:273:16 (python+0x25a10d) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #18 _PyObject_Call /home/realkumaraditya/cpython/Objects/call.c:348:16 (python+0x25a3a3) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #19 PyObject_Call /home/realkumaraditya/cpython/Objects/call.c:373:12 (python+0x25a567) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #20 _PyEval_EvalFrameDefault /home/realkumaraditya/cpython/Python/generated_cases.c.h:2654:32 (python+0x4e21b0) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #21 _PyEval_EvalFrame /home/realkumaraditya/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4d228c) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #22 _PyEval_Vector /home/realkumaraditya/cpython/Python/ceval.c:1961:12 (python+0x4d228c)
    #23 _PyFunction_Vectorcall /home/realkumaraditya/cpython/Objects/call.c (python+0x25a73c) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #24 _PyObject_VectorcallTstate /home/realkumaraditya/cpython/./Include/internal/pycore_call.h:169:11 (python+0x2608f0) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #25 method_vectorcall /home/realkumaraditya/cpython/Objects/classobject.c:72:20 (python+0x25ed10) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #26 _PyObject_VectorcallTstate /home/realkumaraditya/cpython/./Include/internal/pycore_call.h:169:11 (python+0x55b9ae) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #27 context_run /home/realkumaraditya/cpython/Python/context.c:728:29 (python+0x55b9ae)
    #28 _PyEval_EvalFrameDefault /home/realkumaraditya/cpython/Python/generated_cases.c.h:3764:35 (python+0x4e95ac) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #29 _PyEval_EvalFrame /home/realkumaraditya/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4d228c) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #30 _PyEval_Vector /home/realkumaraditya/cpython/Python/ceval.c:1961:12 (python+0x4d228c)
    #31 _PyFunction_Vectorcall /home/realkumaraditya/cpython/Objects/call.c (python+0x25a73c) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #32 _PyObject_VectorcallTstate /home/realkumaraditya/cpython/./Include/internal/pycore_call.h:169:11 (python+0x2608f0) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #33 method_vectorcall /home/realkumaraditya/cpython/Objects/classobject.c:72:20 (python+0x25ed10) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #34 _PyVectorcall_Call /home/realkumaraditya/cpython/Objects/call.c:273:16 (python+0x25a10d) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #35 _PyObject_Call /home/realkumaraditya/cpython/Objects/call.c:348:16 (python+0x25a3a3) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #36 PyObject_Call /home/realkumaraditya/cpython/Objects/call.c:373:12 (python+0x25a567) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #37 thread_run /home/realkumaraditya/cpython/./Modules/_threadmodule.c:374:21 (python+0x715ce8) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #38 pythread_wrapper /home/realkumaraditya/cpython/Python/thread_pthread.h:242:5 (python+0x64b62b) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)

  Location is global '_PyRuntime' of size 380160 at 0x560af58f8580 (python+0xa0d378)

  Thread T61 'Thread-61' (tid=22453, running) created by main thread at:
    #0 pthread_create <null> (python+0xe320f) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #1 do_start_joinable_thread /home/realkumaraditya/cpython/Python/thread_pthread.h:289:14 (python+0x64a2cb) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #2 PyThread_start_joinable_thread /home/realkumaraditya/cpython/Python/thread_pthread.h:331:9 (python+0x64a0ea) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #3 ThreadHandle_start /home/realkumaraditya/cpython/./Modules/_threadmodule.c:460:9 (python+0x7157e0) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #4 do_start_new_thread /home/realkumaraditya/cpython/./Modules/_threadmodule.c:1870:9 (python+0x7157e0)
    #5 thread_PyThread_start_joinable_thread /home/realkumaraditya/cpython/./Modules/_threadmodule.c:1985:14 (python+0x713c7f) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #6 cfunction_call /home/realkumaraditya/cpython/Objects/methodobject.c:565:18 (python+0x328630) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #7 _PyObject_MakeTpCall /home/realkumaraditya/cpython/Objects/call.c:242:18 (python+0x258e84) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #8 _PyObject_VectorcallTstate /home/realkumaraditya/cpython/./Include/internal/pycore_call.h:167:16 (python+0x258728) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #9 PyObject_Vectorcall /home/realkumaraditya/cpython/Objects/call.c:327:12 (python+0x25a240) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #10 _PyEval_EvalFrameDefault /home/realkumaraditya/cpython/Python/generated_cases.c.h:3234:35 (python+0x4e6061) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #11 _PyEval_EvalFrame /home/realkumaraditya/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4d228c) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #12 _PyEval_Vector /home/realkumaraditya/cpython/Python/ceval.c:1961:12 (python+0x4d228c)
    #13 _PyFunction_Vectorcall /home/realkumaraditya/cpython/Objects/call.c (python+0x25a73c) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #14 _PyObject_VectorcallTstate /home/realkumaraditya/cpython/./Include/internal/pycore_call.h:169:11 (python+0x2608f0) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #15 method_vectorcall /home/realkumaraditya/cpython/Objects/classobject.c:94:18 (python+0x25ed7d) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #16 _PyVectorcall_Call /home/realkumaraditya/cpython/Objects/call.c:273:16 (python+0x25a10d) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #17 _PyObject_Call /home/realkumaraditya/cpython/Objects/call.c:348:16 (python+0x25a3a3) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #18 PyObject_Call /home/realkumaraditya/cpython/Objects/call.c:373:12 (python+0x25a567) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #19 _PyEval_EvalFrameDefault /home/realkumaraditya/cpython/Python/generated_cases.c.h:2654:32 (python+0x4e21b0) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #20 _PyEval_EvalFrame /home/realkumaraditya/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4d228c) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #21 _PyEval_Vector /home/realkumaraditya/cpython/Python/ceval.c:1961:12 (python+0x4d228c)
    #22 _PyFunction_Vectorcall /home/realkumaraditya/cpython/Objects/call.c (python+0x25a73c) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #23 _PyObject_VectorcallDictTstate /home/realkumaraditya/cpython/Objects/call.c:135:15 (python+0x2589b8) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #24 _PyObject_Call_Prepend /home/realkumaraditya/cpython/Objects/call.c:504:24 (python+0x25aba2) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #25 call_method /home/realkumaraditya/cpython/Objects/typeobject.c:2919:19 (python+0x3af0d7) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #26 slot_tp_call /home/realkumaraditya/cpython/Objects/typeobject.c:10181:12 (python+0x3aeed5) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #27 _PyObject_MakeTpCall /home/realkumaraditya/cpython/Objects/call.c:242:18 (python+0x258e84) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #28 _PyObject_VectorcallTstate /home/realkumaraditya/cpython/./Include/internal/pycore_call.h:167:16 (python+0x258728) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #29 PyObject_Vectorcall /home/realkumaraditya/cpython/Objects/call.c:327:12 (python+0x25a240) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #30 _PyEval_EvalFrameDefault /home/realkumaraditya/cpython/Python/generated_cases.c.h:4099:35 (python+0x4eb363) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #31 _PyEval_EvalFrame /home/realkumaraditya/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4d228c) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #32 _PyEval_Vector /home/realkumaraditya/cpython/Python/ceval.c:1961:12 (python+0x4d228c)
    #33 _PyFunction_Vectorcall /home/realkumaraditya/cpython/Objects/call.c (python+0x25a73c) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #34 _PyObject_VectorcallTstate /home/realkumaraditya/cpython/./Include/internal/pycore_call.h:169:11 (python+0x2608f0) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #35 method_vectorcall /home/realkumaraditya/cpython/Objects/classobject.c:94:18 (python+0x25ed7d) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #36 _PyVectorcall_Call /home/realkumaraditya/cpython/Objects/call.c:273:16 (python+0x25a10d) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #37 _PyObject_Call /home/realkumaraditya/cpython/Objects/call.c:348:16 (python+0x25a3a3) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #38 PyObject_Call /home/realkumaraditya/cpython/Objects/call.c:373:12 (python+0x25a567) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #39 _PyEval_EvalFrameDefault /home/realkumaraditya/cpython/Python/generated_cases.c.h:2654:32 (python+0x4e21b0) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #40 _PyEval_EvalFrame /home/realkumaraditya/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4d228c) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #41 _PyEval_Vector /home/realkumaraditya/cpython/Python/ceval.c:1961:12 (python+0x4d228c)
    #42 _PyFunction_Vectorcall /home/realkumaraditya/cpython/Objects/call.c (python+0x25a73c) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #43 _PyObject_VectorcallDictTstate /home/realkumaraditya/cpython/Objects/call.c:135:15 (python+0x2589b8) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #44 _PyObject_Call_Prepend /home/realkumaraditya/cpython/Objects/call.c:504:24 (python+0x25aba2) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #45 call_method /home/realkumaraditya/cpython/Objects/typeobject.c:2919:19 (python+0x3af0d7) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #46 slot_tp_call /home/realkumaraditya/cpython/Objects/typeobject.c:10181:12 (python+0x3aeed5) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #47 _PyObject_MakeTpCall /home/realkumaraditya/cpython/Objects/call.c:242:18 (python+0x258e84) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #48 _PyObject_VectorcallTstate /home/realkumaraditya/cpython/./Include/internal/pycore_call.h:167:16 (python+0x258728) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #49 PyObject_Vectorcall /home/realkumaraditya/cpython/Objects/call.c:327:12 (python+0x25a240) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #50 _PyEval_EvalFrameDefault /home/realkumaraditya/cpython/Python/generated_cases.c.h:1619:35 (python+0x4dbdb5) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #51 _PyEval_EvalFrame /home/realkumaraditya/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4d228c) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #52 _PyEval_Vector /home/realkumaraditya/cpython/Python/ceval.c:1961:12 (python+0x4d228c)
    #53 _PyFunction_Vectorcall /home/realkumaraditya/cpython/Objects/call.c (python+0x25a73c) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #54 _PyObject_VectorcallTstate /home/realkumaraditya/cpython/./Include/internal/pycore_call.h:169:11 (python+0x2608f0) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #55 method_vectorcall /home/realkumaraditya/cpython/Objects/classobject.c:94:18 (python+0x25ed7d) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #56 _PyVectorcall_Call /home/realkumaraditya/cpython/Objects/call.c:273:16 (python+0x25a10d) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #57 _PyObject_Call /home/realkumaraditya/cpython/Objects/call.c:348:16 (python+0x25a3a3) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #58 PyObject_Call /home/realkumaraditya/cpython/Objects/call.c:373:12 (python+0x25a567) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #59 _PyEval_EvalFrameDefault /home/realkumaraditya/cpython/Python/generated_cases.c.h:2654:32 (python+0x4e21b0) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #60 _PyEval_EvalFrame /home/realkumaraditya/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4d228c) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #61 _PyEval_Vector /home/realkumaraditya/cpython/Python/ceval.c:1961:12 (python+0x4d228c)
    #62 _PyFunction_Vectorcall /home/realkumaraditya/cpython/Objects/call.c (python+0x25a73c) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #63 _PyObject_VectorcallDictTstate /home/realkumaraditya/cpython/Objects/call.c:135:15 (python+0x2589b8) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #64 _PyObject_Call_Prepend /home/realkumaraditya/cpython/Objects/call.c:504:24 (python+0x25aba2) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #65 call_method /home/realkumaraditya/cpython/Objects/typeobject.c:2919:19 (python+0x3af0d7) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #66 slot_tp_call /home/realkumaraditya/cpython/Objects/typeobject.c:10181:12 (python+0x3aeed5) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #67 _PyObject_MakeTpCall /home/realkumaraditya/cpython/Objects/call.c:242:18 (python+0x258e84) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #68 _PyObject_VectorcallTstate /home/realkumaraditya/cpython/./Include/internal/pycore_call.h:167:16 (python+0x258728) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #69 PyObject_Vectorcall /home/realkumaraditya/cpython/Objects/call.c:327:12 (python+0x25a240) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #70 _PyEval_EvalFrameDefault /home/realkumaraditya/cpython/Python/generated_cases.c.h:1619:35 (python+0x4dbdb5) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #71 _PyEval_EvalFrame /home/realkumaraditya/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4d228c) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #72 _PyEval_Vector /home/realkumaraditya/cpython/Python/ceval.c:1961:12 (python+0x4d228c)
    #73 PyEval_EvalCode /home/realkumaraditya/cpython/Python/ceval.c:853:21 (python+0x4d1b46) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #74 builtin_exec_impl /home/realkumaraditya/cpython/Python/bltinmodule.c:1156:17 (python+0x4c8f26) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #75 builtin_exec /home/realkumaraditya/cpython/Python/clinic/bltinmodule.c.h:568:20 (python+0x4c8f26)
    #76 cfunction_vectorcall_FASTCALL_KEYWORDS /home/realkumaraditya/cpython/Objects/methodobject.c:466:24 (python+0x327157) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #77 _PyObject_VectorcallTstate /home/realkumaraditya/cpython/./Include/internal/pycore_call.h:169:11 (python+0x258700) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #78 PyObject_Vectorcall /home/realkumaraditya/cpython/Objects/call.c:327:12 (python+0x25a240) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #79 _PyEval_EvalFrameDefault /home/realkumaraditya/cpython/Python/generated_cases.c.h:1619:35 (python+0x4dbdb5) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #80 _PyEval_EvalFrame /home/realkumaraditya/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4d228c) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #81 _PyEval_Vector /home/realkumaraditya/cpython/Python/ceval.c:1961:12 (python+0x4d228c)
    #82 _PyFunction_Vectorcall /home/realkumaraditya/cpython/Objects/call.c (python+0x25a73c) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #83 _PyVectorcall_Call /home/realkumaraditya/cpython/Objects/call.c:273:16 (python+0x25a10d) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #84 _PyObject_Call /home/realkumaraditya/cpython/Objects/call.c:348:16 (python+0x25a3a3) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #85 PyObject_Call /home/realkumaraditya/cpython/Objects/call.c:373:12 (python+0x25a567) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #86 pymain_run_module /home/realkumaraditya/cpython/Modules/main.c:353:14 (python+0x66ad5e) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #87 pymain_run_python /home/realkumaraditya/cpython/Modules/main.c (python+0x66a3d1) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #88 Py_RunMain /home/realkumaraditya/cpython/Modules/main.c:775:5 (python+0x66a3d1)
    #89 pymain_main /home/realkumaraditya/cpython/Modules/main.c:805:12 (python+0x66ab59) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #90 Py_BytesMain /home/realkumaraditya/cpython/Modules/main.c:829:12 (python+0x66abd9) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #91 main /home/realkumaraditya/cpython/./Programs/python.c:15:12 (python+0x161820) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)

  Thread T57 'Thread-57' (tid=22445, running) created by main thread at:
    #0 pthread_create <null> (python+0xe320f) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #1 do_start_joinable_thread /home/realkumaraditya/cpython/Python/thread_pthread.h:289:14 (python+0x64a2cb) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #2 PyThread_start_joinable_thread /home/realkumaraditya/cpython/Python/thread_pthread.h:331:9 (python+0x64a0ea) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #3 ThreadHandle_start /home/realkumaraditya/cpython/./Modules/_threadmodule.c:460:9 (python+0x7157e0) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #4 do_start_new_thread /home/realkumaraditya/cpython/./Modules/_threadmodule.c:1870:9 (python+0x7157e0)
    #5 thread_PyThread_start_joinable_thread /home/realkumaraditya/cpython/./Modules/_threadmodule.c:1985:14 (python+0x713c7f) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #6 cfunction_call /home/realkumaraditya/cpython/Objects/methodobject.c:565:18 (python+0x328630) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #7 _PyObject_MakeTpCall /home/realkumaraditya/cpython/Objects/call.c:242:18 (python+0x258e84) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #8 _PyObject_VectorcallTstate /home/realkumaraditya/cpython/./Include/internal/pycore_call.h:167:16 (python+0x258728) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #9 PyObject_Vectorcall /home/realkumaraditya/cpython/Objects/call.c:327:12 (python+0x25a240) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #10 _PyEval_EvalFrameDefault /home/realkumaraditya/cpython/Python/generated_cases.c.h:3234:35 (python+0x4e6061) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #11 _PyEval_EvalFrame /home/realkumaraditya/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4d228c) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #12 _PyEval_Vector /home/realkumaraditya/cpython/Python/ceval.c:1961:12 (python+0x4d228c)
    #13 _PyFunction_Vectorcall /home/realkumaraditya/cpython/Objects/call.c (python+0x25a73c) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #14 _PyObject_VectorcallTstate /home/realkumaraditya/cpython/./Include/internal/pycore_call.h:169:11 (python+0x2608f0) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #15 method_vectorcall /home/realkumaraditya/cpython/Objects/classobject.c:94:18 (python+0x25ed7d) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #16 _PyVectorcall_Call /home/realkumaraditya/cpython/Objects/call.c:273:16 (python+0x25a10d) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #17 _PyObject_Call /home/realkumaraditya/cpython/Objects/call.c:348:16 (python+0x25a3a3) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #18 PyObject_Call /home/realkumaraditya/cpython/Objects/call.c:373:12 (python+0x25a567) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #19 _PyEval_EvalFrameDefault /home/realkumaraditya/cpython/Python/generated_cases.c.h:2654:32 (python+0x4e21b0) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #20 _PyEval_EvalFrame /home/realkumaraditya/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4d228c) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #21 _PyEval_Vector /home/realkumaraditya/cpython/Python/ceval.c:1961:12 (python+0x4d228c)
    #22 _PyFunction_Vectorcall /home/realkumaraditya/cpython/Objects/call.c (python+0x25a73c) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #23 _PyObject_VectorcallDictTstate /home/realkumaraditya/cpython/Objects/call.c:135:15 (python+0x2589b8) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #24 _PyObject_Call_Prepend /home/realkumaraditya/cpython/Objects/call.c:504:24 (python+0x25aba2) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #25 call_method /home/realkumaraditya/cpython/Objects/typeobject.c:2919:19 (python+0x3af0d7) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #26 slot_tp_call /home/realkumaraditya/cpython/Objects/typeobject.c:10181:12 (python+0x3aeed5) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #27 _PyObject_MakeTpCall /home/realkumaraditya/cpython/Objects/call.c:242:18 (python+0x258e84) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #28 _PyObject_VectorcallTstate /home/realkumaraditya/cpython/./Include/internal/pycore_call.h:167:16 (python+0x258728) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #29 PyObject_Vectorcall /home/realkumaraditya/cpython/Objects/call.c:327:12 (python+0x25a240) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #30 _PyEval_EvalFrameDefault /home/realkumaraditya/cpython/Python/generated_cases.c.h:4099:35 (python+0x4eb363) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #31 _PyEval_EvalFrame /home/realkumaraditya/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4d228c) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #32 _PyEval_Vector /home/realkumaraditya/cpython/Python/ceval.c:1961:12 (python+0x4d228c)
    #33 _PyFunction_Vectorcall /home/realkumaraditya/cpython/Objects/call.c (python+0x25a73c) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #34 _PyObject_VectorcallTstate /home/realkumaraditya/cpython/./Include/internal/pycore_call.h:169:11 (python+0x2608f0) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #35 method_vectorcall /home/realkumaraditya/cpython/Objects/classobject.c:94:18 (python+0x25ed7d) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #36 _PyVectorcall_Call /home/realkumaraditya/cpython/Objects/call.c:273:16 (python+0x25a10d) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #37 _PyObject_Call /home/realkumaraditya/cpython/Objects/call.c:348:16 (python+0x25a3a3) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #38 PyObject_Call /home/realkumaraditya/cpython/Objects/call.c:373:12 (python+0x25a567) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #39 _PyEval_EvalFrameDefault /home/realkumaraditya/cpython/Python/generated_cases.c.h:2654:32 (python+0x4e21b0) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #40 _PyEval_EvalFrame /home/realkumaraditya/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4d228c) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #41 _PyEval_Vector /home/realkumaraditya/cpython/Python/ceval.c:1961:12 (python+0x4d228c)
    #42 _PyFunction_Vectorcall /home/realkumaraditya/cpython/Objects/call.c (python+0x25a73c) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #43 _PyObject_VectorcallDictTstate /home/realkumaraditya/cpython/Objects/call.c:135:15 (python+0x2589b8) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #44 _PyObject_Call_Prepend /home/realkumaraditya/cpython/Objects/call.c:504:24 (python+0x25aba2) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #45 call_method /home/realkumaraditya/cpython/Objects/typeobject.c:2919:19 (python+0x3af0d7) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #46 slot_tp_call /home/realkumaraditya/cpython/Objects/typeobject.c:10181:12 (python+0x3aeed5) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #47 _PyObject_MakeTpCall /home/realkumaraditya/cpython/Objects/call.c:242:18 (python+0x258e84) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #48 _PyObject_VectorcallTstate /home/realkumaraditya/cpython/./Include/internal/pycore_call.h:167:16 (python+0x258728) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #49 PyObject_Vectorcall /home/realkumaraditya/cpython/Objects/call.c:327:12 (python+0x25a240) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #50 _PyEval_EvalFrameDefault /home/realkumaraditya/cpython/Python/generated_cases.c.h:1619:35 (python+0x4dbdb5) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #51 _PyEval_EvalFrame /home/realkumaraditya/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4d228c) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #52 _PyEval_Vector /home/realkumaraditya/cpython/Python/ceval.c:1961:12 (python+0x4d228c)
    #53 _PyFunction_Vectorcall /home/realkumaraditya/cpython/Objects/call.c (python+0x25a73c) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #54 _PyObject_VectorcallTstate /home/realkumaraditya/cpython/./Include/internal/pycore_call.h:169:11 (python+0x2608f0) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #55 method_vectorcall /home/realkumaraditya/cpython/Objects/classobject.c:94:18 (python+0x25ed7d) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #56 _PyVectorcall_Call /home/realkumaraditya/cpython/Objects/call.c:273:16 (python+0x25a10d) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #57 _PyObject_Call /home/realkumaraditya/cpython/Objects/call.c:348:16 (python+0x25a3a3) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #58 PyObject_Call /home/realkumaraditya/cpython/Objects/call.c:373:12 (python+0x25a567) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #59 _PyEval_EvalFrameDefault /home/realkumaraditya/cpython/Python/generated_cases.c.h:2654:32 (python+0x4e21b0) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #60 _PyEval_EvalFrame /home/realkumaraditya/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4d228c) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #61 _PyEval_Vector /home/realkumaraditya/cpython/Python/ceval.c:1961:12 (python+0x4d228c)
    #62 _PyFunction_Vectorcall /home/realkumaraditya/cpython/Objects/call.c (python+0x25a73c) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #63 _PyObject_VectorcallDictTstate /home/realkumaraditya/cpython/Objects/call.c:135:15 (python+0x2589b8) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #64 _PyObject_Call_Prepend /home/realkumaraditya/cpython/Objects/call.c:504:24 (python+0x25aba2) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #65 call_method /home/realkumaraditya/cpython/Objects/typeobject.c:2919:19 (python+0x3af0d7) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #66 slot_tp_call /home/realkumaraditya/cpython/Objects/typeobject.c:10181:12 (python+0x3aeed5) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #67 _PyObject_MakeTpCall /home/realkumaraditya/cpython/Objects/call.c:242:18 (python+0x258e84) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #68 _PyObject_VectorcallTstate /home/realkumaraditya/cpython/./Include/internal/pycore_call.h:167:16 (python+0x258728) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #69 PyObject_Vectorcall /home/realkumaraditya/cpython/Objects/call.c:327:12 (python+0x25a240) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #70 _PyEval_EvalFrameDefault /home/realkumaraditya/cpython/Python/generated_cases.c.h:1619:35 (python+0x4dbdb5) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #71 _PyEval_EvalFrame /home/realkumaraditya/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4d228c) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #72 _PyEval_Vector /home/realkumaraditya/cpython/Python/ceval.c:1961:12 (python+0x4d228c)
    #73 PyEval_EvalCode /home/realkumaraditya/cpython/Python/ceval.c:853:21 (python+0x4d1b46) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #74 builtin_exec_impl /home/realkumaraditya/cpython/Python/bltinmodule.c:1156:17 (python+0x4c8f26) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #75 builtin_exec /home/realkumaraditya/cpython/Python/clinic/bltinmodule.c.h:568:20 (python+0x4c8f26)
    #76 cfunction_vectorcall_FASTCALL_KEYWORDS /home/realkumaraditya/cpython/Objects/methodobject.c:466:24 (python+0x327157) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #77 _PyObject_VectorcallTstate /home/realkumaraditya/cpython/./Include/internal/pycore_call.h:169:11 (python+0x258700) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #78 PyObject_Vectorcall /home/realkumaraditya/cpython/Objects/call.c:327:12 (python+0x25a240) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #79 _PyEval_EvalFrameDefault /home/realkumaraditya/cpython/Python/generated_cases.c.h:1619:35 (python+0x4dbdb5) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #80 _PyEval_EvalFrame /home/realkumaraditya/cpython/./Include/internal/pycore_ceval.h:119:16 (python+0x4d228c) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #81 _PyEval_Vector /home/realkumaraditya/cpython/Python/ceval.c:1961:12 (python+0x4d228c)
    #82 _PyFunction_Vectorcall /home/realkumaraditya/cpython/Objects/call.c (python+0x25a73c) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #83 _PyVectorcall_Call /home/realkumaraditya/cpython/Objects/call.c:273:16 (python+0x25a10d) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #84 _PyObject_Call /home/realkumaraditya/cpython/Objects/call.c:348:16 (python+0x25a3a3) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #85 PyObject_Call /home/realkumaraditya/cpython/Objects/call.c:373:12 (python+0x25a567) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #86 pymain_run_module /home/realkumaraditya/cpython/Modules/main.c:353:14 (python+0x66ad5e) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #87 pymain_run_python /home/realkumaraditya/cpython/Modules/main.c (python+0x66a3d1) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #88 Py_RunMain /home/realkumaraditya/cpython/Modules/main.c:775:5 (python+0x66a3d1)
    #89 pymain_main /home/realkumaraditya/cpython/Modules/main.c:805:12 (python+0x66ab59) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #90 Py_BytesMain /home/realkumaraditya/cpython/Modules/main.c:829:12 (python+0x66abd9) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)
    #91 main /home/realkumaraditya/cpython/./Programs/python.c:15:12 (python+0x161820) (BuildId: b9e73c5fd134c5c3be2de598477726a304b632de)

SUMMARY: ThreadSanitizer: data race /home/realkumaraditya/cpython/Python/gc_free_threading.c:2248:30 in gc_collect_internal

@kumaraditya303 kumaraditya303 merged commit ac539e7 into python:main May 27, 2025
40 checks passed
@miss-islington-app
Copy link

Thanks @kumaraditya303 for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

@kumaraditya303 kumaraditya303 deleted the gc-ft branch May 27, 2025 17:12
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 27, 2025
@bedevere-app
Copy link

bedevere-app bot commented May 27, 2025

GH-134802 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label May 27, 2025
kumaraditya303 added a commit that referenced this pull request May 27, 2025
…H-134692) (#134802)

gh-132917: fix data race on `last_mem` in free-threading gc  (GH-134692)
(cherry picked from commit ac539e7)

Co-authored-by: Kumar Aditya <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants