-
-
Notifications
You must be signed in to change notification settings - Fork 30.6k
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
Use the API C of 'Py-NewInterpreterFromConfig' to exit unexpectedly in multiple threads. #111751
Labels
type-bug
An unexpected behavior, bug, or error
Comments
GDB Debug logsCase1Ensure on sub interpreter: 0x7fff60000cf0
*[13:54:37:138]PyThreadState:0x7fff60066760
Ensure on sub interpreter: 0x7fff9424a060
*[13:54:37:138]PyThreadState:0x7fff942afad0
======= Backtrace: =========
/lib64/libc.so.6(+0x81329)[0x7ffff1946329]
/lib/libpython3.13.so.1.0(+0x16e471)[0x7ffff250f471]
/lib/libpython3.13.so.1.0(PyMem_RawFree+0x46)[0x7ffff2510557]
/lib/libpython3.13.so.1.0(+0x170b93)[0x7ffff2511b93]
/lib/libpython3.13.so.1.0(PyObject_Free+0x46)[0x7ffff25109ed]
/lib/libpython3.13.so.1.0(+0x18bd7f)[0x7ffff252cd7f]
/lib/libpython3.13.so.1.0(_Py_Dealloc+0x29)[0x7ffff250f265]
/lib/libpython3.13.so.1.0(+0x10d08f)[0x7ffff24ae08f]
/lib/libpython3.13.so.1.0(+0x1116af)[0x7ffff24b26af]
/lib/libpython3.13.so.1.0(+0x25402d)[0x7ffff25f502d]
/lib/libpython3.13.so.1.0(+0x254082)[0x7ffff25f5082]
/lib/libpython3.13.so.1.0(_PyEval_EvalFrameDefault+0x4d71)[0x7ffff25e101f]
/lib/libpython3.13.so.1.0(+0x23a080)[0x7ffff25db080]
/lib/libpython3.13.so.1.0(+0x254794)[0x7ffff25f5794]
/lib/libpython3.13.so.1.0(+0x109899)[0x7ffff24aa899]
/lib/libpython3.13.so.1.0(+0x109484)[0x7ffff24aa484]
/lib/libpython3.13.so.1.0(+0x1096cb)[0x7ffff24aa6cb]
/lib/libpython3.13.so.1.0(PyObject_CallObject+0xa2)[0x7ffff24aaa67]
(gdb) bt
#0 0x00007ffff18fb387 in raise () from /lib64/libc.so.6
#1 0x00007ffff18fca78 in abort () from /lib64/libc.so.6
#2 0x00007ffff193df67 in __libc_message () from /lib64/libc.so.6
#3 0x00007ffff1946329 in _int_free () from /lib64/libc.so.6
#4 0x00007ffff250f471 in _PyMem_RawFree (_unused_ctx=0x0, ptr=0x7fff57bcf3c0) at Objects/obmalloc.c:79
#5 0x00007ffff2510557 in PyMem_RawFree (ptr=0x7fff57bcf3c0) at Objects/obmalloc.c:818
#6 0x00007ffff2511b93 in _PyObject_Free (ctx=0x0, p=0x7fff57bcf3c0) at Objects/obmalloc.c:2023
#7 0x00007ffff25109ed in PyObject_Free (ptr=0x7fff57bcf3c0) at Objects/obmalloc.c:963
#8 0x00007ffff252cd7f in object_dealloc (self=0x7fff57bcf3c0) at Objects/typeobject.c:5552
#9 0x00007ffff250f265 in _Py_Dealloc (op=0x7fff57bcf3c0) at Objects/object.c:2858
#10 0x00007ffff24ae08f in Py_DECREF (op=<optimized out>) at ./Include/object.h:870
#11 Py_XDECREF (op=0x7fff57bcf3c0) at ./Include/object.h:963
#12 0x00007ffff24b26af in code_dealloc (co=0x7fff57d12d30) at Objects/codeobject.c:1726
#13 0x00007ffff25f502d in clear_thread_frame (tstate=0x7fff60066760, frame=0x7ffff7e1d3a8) at Python/ceval.c:1504
#14 0x00007ffff25f5082 in _PyEval_FrameClearAndPop (tstate=0x7fff60066760, frame=0x7ffff7e1d3a8) at Python/ceval.c:1530
#15 0x00007ffff25e101f in _PyEval_EvalFrameDefault (tstate=0x7fff60066760, frame=0x7ffff7e1d3a8, throwflag=0)
at Python/generated_cases.c.h:1148
#16 0x00007ffff25db080 in _PyEval_EvalFrame (tstate=0x7fff60066760, frame=0x7ffff7e1d020, throwflag=0)
at ./Include/internal/pycore_ceval.h:113
#17 0x00007ffff25f5794 in _PyEval_Vector (tstate=0x7fff60066760, func=0x7fff57be1440, locals=0x0, args=0x7fff4ffcd618, argcount=1,
kwnames=0x0) at Python/ceval.c:1639
#18 0x00007ffff24aa899 in _PyFunction_Vectorcall (func=0x7fff57be1440, stack=0x7fff4ffcd618, nargsf=1, kwnames=0x0)
at Objects/call.c:413
#19 0x00007ffff24aa484 in _PyVectorcall_Call (tstate=0x7fff60066760, func=0x7ffff24aa822 <_PyFunction_Vectorcall>,
callable=0x7fff57be1440, tuple=0x7fff4ffcd600, kwargs=0x0) at Objects/call.c:273
#20 0x00007ffff24aa6cb in _PyObject_Call (tstate=0x7fff60066760, callable=0x7fff57be1440, args=0x7fff4ffcd600, kwargs=0x0)
at Objects/call.c:348
#21 0x00007ffff24aaa67 in PyObject_CallObject (callable=0x7fff57be1440, args=0x7fff4ffcd600) at Objects/call.c:472 Case2*Ensure on sub interpreter: 0x7fff80000cf0
*[14:01:22:740]PyThreadState:0x7fff80066760
*Ensure on sub interpreter: 0x7fff78000cf0
*[14:01:22:741]PyThreadState:0x7fff78066760
(gdb) bt
#0 0x00007ffff24b77a1 in _PyGCHead_SET_NEXT (gc=<optimized out>, next=<optimized out>) at ./Include/internal/pycore_gc.h:74
#1 _PyObject_GC_UNTRACK (op=<optimized out>) at ./Include/internal/pycore_object.h:358
#2 descr_dealloc (descr=0x7fffa4e2c3b0) at Objects/descrobject.c:24
#3 0x00007ffff25f04e9 in _PyEval_EvalFrameDefault (tstate=0x7fff78066760, frame=0x7ffff7e291f0, throwflag=0)
at Python/generated_cases.c.h:5022
#4 0x00007ffff25db080 in _PyEval_EvalFrame (tstate=0x7fff78066760, frame=0x7ffff7e29020, throwflag=0)
at ./Include/internal/pycore_ceval.h:113
#5 0x00007ffff25f5794 in _PyEval_Vector (tstate=0x7fff78066760, func=0x7fffa4c1d440, locals=0x0, args=0x7fffa4e89618, argcount=1,
kwnames=0x0) at Python/ceval.c:1639
#6 0x00007ffff24aa899 in _PyFunction_Vectorcall (func=0x7fffa4c1d440, stack=0x7fffa4e89618, nargsf=1, kwnames=0x0)
at Objects/call.c:413
#7 0x00007ffff24aa484 in _PyVectorcall_Call (tstate=0x7fff78066760, func=0x7ffff24aa822 <_PyFunction_Vectorcall>,
callable=0x7fffa4c1d440, tuple=0x7fffa4e89600, kwargs=0x0) at Objects/call.c:273
#8 0x00007ffff24aa6cb in _PyObject_Call (tstate=0x7fff78066760, callable=0x7fffa4c1d440, args=0x7fffa4e89600, kwargs=0x0)
at Objects/call.c:348
#9 0x00007ffff24aaa67 in PyObject_CallObject (callable=0x7fffa4c1d440, args=0x7fffa4e89600) at Objects/call.c:472
*Ensure on sub interpreter: 0x7fffa0000cf0
*[ 14:03:44:915]PyThreadState:0x7fffa0066760
*Ensure on sub interpreter: 0x7fff6c000cf0
*[ 14:03:44:915]PyThreadState:0x7fff6c066760
(gdb) bt
#0 0x0000000000000064 in ?? ()
#1 0x00007ffff250ca97 in PyObject_GetAttr (v=0x7fffa4d43920, name=0x7ffff2b3fb10 <_PyRuntime+43920>) at Objects/object.c:1150
#2 0x00007ffff250d387 in _PyObject_GetMethod (obj=0x7fffa4d43920, name=0x7ffff2b3fb10 <_PyRuntime+43920>, method=0x7fffef6c87a0)
at Objects/object.c:1438
#3 0x00007ffff25e70f3 in _PyEval_EvalFrameDefault (tstate=0x7fffa0066760, frame=0x7ffff7fe53a8, throwflag=0)
at Python/generated_cases.c.h:2655
#4 0x00007ffff25db080 in _PyEval_EvalFrame (tstate=0x7fffa0066760, frame=0x7ffff7fe5020, throwflag=0)
at ./Include/internal/pycore_ceval.h:113
#5 0x00007ffff25f5794 in _PyEval_Vector (tstate=0x7fffa0066760, func=0x7fffa4c1d440, locals=0x0, args=0x7fffb2b8d618, argcount=1,
kwnames=0x0) at Python/ceval.c:1639
#6 0x00007ffff24aa899 in _PyFunction_Vectorcall (func=0x7fffa4c1d440, stack=0x7fffb2b8d618, nargsf=1, kwnames=0x0)
at Objects/call.c:413
#7 0x00007ffff24aa484 in _PyVectorcall_Call (tstate=0x7fffa0066760, func=0x7ffff24aa822 <_PyFunction_Vectorcall>,
callable=0x7fffa4c1d440, tuple=0x7fffb2b8d600, kwargs=0x0) at Objects/call.c:273
#8 0x00007ffff24aa6cb in _PyObject_Call (tstate=0x7fffa0066760, callable=0x7fffa4c1d440, args=0x7fffb2b8d600, kwargs=0x0)
at Objects/call.c:348
#9 0x00007ffff24aaa67 in PyObject_CallObject (callable=0x7fffa4c1d440, args=0x7fffb2b8d600) at Objects/call.c:472 Case3*Ensure on sub interpreter: 0x7fff68000cf0
*[ 14:09:29:850]PyThreadState:0x7fff68066760
*Ensure on sub interpreter: 0x7fff50000cf0
*[ 14:09:29:851]PyThreadState:0x7fff50066760
_PyObject_VectorcallTstate (tstate=0x7fff68066760, callable=0x7fffcb36c3b0, args=0x7ffff7e1d398, nargsf=9223372036854775810,
kwnames=0x0) at ./Include/internal/pycore_call.h:138
138 PyTypeObject *tp = Py_TYPE(callable);
(gdb) bt
#0 _PyObject_VectorcallTstate (tstate=0x7fff68066760, callable=0x7fffcb36c3b0, args=0x7ffff7e1d398, nargsf=9223372036854775810,
kwnames=0x0) at ./Include/internal/pycore_call.h:138
#1 0x00007ffff24aa67b in PyObject_Vectorcall (callable=0x7fffcb36c3b0, args=0x7ffff7e1d398, nargsf=9223372036854775810, kwnames=0x0)
at Objects/call.c:327
#2 0x00007ffff25ed14c in _PyEval_EvalFrameDefault (tstate=0x7fff68066760, frame=0x7ffff7e1d1f0, throwflag=0)
at Python/generated_cases.c.h:4265
#3 0x00007ffff25db080 in _PyEval_EvalFrame (tstate=0x7fff68066760, frame=0x7ffff7e1d020, throwflag=0)
at ./Include/internal/pycore_ceval.h:113
#4 0x00007ffff25f5794 in _PyEval_Vector (tstate=0x7fff68066760, func=0x7fffcb155440, locals=0x0, args=0x7fff4ffcd618, argcount=1,
kwnames=0x0) at Python/ceval.c:1639
#5 0x00007ffff24aa899 in _PyFunction_Vectorcall (func=0x7fffcb155440, stack=0x7fff4ffcd618, nargsf=1, kwnames=0x0)
at Objects/call.c:413
#6 0x00007ffff24aa484 in _PyVectorcall_Call (tstate=0x7fff68066760, func=0x7ffff24aa822 <_PyFunction_Vectorcall>,
callable=0x7fffcb155440, tuple=0x7fff4ffcd600, kwargs=0x0) at Objects/call.c:273
#7 0x00007ffff24aa6cb in _PyObject_Call (tstate=0x7fff68066760, callable=0x7fffcb155440, args=0x7fff4ffcd600, kwargs=0x0)
at Objects/call.c:348
#8 0x00007ffff24aaa67 in PyObject_CallObject (callable=0x7fffcb155440, args=0x7fff4ffcd600) at Objects/call.c:472 Case4*Ensure on sub interpreter: 0x7fff94000cf0
*[14:13:13:655]PyThreadState:0x7fff94066760
*Ensure on sub interpreter: 0x7fff90000cf0
*[14:13:13:655]PyThreadState:0x7fff90066760
======= Backtrace: =========
/lib64/libc.so.6(+0x81329)[0x7ffff1946329]
/lib/libpython3.13.so.1.0(+0x16e471)[0x7ffff250f471]
/lib/libpython3.13.so.1.0(PyMem_RawFree+0x46)[0x7ffff2510557]
/lib/libpython3.13.so.1.0(+0x170b93)[0x7ffff2511b93]
/lib/libpython3.13.so.1.0(PyObject_Free+0x46)[0x7ffff25109ed]
/lib/libpython3.13.so.1.0(+0x1b5009)[0x7ffff2556009]
/lib/libpython3.13.so.1.0(_Py_Dealloc+0x29)[0x7ffff250f265]
/lib/libpython3.13.so.1.0(+0x17e4b8)[0x7ffff251f4b8]
/lib/libpython3.13.so.1.0(+0x17ee43)[0x7ffff251fe43]
/lib/libpython3.13.so.1.0(_Py_Dealloc+0x29)[0x7ffff250f265]
/lib/libpython3.13.so.1.0(+0x10d08f)[0x7ffff24ae08f]
/lib/libpython3.13.so.1.0(+0x11167f)[0x7ffff24b267f]
/lib/libpython3.13.so.1.0(_Py_Dealloc+0x29)[0x7ffff250f265]
/lib/libpython3.13.so.1.0(+0x136208)[0x7ffff24d7208]
/lib/libpython3.13.so.1.0(_Py_Dealloc+0x29)[0x7ffff250f265]
/lib/libpython3.13.so.1.0(+0x29864d)[0x7ffff263964d]
/lib/libpython3.13.so.1.0(+0x297f8a)[0x7ffff2638f8a]
/lib/libpython3.13.so.1.0(+0x298514)[0x7ffff2639514]
/lib/libpython3.13.so.1.0(+0x253fe8)[0x7ffff25f4fe8]
/lib/libpython3.13.so.1.0(+0x254082)[0x7ffff25f5082]
/lib/libpython3.13.so.1.0(_PyEval_EvalFrameDefault+0x4d71)[0x7ffff25e101f]
/lib/libpython3.13.so.1.0(+0x23a080)[0x7ffff25db080]
/lib/libpython3.13.so.1.0(+0x254794)[0x7ffff25f5794]
/lib/libpython3.13.so.1.0(+0x109899)[0x7ffff24aa899]
/lib/libpython3.13.so.1.0(+0x109484)[0x7ffff24aa484]
/lib/libpython3.13.so.1.0(+0x1096cb)[0x7ffff24aa6cb]
/lib/libpython3.13.so.1.0(PyObject_CallObject+0xa2)[0x7ffff24aaa67]
(gdb) bt
#0 0x00007ffff18fb387 in raise () from /lib64/libc.so.6
#1 0x00007ffff18fca78 in abort () from /lib64/libc.so.6
#2 0x00007ffff193df67 in __libc_message () from /lib64/libc.so.6
#3 0x00007ffff1946329 in _int_free () from /lib64/libc.so.6
#4 0x00007ffff250f471 in _PyMem_RawFree (_unused_ctx=0x0, ptr=0x7fffb1200870) at Objects/obmalloc.c:79
#5 0x00007ffff2510557 in PyMem_RawFree (ptr=0x7fffb1200870) at Objects/obmalloc.c:818
#6 0x00007ffff2511b93 in _PyObject_Free (ctx=0x0, p=0x7fffb1200870) at Objects/obmalloc.c:2023
#7 0x00007ffff25109ed in PyObject_Free (ptr=0x7fffb1200870) at Objects/obmalloc.c:963
#8 0x00007ffff2556009 in unicode_dealloc (unicode=0x7fffb1200870) at Objects/unicodeobject.c:1599
#9 0x00007ffff250f265 in _Py_Dealloc (op=0x7fffb1200870) at Objects/object.c:2858
#10 0x00007ffff251f4b8 in Py_DECREF (op=<optimized out>) at ./Include/object.h:870
#11 Py_XDECREF (op=0x7fffb1200870) at ./Include/object.h:963
#12 0x00007ffff251fe43 in tupledealloc (op=0x7fffb139f6a0) at Objects/tupleobject.c:208
#13 0x00007ffff250f265 in _Py_Dealloc (op=0x7fffb139f6a0) at Objects/object.c:2858
#14 0x00007ffff24ae08f in Py_DECREF (op=<optimized out>) at ./Include/object.h:870
#15 Py_XDECREF (op=0x7fffb139f6a0) at ./Include/object.h:963
#16 0x00007ffff24b267f in code_dealloc (co=0x7fffb1459fb0) at Objects/codeobject.c:1723
#17 0x00007ffff250f265 in _Py_Dealloc (op=0x7fffb1459fb0) at Objects/object.c:2858
#18 0x00007ffff24d7208 in Py_DECREF (op=<optimized out>) at ./Include/object.h:870
#19 func_dealloc (op=0x7fffb04b9120) at Objects/funcobject.c:929
#20 0x00007ffff250f265 in _Py_Dealloc (op=0x7fffb04b9120) at Objects/object.c:2858
#21 0x00007ffff263964d in Py_DECREF (op=<optimized out>) at ./Include/object.h:870
#22 Py_XDECREF.part.6 (op=0x7fffb04b9120) at ./Include/object.h:963
#23 0x00007ffff2638f8a in Py_XDECREF (op=0x7fffb04b9120) at ./Include/object.h:962
#24 0x00007ffff2639514 in _PyFrame_ClearExceptCode (frame=0x7ffff7e2d378) at Python/frame.c:140
#25 0x00007ffff25f4fe8 in clear_thread_frame (tstate=0x7fff90066760, frame=0x7ffff7e2d378) at Python/ceval.c:1503
#26 0x00007ffff25f5082 in _PyEval_FrameClearAndPop (tstate=0x7fff90066760, frame=0x7ffff7e2d378) at Python/ceval.c:1530
#27 0x00007ffff25e101f in _PyEval_EvalFrameDefault (tstate=0x7fff90066760, frame=0x7ffff7e2d378, throwflag=0)
at Python/generated_cases.c.h:1148
#28 0x00007ffff25db080 in _PyEval_EvalFrame (tstate=0x7fff90066760, frame=0x7ffff7e2d020, throwflag=0)
at ./Include/internal/pycore_ceval.h:113
#29 0x00007ffff25f5794 in _PyEval_Vector (tstate=0x7fff90066760, func=0x7fffb1229440, locals=0x0, args=0x7fffb0491618, argcount=1,
kwnames=0x0) at Python/ceval.c:1639
#30 0x00007ffff24aa899 in _PyFunction_Vectorcall (func=0x7fffb1229440, stack=0x7fffb0491618, nargsf=1, kwnames=0x0)
at Objects/call.c:413
#31 0x00007ffff24aa484 in _PyVectorcall_Call (tstate=0x7fff90066760, func=0x7ffff24aa822 <_PyFunction_Vectorcall>,
callable=0x7fffb1229440, tuple=0x7fffb0491600, kwargs=0x0) at Objects/call.c:273
#32 0x00007ffff24aa6cb in _PyObject_Call (tstate=0x7fff90066760, callable=0x7fffb1229440, args=0x7fffb0491600, kwargs=0x0)
at Objects/call.c:348
#33 0x00007ffff24aaa67 in PyObject_CallObject (callable=0x7fffb1229440, args=0x7fffb0491600) at Objects/call.c:472 |
Compile with --disable-gil |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug report
Bug description:
Use the API C of 'Py-NewInterpreterFromConfig' to exit unexpectedly in multiple threads.
CPython versions tested on:
3.13, CPython main branch
Operating systems tested on:
Linux
The text was updated successfully, but these errors were encountered: