Abort in garbage collector in 2.2.2

Tim Peters tim.one at comcast.net
Fri Nov 1 17:42:00 EST 2002


[x0phe at netscape.net (Christophe) gets an assertion error during gc]
> Any idea what could cause this?

It's an internal error, so please open a bug report on SourceForge.

If you have a reproducible test case, it would also help to try it under
current CVS Python.  There are more asserts in gcmodule under current CVS,
and they may catch the problem closer to its source.  For example, I've seen
this assert trigger in the 2.3 visit_decref():

		assert(gc->gc.gc_refs != 0); /* else refcount was too small */

when buggy code failed to do a required Py_INCREF.  visit_decref() is called
very early in gc, and this helped to nail the problem.  Under 2.2 such a
problem won't be caught during visit_decref; instead gc_refs will "go
negative", and all bets are off after that.





More information about the Python-list mailing list