[Python-Dev] RE: CVS Python is unstable
Tim Peters
tim.one@home.com
Fri, 23 Mar 2001 00:56:05 -0500
More info on the debug-mode
test_weakref test_xmllib
blowup in gc_list_append, and with the .pyc files already there.
While running test_weakref, we call collect() once.
Ditto while running test_xmllib: that's when it blows up.
collect_generations() is here (***):
else {
generation = 0;
collections0++;
if (generation0.gc_next != &generation0) {
*** n = collect(&generation0, &generation1);
}
}
collect() is here:
gc_list_init(&reachable);
move_roots(young, &reachable);
*** move_root_reachable(&reachable);
move_root_reachable is here:
*** (void) traverse(op,
(visitproc)visit_reachable,
(void *)reachable);
And that's really calling dict_traverse, which is iterating over the dict.
At blowup time, the dict key is of PyString_Type, with value "ref3", and so
presumably left over from test_weakref. The dict value is of
PyWeakProxy_Type, has a refcount of 2, and has
wr_object pointing to Py_NoneStruct
wr_callback NULL
hash 0xffffffff
wr_prev NULL
wr_next NULL
It's dying while calling visit() (really visit_reachable) on the latter.
Inside visit_reachable, we have:
if (gc && gc->gc_refs != GC_MOVED) {
and that's interesting too, because gc->gc_refs is 0xcdcdcdcd, which is the
MS debug-mode "clean landfill" value: freshly malloc'ed memory is filled
with 0xcd bytes (so gc->gc_refs is uninitialized trash).
My conclusion: it's really hosed. Take it away, Neil <wink>!