[Python-bugs-list] [ python-Bugs-494320 ] Memory leaks in 2.2c1?

noreply@sourceforge.net noreply@sourceforge.net
Mon, 17 Dec 2001 13:30:14 -0800


Bugs item #494320, was opened at 2001-12-17 13:02
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=494320&group_id=5470

Category: Python Interpreter Core
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Ben Escoto (bescoto)
Assigned to: Nobody/Anonymous (nobody)
Summary: Memory leaks in 2.2c1?

Initial Comment:
Sorry, this won't be a very good bug report, but
perhaps you can tell me how to make it better.  I wrote
a little python project (rdiff-backup  at
http://www.stanford.edu/~bescoto/rdiff-backup).  On my
computer it takes up about 7MB of memory even for large
datasets, but several users have complained that it
takes up so much memory on their systems (hundreds of
MB) it is totally unusable.

I suspect the problem is a memory leak in Python, but
the only way I know of isolating the problem is pretty
long, and none of the users affected know Python.  I
can't have them try an earlier version because the
program depends on generators extensively.

So, any advice?  Do you think the problem could be in
python?  How could I go about trying to replicate this
error?  Of course, if I end up finding it is python,
I'll try to submit a code snippet short enough to be
helpful to you guys...


----------------------------------------------------------------------

>Comment By: Ben Escoto (bescoto)
Date: 2001-12-17 13:30

Message:
Logged In: YES 
user_id=218965

I had been following some of the memory leak bugs, and had
hoped that an upgrade to 2.2c1 would fix things.  But I
asked the affected users to upgrade, and at least one of
them claims to have the same error with 2.2c1 (others
haven't tried upgrading yet).

I might be able to get more information out of them, but
only if the procedure is relatively painless..


----------------------------------------------------------------------

Comment By: Guido van Rossum (gvanrossum)
Date: 2001-12-17 13:22

Message:
Logged In: YES 
user_id=6380

Surely it could be Python.  You're using all the latest
features (nested scopes and generators, class and static
methods, ...). We're not *aware* of current leaks (we
stamped out a bunch a couple of weeks ago) but there
probably are some. It's also possible that you are creating
cycles that the garbage collector doesn't find (they would
have to involve types that don't support GC; fortunately you
don't use __del__ or __slots__).

Are you sure they aren't using it with previous 2.2 beta
versions? Some of the plugged leaks were pretty severe.

----------------------------------------------------------------------

Comment By: M.-A. Lemburg (lemburg)
Date: 2001-12-17 13:17

Message:
Logged In: YES 
user_id=38388

Since you are using
* nested scopes
* static methods
and
* generators
I'd suggest to first try to find the group of features that's causing the problem.

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=494320&group_id=5470