gc assertion failure
Todd Miller
jmiller at stsci.edu
Wed Oct 29 14:20:30 EST 2003
Michael Hudson wrote:
> Todd Miller <jmiller at stsci.edu> writes:
>
>
>>I recently discovered an assertion failure in the Python garbage
>>collection system when scripts using our C extension (numarray)
>>exit. The assertion is activated for Pythons configured using
>>--with-pydebug. I have a feeling I may be doing something wrong with
>>garbage collection support for some of our c types, but I'm not sure
>>exactly what.
>>
>>Here is the assertion output:
>>
>>python: Modules/gcmodule.c:231: visit_decref: Assertion
>>`gc->gc.gc_refs != 0' failed.
>>Abort (core dumped)
>>
>>
>>Here's the traceback from gdb:
>
>
> [snip]
>
>
>>Can anyone give me any insight into what needs fixing?
>
>
> Oh good grief, it could be anything (I think).
Sorry...
I have two theories myself:
1) I need to implement explicit support for GC for some of the numarray
c types. I was hoping to avoid this by virtue of the unlikeliness of
reference cycles in the types in question.
2) There are other reference counting errors in numarray which are being
exposed during gc. In particular, it appears the tuple type is being
traversed when the assertion fails.
> Are you using the very latest version of Python?
This was Python-2.3.2.
>
> Cheers,
> mwh
>
Thanks,
Todd
More information about the Python-list
mailing list