Skip to content

Objects/object.c:2276: _PyTrash_thread_destroy_chain: Assertion `tstate->trash_delete_nesting == 1' failed. #98110

Closed
@arcivanov

Description

@arcivanov

Bug report

This is a regression from the previous versions of Python 3.10 - 3.7.

python3.11: Objects/object.c:2276: _PyTrash_thread_destroy_chain: Assertion `tstate->trash_delete_nesting == 1' failed.

(gdb) bt
#0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1  0x00007ff69548ecb3 in __pthread_kill_internal (signo=6, threadid=<optimized out>) at pthread_kill.c:78
#2  0x00007ff69543e9c6 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3  0x00007ff6954287f4 in __GI_abort () at abort.c:79
#4  0x00007ff69542871b in __assert_fail_base (fmt=0x7ff6955bbda0 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x786770 "tstate->trash_delete_nesting == 1", file=0x785d1c "Objects/object.c", line=2276, 
    function=<optimized out>) at assert.c:92
#5  0x00007ff695437576 in __GI___assert_fail (assertion=0x786770 "tstate->trash_delete_nesting == 1", file=0x785d1c "Objects/object.c", line=2276, function=0x786cc0 <__PRETTY_FUNCTION__.3> "_PyTrash_thread_destroy_chain")
    at assert.c:101
#6  0x0000000000549867 in _PyTrash_thread_destroy_chain () at Objects/object.c:2276
#7  0x000000000054992b in _PyTrash_end (tstate=0x9f7e18 <_PyRuntime+166328>) at Objects/object.c:2301
#8  0x000000000055c1eb in tupledealloc (op=0x7ff686941c20) at Objects/tupleobject.c:215
#9  0x0000000000549ba2 in _Py_Dealloc (
    op=((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((0x0, None), 83), None), 55), None), 13), None), 42), None), 70), None), 7), None), 8), None), 51), None), None), ()), (...)), (...)), None), None), 15), None), 64), None), 94), None), 76), None), None), None), None), None), None), 91), None), 41), None), None), None), None), 31), None), 4), None), None), None), 78), None), 79), None), None), None), None), None), 92), None), 39), None), 23), None), 93), None), 68), None), 47), None), 74), None), 84), None), 72), None), 98), None), 61), None), 90), None), None), 99), 33)) at Objects/object.c:2389
#10 0x00007ff6877dbd1d in Py_DECREF (op=<optimized out>) at /home/arcivanov/.pyenv/versions/3.11.0rc2/include/python3.11/object.h:538
#11 __pyx_f_6gevent_17_gevent_cgreenlet_8Greenlet__Greenlet__free (__pyx_v_self=__pyx_v_self@entry=0x7ff686929310) at src/gevent/greenlet.c:14915
#12 0x00007ff6877f0cbf in __pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_42run (__pyx_v_self=0x7ff686929310) at src/gevent/greenlet.c:14741
#13 __pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_43run (__pyx_v_self=<gevent._gevent_cgreenlet.Greenlet at remote 0x7ff686929310>, unused=<optimized out>) at src/gevent/greenlet.c:14521
#14 0x00000000004e036d in _PyObject_VectorcallTstate (tstate=0x9f7e18 <_PyRuntime+166328>, callable=<_cython_3_0_0a11.cython_function_or_method at remote 0x7ff687962e40>, args=0x7ffe49b28330, nargsf=1, kwnames=0x0)
    at ./Include/internal/pycore_call.h:92
#15 0x00000000004e09e6 in method_vectorcall (method=<method at remote 0x7ff6861e5a90>, args=0x9dda90 <_PyRuntime+58928>, nargsf=0, kwnames=0x0) at Objects/classobject.c:67
#16 0x00000000004dcd58 in _PyVectorcall_Call (tstate=0x9f7e18 <_PyRuntime+166328>, func=0x4e088f <method_vectorcall>, callable=<method at remote 0x7ff6861e5a90>, tuple=(), kwargs=0x0) at Objects/call.c:245
#17 0x00000000004dd0a4 in _PyObject_Call (tstate=0x9f7e18 <_PyRuntime+166328>, callable=<method at remote 0x7ff6861e5a90>, args=(), kwargs=0x0) at Objects/call.c:328
#18 0x00000000004dd193 in PyObject_Call (callable=<method at remote 0x7ff6861e5a90>, args=(), kwargs=0x0) at Objects/call.c:355
#19 0x00007ff695605c70 in g_initialstub (mark=<optimized out>) at src/greenlet/greenlet.c:960
#20 0x00007ff695605f1f in g_switch (kwargs=<optimized out>, args=<optimized out>, target=0x7ff686929310) at src/greenlet/greenlet.c:716
#21 g_switch (target=<optimized out>, args=(), kwargs=0x0) at src/greenlet/greenlet.c:678
#22 0x00007ff686e45010 in ?? ()
#23 0x00007ff687a52510 in ?? ()
#24 0x00007ff687a52510 in ?? ()
#25 0x00000000009cf5c0 in _PyRuntime ()
#26 0x00000000009dda98 in _PyRuntime ()
#27 0x0000000000000000 in ?? ()

Your environment

  • CPython versions tested on: 3.11.0rc2
  • Operating system and architecture: Fedora Linux x86_64

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.10only security fixes3.11only security fixes3.12only security fixes3.8 (EOL)end of life3.9only security fixestype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions