[ZCM] [ZC] 1718/ 4 Comment "Persistence versus __del__"
Collector: Zope Bugs, Features,
and Patches ...
zope-coders-admin at zope.org
Mon Mar 7 17:08:29 EST 2005
Issue #1718 Update (Comment) "Persistence versus __del__"
Status Pending, Database/bug medium
To followup, visit:
http://www.zope.org/Collectors/Zope/1718
==============================================================
= Comment - Entry #4 by tim_one on Mar 7, 2005 5:08 pm
Uploaded: "deadlock.py"
- http://www.zope.org/Collectors/Zope/1718/deadlock.py/view
The attached deadlocks reliably (ZODB 3.2.6b1). Alas, while it uses a __del__ method to do so, it's on a non-persistent object: the potential problems are worse than just persistent classes with __del__.
________________________________________
= Comment - Entry #3 by efge on Mar 7, 2005 8:45 am
The March thread continues at
http://mail.zope.org/pipermail/zodb-dev/2005-March/008529.html
For the record I'll paste the traceback here:
File "/opt/zope/lib/python/ZPublisher/Publish.py", line 92, in publish
object=request.traverse(path, validated_hook=validated_hook)
File "/opt/zope/lib/python/ZPublisher/BaseRequest.py", line 231, in traverse
object=object.__bobo_traverse__(request)
File "/opt/zope/lib/python/ZODB/ZApplication.py", line 48, in __bobo_traverse__
conn=db.open(version)
File "/opt/zope/lib/python/ZODB/DB.py", line 504, in open
c._setDB(self)
File "/opt/zope/lib/python/Products/ZODBMountPoint/Mount.py", line 180, in _setDB
conn._setDB(conn._db)
File "/opt/zope/lib/python/Products/ZODBMountPoint/Mount.py", line 176, in _setDB
self._real_setDB(odb)
File "/opt/zope/lib/python/ZODB/Connection.py", line 257, in _setDB
self._flush_invalidations()
File "/opt/zope/lib/python/ZODB/Connection.py", line 552, in _flush_invalidations
self._cache.invalidate(self._invalidated)
File "/appli/zeo/zeocli-192.168.106.6-8080/Products/DICOD/DICODMailingList.py", line 125, in __del__
File "/opt/zope/lib/python/ZODB/Connection.py", line 599, in setstate
invalid = self._is_invalidated(obj)
File "/opt/zope/lib/python/ZODB/Connection.py", line 617, in _is_invalidated
self._inv_lock.acquire()
The __del__ method at line 125 basically just does
foo = self.foo
________________________________________
= Edit - Entry #2 by tim_one on Mar 3, 2005 3:40 pm
Changes: revised title, new comment
Repaired typo in Title.
________________________________________
= Request - Entry #1 by tim_one on Mar 3, 2005 3:36 pm
If a persistent object has a __del__ method, bad things can happen. The combination probably ought to be disallowed upon an attempt to create a persistent class with a __del__ method. More info in this thread:
<http://mail.zope.org/pipermail/zodb-dev/2005-February/008522.html>
Unfortunately, that spills in to March too.
==============================================================
More information about the Zope-Collector-Monitor
mailing list