[Bug] TemporaryStorage memory leak (was: RE: [Zope] Zope 2.7.3 Memory
Leaks)
Dieter Maurer
dieter at handshake.de
Fri Jan 7 16:39:14 EST 2005
Andy Yates wrote at 2005-1-6 16:19 -0600:
> ...
>Can anybody else reproduce these results?
You have been right.
The leak is caused by a bug in
"tempstorage.TemporaryStorage.TemporaryStorage._takeOutGarbage"
It performs the zero refcount check for a child of a deleted
object *before* it has decremented the refcount. As a
consequence, it does not release children of a deleted object.
I attach a script that reproduces the problem in an easier way.
Calling it with "bin/zopectl run" will consume about 200 MB of RAM
for about 5 min.
I also attach a patch.
I will file a bug report.
--
Dieter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tempstorebug.py
Type: application/x-python
Size: 224 bytes
Desc: script to reproduce the memory leak
Url : http://mail.zope.org/pipermail/zope/attachments/20050107/ad543934/tempstorebug.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tempStoreMemLeak.pat
Type: application/x-patch
Size: 952 bytes
Desc: Patch to fix the bug
Url : http://mail.zope.org/pipermail/zope/attachments/20050107/ad543934/tempStoreMemLeak.bin
More information about the Zope
mailing list