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/
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Max Kanat-Alexander wrote: dump_all_ objects( 'meliae. dump') causes this: typeobject. c:2672: type_traverse: Assertion `type->tp_flags & (1L<<9)' failed.
> 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.
>
> python: Objects/
> 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 type->tp_ flags & Py_TPFLAGS_ HEAPTYPE) ;
for heaptypes. */
assert(
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----- enigmail. mozdev. org/
99rwACgkQJdeBCY SNAAOhsgCeMEYH7 QqD/dYZyXz+ LuBr1gXL g/rqnlpA015jntH RC
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://
iEYEARECAAYFAkv
0IoAnjqNSGjuIaT
=+xOy
-----END PGP SIGNATURE-----