[Zope-Coders] BTrees memory leak?

Jeremy Hylton jeremy@zope.com
Wed, 31 Oct 2001 11:22:09 -0500 (EST)


>>>>> "MTK" == Matthew T Kromer <matt@zope.com> writes:

  MTK> Jeremy Hylton wrote:
  >> If I run the BTrees test cases in a loop, they appear to leak
  >> ~18MB per run.  This should be repeatable from a StandaloneZODB
  >> build:
  >>
  >> [do a checkout] cd StandaloneZODB python setup.py build python
  >> test.py -L BTree
  >>
  >> On Linux, it reports on memory usage each time through the loop.

  MTK> BTW, I instrumented the BTree code, replacing Py_INCREF and
  MTK> Py_DECREF with versions that would log to stderr.  After
  MTK> selecting grepping for OOSets (which testrunner is leaking) and
  MTK> running it through a simple filter program, it doesn't seem
  MTK> that I see any!  This makes me highly suspicious of the test
  MTK> suite itself.

I don't understand why you are suspicious of the test suite.  It's
written in pure Python, and shouldn't be able to create leaks all by
itself.  Put another way, if the test suite is leaking object, why do
think that some other Python program that uses BTrees wouldn't
experience the same leak.

Jeremy