[Python-bugs-list] [ python-Bugs-613222 ] memory leaks when importing posix module
noreply@sourceforge.net
noreply@sourceforge.net
Mon, 23 Sep 2002 07:27:00 -0700
Bugs item #613222, was opened at 2002-09-23 10:27
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=613222&group_id=5470
Category: Python Interpreter Core
Group: Python 2.2
Status: Open
Resolution: None
Priority: 5
Submitted By: Neal Norwitz (nnorwitz)
Assigned to: Guido van Rossum (gvanrossum)
Summary: memory leaks when importing posix module
Initial Comment:
The attached program which calls
Py_Initialize/Py_Finalize in a loop demonstrates a
program which grows quite quickly. This bug effects
2.2.1+ and 2.3. valgrind reports that the memory is
still reachable, but it seems like a memory leak and
the process definitely grows.
Compile the program with libpython, and run (./mem-test
100000). Make sure it can import site (which imports
posix module). While the program is running, do a ps
and watch it grow. If import site fails, the process
will not grow.
site.py can be as simple as import posix.
I believe the problem is related to
PyStructSequence_Fields for statfs. But haven't
completely diagnosed the problem. As I learn more, I
will add comments.
To simply importing or not importing site, mem-test
takes an optional 2nd argument which will
enable/disable loading of site.py. ./mem-test 100000 1
will prevent import site.
I hope this is understandable, even though the
description wasn't clear.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=613222&group_id=5470