Author vstinner
Recipients Mark.Shannon, christian.heimes, jdemeyer, lukasz.langa, pablogsal, petr.viktorin, pitrou, vstinner
Date 2019-09-02.21:23:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1567459410.41.0.107027439523.issue38006@roundup.psfhosted.org>
In-reply-to
Content
For the record, here is an annotated traceback of a FreeIPA crash.

PyGC_list_contains() is a hack that I wrote to check if an object was in the unreachable argument of delete_garbage().


(gdb) where
#0  0x0000000000434b78 in _PyFunction_Vectorcall (func=0x7ffff45d5690, stack=0x7fffffffd170, nargsf=1, kwnames=0x0) at Objects/call.c:406

    remove() func=0x7ffff45d5690

    (gdb) p _PyObject_Dump( ((PyFunctionObject*)func)->func_qualname )
    object  : 'WeakValueDictionary.__init__.<locals>.remove'

    (gdb) p PyGC_list_contains(0x7ffff7a2bac0, func)  # was unreachable?
    $8 = 1


#1  0x0000000000433640 in _PyObject_Vectorcall (callable=0x7ffff45d5690, args=0x7fffffffd170, nargsf=1, kwnames=0x0) at ./Include/cpython/abstract.h:127
#2  0x000000000043368b in _PyObject_FastCall (func=0x7ffff45d5690, args=0x7fffffffd170, nargs=1) at ./Include/cpython/abstract.h:147
#3  0x0000000000436ccc in object_vacall (base=0x0, callable=0x7ffff45d5690, vargs=0x7fffffffd1e0) at Objects/call.c:1186
#4  0x000000000043705b in PyObject_CallFunctionObjArgs (callable=0x7ffff45d5690) at Objects/call.c:1259
#5  0x0000000000502280 in handle_callback (ref=0x7ffff447dc90, callback=0x7ffff45d5690) at Objects/weakrefobject.c:877
#6  0x0000000000502403 in PyObject_ClearWeakRefs (object=0x7ffff42c1550) at Objects/weakrefobject.c:922

    (gdb) p object->ob_type->tp_name
    $13 = 0x7ffff6be404b "_cffi_backend.CTypeDescr"
    (gdb) p PyGC_list_contains(0x7ffff7a2bac0, object)  # was unreachable?
    $9 = 0

#7  0x00007ffff6a41abc in ctypedescr_dealloc (ct=0x7ffff42c1550) at c/_cffi_backend.c:401
#8  0x000000000047f1a5 in _Py_Dealloc (op=0x7ffff42c1550) at Objects/object.c:2213
#9  0x00007ffff6a3e825 in _Py_DECREF (filename=<synthetic pointer>, lineno=703, op=<optimized out>) at /usr/include/python3.8/object.h:478
#10 cfield_dealloc (cf=0x7ffff444dc70) at c/_cffi_backend.c:703

    Py_DECREF(cf->cf_type);

    (gdb) p cf->ob_base.ob_type
    $63 = (struct _typeobject *) 0x7ffff6a62460 <CField_Type>
    (gdb) p PyGC_list_contains(0x7ffff7a2bac0, cf)  # was unreachable?
    $14 = 0

#11 0x000000000047f1a5 in _Py_Dealloc (op=0x7ffff444dc70) at Objects/object.c:2213
#12 0x0000000000463af8 in _Py_DECREF (filename=0x6987a0 "./Include/object.h", lineno=541, op=0x7ffff444dc70) at ./Include/object.h:478
#13 0x0000000000463b46 in _Py_XDECREF (op=0x7ffff444dc70) at ./Include/object.h:541
#14 0x00000000004652de in free_keys_object (keys=0x11de780) at Objects/dictobject.c:580
#15 0x0000000000464877 in dictkeys_decref (dk=0x11de780) at Objects/dictobject.c:324
#16 0x00000000004694b0 in dict_dealloc (mp=0x7ffff44a6950) at Objects/dictobject.c:1994

    {'C_Initialize': ..., 'C_CreateObject': ..., 'C_Finalize': ...}

    (gdb) p PyGC_list_contains(0x7ffff7a2bac0, mp)  # was unreachable?
    $16 = 1

#17 0x000000000047f1a5 in _Py_Dealloc (op=0x7ffff44a6950) at Objects/object.c:2213
#18 0x00007ffff6a41b25 in _Py_DECREF (filename=<synthetic pointer>, lineno=541, op=<optimized out>) at /usr/include/python3.8/object.h:478
#19 _Py_XDECREF (op=<optimized out>) at /usr/include/python3.8/object.h:541
#20 ctypedescr_dealloc (ct=0x7ffff42c12d0) at c/_cffi_backend.c:412

    Py_XDECREF(ct->ct_stuff);

    (gdb) p (char*)(((CTypeDescrObject*)ct)->ct_name)
    $38 = 0x7ffff42c1328 "struct _CK_FUNCTION_LIST"

#21 0x000000000047f1a5 in _Py_Dealloc (op=0x7ffff42c12d0) at Objects/object.c:2213
#22 0x000000000048f002 in _Py_DECREF (filename=0x6a2500 "./Include/object.h", lineno=541, op=0x7ffff42c12d0) at ./Include/object.h:478
#23 0x000000000048f02e in _Py_XDECREF (op=0x7ffff42c12d0) at ./Include/object.h:541
#24 0x000000000048fc0a in tupledealloc (op=0x7ffff451e050) at Objects/tupleobject.c:247

    (CTypeDescrObject,)

#25 0x000000000047f1a5 in _Py_Dealloc (op=0x7ffff451e050) at Objects/object.c:2213
#26 0x000000000048f002 in _Py_DECREF (filename=0x6a2500 "./Include/object.h", lineno=541, op=0x7ffff451e050) at ./Include/object.h:478
#27 0x000000000048f02e in _Py_XDECREF (op=0x7ffff451e050) at ./Include/object.h:541
#28 0x000000000048fc0a in tupledealloc (op=0x7ffff48e13c0) at Objects/tupleobject.c:247

    (str, <a tuple>)

#29 0x000000000047f1a5 in _Py_Dealloc (op=0x7ffff48e13c0) at Objects/object.c:2213
#30 0x0000000000491815 in _Py_DECREF (filename=0x6a34bf "Objects/typeobject.c", lineno=1110, op=0x7ffff48e13c0) at ./Include/object.h:478
#31 0x000000000049431d in clear_slots (type=0x8e0330, self=0x7ffff447d9f0) at Objects/typeobject.c:1110
#32 0x0000000000494833 in subtype_dealloc (self=0x7ffff447d9f0) at Objects/typeobject.c:1262

    weakref.KeyedRef

#33 0x000000000047f1a5 in _Py_Dealloc (op=0x7ffff447d9f0) at Objects/object.c:2213
#34 0x0000000000463af8 in _Py_DECREF (filename=0x6987a0 "./Include/object.h", lineno=541, op=0x7ffff447d9f0) at ./Include/object.h:478
#35 0x0000000000463b46 in _Py_XDECREF (op=0x7ffff447d9f0) at ./Include/object.h:541
#36 0x00000000004652de in free_keys_object (keys=0x1209c90) at Objects/dictobject.c:580
#37 0x0000000000464877 in dictkeys_decref (dk=0x1209c90) at Objects/dictobject.c:324
#38 0x00000000004694b0 in dict_dealloc (mp=0x7ffff45d64d0) at Objects/dictobject.c:1994

    WeakValueDictionary.data dict

#39 0x000000000047f1a5 in _Py_Dealloc (op=0x7ffff45d64d0) at Objects/object.c:2213
#40 0x000000000062bb37 in _Py_DECREF (filename=0x745d20 "./Include/object.h", lineno=541, op=0x7ffff45d64d0) at ./Include/object.h:478
#41 0x000000000062bb85 in _Py_XDECREF (op=0x7ffff45d64d0) at ./Include/object.h:541
#42 0x000000000062bf4a in cell_dealloc (op=0x7ffff45d7050) at Objects/cellobject.c:84

    remove() closure contains "d": WeakValueDictionary.data dict

#43 0x000000000047f1a5 in _Py_Dealloc (op=0x7ffff45d7050) at Objects/object.c:2213
#44 0x000000000048f002 in _Py_DECREF (filename=0x6a2500 "./Include/object.h", lineno=541, op=0x7ffff45d7050) at ./Include/object.h:478
#45 0x000000000048f02e in _Py_XDECREF (op=0x7ffff45d7050) at ./Include/object.h:541
#46 0x000000000048fc0a in tupledealloc (op=0x7ffff45d4370) at Objects/tupleobject.c:247
#47 0x000000000047f1a5 in _Py_Dealloc (op=0x7ffff45d4370) at Objects/object.c:2213
#48 0x0000000000449e1b in _Py_DECREF (filename=0x693783 "Objects/funcobject.c", lineno=584, op=0x7ffff45d4370) at ./Include/object.h:478

#49 0x000000000044b730 in func_clear (op=0x7ffff45d5690) at Objects/funcobject.c:584

    remove() func = 0x7ffff45d5690

#50 0x000000000058ebbd in delete_garbage (state=0x7fb798 <_PyRuntime+344>, collectable=0x7fffffffdc10, old=0x7fb7e0 <_PyRuntime+416>) at Modules/gcmodule.c:929

#51 0x000000000058f082 in collect (state=0x7fb798 <_PyRuntime+344>, generation=2, n_collected=0x0, n_uncollectable=0x0, nofail=1) at Modules/gcmodule.c:1106
#52 0x0000000000590861 in _PyGC_CollectNoFail () at Modules/gcmodule.c:1849
#53 0x0000000000542a1e in PyImport_Cleanup () at Python/import.c:541
#54 0x000000000055f8c3 in Py_FinalizeEx () at Python/pylifecycle.c:1226
#55 0x00000000005618d6 in Py_Exit (sts=0) at Python/pylifecycle.c:2248

#56 0x0000000000566726 in handle_system_exit () at Python/pythonrun.c:658
#57 0x000000000056673d in _PyErr_PrintEx (tstate=0x8044e0, set_sys_last_vars=1) at Python/pythonrun.c:668
#58 0x0000000000566a32 in PyErr_PrintEx (set_sys_last_vars=1) at Python/pythonrun.c:755
#59 0x0000000000566a43 in PyErr_Print () at Python/pythonrun.c:761
#60 0x000000000056602a in PyRun_SimpleFileExFlags (fp=0x800370, filename=0x7ffff7a1ff60 "/usr/sbin/ipa-server-install", closeit=1, flags=0x7fffffffe080) at Python/pythonrun.c:434
#61 0x000000000056555b in PyRun_AnyFileExFlags (fp=0x800370, filename=0x7ffff7a1ff60 "/usr/sbin/ipa-server-install", closeit=1, flags=0x7fffffffe080) at Python/pythonrun.c:86
#62 0x000000000042264a in pymain_run_file (config=0x8037e0, cf=0x7fffffffe080) at Modules/main.c:383
#63 0x0000000000422bfd in pymain_run_python (exitcode=0x7fffffffe0cc) at Modules/main.c:567
#64 0x0000000000422cee in Py_RunMain () at Modules/main.c:646
#65 0x0000000000422d68 in pymain_main (args=0x7fffffffe130) at Modules/main.c:676
#66 0x0000000000422de2 in Py_BytesMain (argc=3, argv=0x7fffffffe258) at Modules/main.c:700
#67 0x00000000004217a6 in main (argc=3, argv=0x7fffffffe258) at ./Programs/python.c:16
History
Date User Action Args
2019-09-02 21:23:30vstinnersetrecipients: + vstinner, pitrou, christian.heimes, petr.viktorin, lukasz.langa, Mark.Shannon, jdemeyer, pablogsal
2019-09-02 21:23:30vstinnersetmessageid: <1567459410.41.0.107027439523.issue38006@roundup.psfhosted.org>
2019-09-02 21:23:30vstinnerlinkissue38006 messages
2019-09-02 21:23:29vstinnercreate