Comment 3 for bug 586122

Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 586122] [NEW] scanner core dumps on loggerhead trunk + python 2.6.2

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Max Kanat-Alexander wrote:
> Public bug reported:
>
> I modified my local loggerhead to use bzrlib.breakin, and then did a
> SIGQUIT immediately after loggerhead started up.
>
> Then, doing scanner.dump_all_objects('meliae.dump') causes this:
>
> python: Objects/typeobject.c:2672: type_traverse: Assertion `type->tp_flags & (1L<<9)' failed.
> Aborted (core dumped)

 sigh

I've never seen this before in the wild, but it seems that:

 /* Because of type_is_gc(), the collector only calls this
    for heaptypes. */
 assert(type->tp_flags & Py_TPFLAGS_HEAPTYPE);

I'm using tp_traverse to find referenced objects. I could check that an
object is in the heap first, but I actually make active use of objects
that aren't in GC, but do reference other objects. (StaticTuple)

Maybe this is happening because you are running a debug build of python,
while I've only run with release versions, so I've never seen the assert
trip.

I suppose we could do a specific 'if is PyType and not TPFLAGS_HEAPTYPE'
check...

For now, I would try to avoid that check somehow, if you're just trying
to get info. I've never had problems, to understand why the assertion is
there.

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkv99rwACgkQJdeBCYSNAAOhsgCeMEYH7QqD/dYZyXz+LuBr1gXL
0IoAnjqNSGjuIaTg/rqnlpA015jntHRC
=+xOy
-----END PGP SIGNATURE-----