[ZCM] [ZC] 1799/ 5 Comment "visit_decref: Assertion `gc->gc.gc_refs != 0' failed for acquisition wrapper"

Collector: Zope Bugs, Features, and Patches ... zope-coders-admin at zope.org
Thu Jun 2 21:13:27 EDT 2005


Issue #1799 Update (Comment) "visit_decref: Assertion `gc->gc.gc_refs != 0' failed for acquisition wrapper"
 Status Accepted, Zope/bug+solution medium
To followup, visit:
  http://www.zope.org/Collectors/Zope/1799

==============================================================
= Comment - Entry #5 by tim_one on Jun 2, 2005 9:12 pm

Tres, I already gave it eyeball time -- see my comment just before yours.  The patch looks both necessary and correct to me.
________________________________________
= Assign - Entry #4 by tseaver on Jun 2, 2005 8:54 pm

 Status: Pending => Accepted

 Supporters added: jim, tim_one

This patch need eyeball time from somebody used to the C extension
dance, e.g., Tim or Jim, to whom I am assigning the issue.
________________________________________
= Comment - Entry #3 by tim_one on Jun 2, 2005 7:00 pm

The patch is self-explaining to me ;-)  The old code lied about an object's (`parent`) true refcount while calling back into Python code.  If gc happens to run while that callback is executing, it will die in a debug build with the assertion in the title.  In a release build, it's unpredictable what will happen -- it at best violates an iron invariant that gc relies on (that objects don't lie about their refcounts).

The patch obviously fixes it, too.  I doubt that a test case would be easy to create, since it relies on provoking garbage collection at exactly the right time, and the only predictable symptom of the bug is an assertion failure in a debug build of Python.
________________________________________
= Comment - Entry #2 by efge on Jun 2, 2005 6:51 pm

Thank you for the patch, but no, it is not self-explaining. I for one have no idea what this is supposed to fix.

Please provide a testcase that demonstrates the problem in the current code, so that a unit test can be written.

________________________________________
= Request - Entry #1 by wolk on Jun 2, 2005 6:26 pm


Uploaded:  "acquisition.diff"
 - http://www.zope.org/Collectors/Zope/1799/acquisition.diff/view
patch should be self explaining
==============================================================



More information about the Zope-Collector-Monitor mailing list