RE: [Bug] TemporaryStorage memory leak (was: RE: [Zope] Zope 2.7.3 Memory Leaks)
Many Thanks! When I run my test Zope seem to reuse the memory now. I still don't understand why it is never released all together, but I can certainly live with reuse. Thanks again for your help. Andy
-----Original Message----- From: Dieter Maurer [mailto:dieter@handshake.de] Sent: Friday, January 07, 2005 3:39 PM To: Andy Yates Cc: zope@zope.org; andreas.jung@haufe.de Subject: [Bug] TemporaryStorage memory leak (was: RE: [Zope] Zope 2.7.3 Memory Leaks)
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
[Andy Yates, to Dieter Maurer]
Many Thanks!
Seconded! Dieter is a very helpful fellow.
When I run my test Zope seem to reuse the memory now. I still don't understand why it is never released all together, but I can certainly live with reuse.
That's the endless discussion of detailed memory-management semantics we already agreed wouldn't be productive <0.9 wink>.
participants (2)
-
Andy Yates -
Tim Peters