Memory leak in python-2.2.3 on solaris?

Erwin Dahl edahl at
Tue Nov 4 16:50:41 CET 2003

I have an all python (ie no c code) daemon program that sits in a loop
doing stuff (pinging machinies).  It had been running fine in
python-2.1.3 for over a year.  Last week I upgraded python to 2.2.3
and it started leaking memory very quickly (over 100 pages per loop). 
I fired up a debug version of python-2.2.3 and I see that the object
ref count stays the same across loop iterations.  I also tried 2.3.2
and it had no leak problem.  Now I know that python-2.2.3 isn't the
current version but its what I need as a result of some of the
libraries I'm using.

My questions are:

- is this really a leak in python (or one of its libraries)?

- if gettotalrefcount() stays the same it must be a C level leak,

- if so what is the best way to figure it out? 

I'm on solaris 2.8 and python is built with gcc 3.2.2. The program
doesn't use many libraries the ones that I haven't been able to pull
when debuging are socket and select so I suspect them.


More information about the Python-list mailing list