Bob Halley <hal...@dnspython.org> added the comment:

I rebuilt using --with-pydebug and -O0 -g.  It now triggers an assertion a bit 
earlier.

test_finalize (__main__.WithProcessesTestFinalize) ... Assertion failed: 
(op->ob_refcnt == 0), function _PyTrash_destroy_chain, file Objects/object.c, 
line 2433

(gdb) bt
#0  0x00007fff8791c3d6 in __kill ()
#1  0x00007fff879bc972 in abort ()
#2  0x00007fff879a99b4 in __assert_rtn ()
#3  0x00000001000796e0 in _PyTrash_destroy_chain () at Objects/object.c:2433
#4  0x0000000100053efe in list_dealloc (op=0x10114cc18) at 
Objects/listobject.c:317
#5  0x000000010007905b in _Py_Dealloc (op=0x10114cc18) at Objects/object.c:2228
#6  0x000000010005aee7 in listiter_next (it=0x10160d610) at 
Objects/listobject.c:2917
#7  0x00000001001158c8 in PyEval_EvalFrameEx (f=0x1014c72c0, throwflag=0) at 
Python/ceval.c:2496
[ ... snip ... ]

(gdb) f 3
#3  0x00000001000796e0 in _PyTrash_destroy_chain () at Objects/object.c:2433
2433            assert(op->ob_refcnt == 0);
(gdb) list
2428             * fool Py_DECREF into calling it indirectly, but
2429             * Py_DECREF was already called on this object, and in
2430             * assorted non-release builds calling Py_DECREF again ends
2431             * up distorting allocation statistics.
2432             */
2433            assert(op->ob_refcnt == 0);
2434            ++_PyTrash_delete_nesting;
2435            (*dealloc)(op);
2436            --_PyTrash_delete_nesting;
2437        }

(gdb) p *op
$2 = {
  _ob_next = 0x0, 
  _ob_prev = 0x0, 
  ob_refcnt = 1, 
  ob_type = 0x101441d70
}

(gdb) p *op->ob_type
$4 = {
  _ob_next = 0x10076d798, 
  _ob_prev = 0x101442930, 
  ob_refcnt = 9, 
  ob_type = 0x1001f84e0, 
  ob_size = 0, 
  tp_name = 0x1013e88b4 "Semaphore", 
  tp_basicsize = 48, 
  tp_itemsize = 0, 
  tp_dealloc = 0x10009dd9d <subtype_dealloc>, 
  tp_print = 0, 
  tp_getattr = 0, 
  tp_setattr = 0, 
  tp_compare = 0, 
  tp_repr = 0x1000af4a0 <slot_tp_repr>, 
  tp_as_number = 0x101441f08, 
  tp_as_sequence = 0x101442058, 
  tp_as_mapping = 0x101442040, 
  tp_hash = 0x1000761bc <_Py_HashPointer>, 
  tp_call = 0, 
  tp_str = 0x1000a44e4 <object_str>, 
  tp_getattro = 0x10007728a <PyObject_GenericGetAttr>, 
  tp_setattro = 0x100077676 <PyObject_GenericSetAttr>, 
  tp_as_buffer = 0x1014420a8, 
  tp_flags = 940027, 
  tp_doc = 0x0, 
  tp_traverse = 0x10009da40 <subtype_traverse>, 
  tp_clear = 0x10009dce5 <subtype_clear>, 
  tp_richcompare = 0, 
  tp_weaklistoffset = 40, 
  tp_iter = 0, 
  tp_iternext = 0x100076c13 <_PyObject_NextNotImplemented>, 
  tp_methods = 0x0, 
  tp_members = 0x1014420e8, 
  tp_getset = 0x0, 
  tp_base = 0x1014499f0, 
  tp_dict = 0x101442930, 
  tp_descr_get = 0, 
  tp_descr_set = 0, 
  tp_dictoffset = 32, 
  tp_init = 0x1000b06dd <slot_tp_init>, 
  tp_alloc = 0x10009d7a7 <PyType_GenericAlloc>, 
  tp_new = 0x1000a3f03 <object_new>, 
  tp_free = 0x10016bda4 <PyObject_GC_Del>, 
  tp_is_gc = 0, 
  tp_bases = 0x1010bc840, 
  tp_mro = 0x100744060, 
  tp_cache = 0x0, 
  tp_subclasses = 0x10074d240, 
  tp_weaklist = 0x10075f528, 
  tp_del = 0, 
  tp_version_tag = 194
}

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue10158>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to