[Bug] TemporaryStorage memory leak (was: RE: [Zope] Zope 2.7.3 Memory Leaks)

John Barham jbarham at gmail.com
Wed Jan 12 10:29:08 EST 2005


Dieter Maurer wrote:

> 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 ran the script on Linux against both Zope 2.7.0 and 2.7.3 and
according to top only some 21 MB of RAM was used up.  (I ran
"bin/zopectl run tempstorebug.py" in the instance home.)  We have a
similar problem w/ Zope leaking memory and our application uses
sessions a fair bit, so better ways to confirm that this patch fixes
the problem would be appreciated.

TIA,

  John


More information about the Zope mailing list