[Python-Dev] update on memory leaks in 2.2

Neal Norwitz neal@metaslash.com
Fri, 07 Dec 2001 11:54:54 -0500


Guido van Rossum wrote:
> 
> > Command line: (longexp crashes purify for some reason)
> >       ./python -E -tt ./Lib/test/regrtest.py -u network -x test_longexp.py
> >
> > Results:
> >       168 tests OK.
> >       1 test failed:
> >           test_socket_ssl
> >       15 tests skipped:
> >           test_al test_bsddb test_cd test_cl test_curses test_dl test_gl
> >           test_imgfile test_linuxaudiodev test_nis test_ntpath test_openpty
> >           test_sundry test_winreg test_winsound
> 
> A few of these skips weren't expected: test_sundry, test_openpty,
> test_bsddb.  What's missing to run those?

The platform is Sun Solaris 8 (2.8).  Purify 2002.

For bsddb, do I need to install something that isn't "standard"?

test test_openpty skipped -- No openpty() available.

> > Potential Memory Leaks:
> >
> >       1012 from 4 different allocating points -- all in WeakRef
> 
> Any more info on these, or are these just red herrings?

The details are below.

Neal
--
         PLK: 704 bytes potentially leaked in 16 blocks
         This memory was allocated from:
               malloc         [rtlib.o]
               _PyObject_GC_New [gcmodule.c:832]
               PyWeakref_NewRef [weakrefobject.c:37]
               weakref_ref    [_weakref.c:73]
               PyCFunction_Call [methodobject.c:101]
               eval_frame     [ceval.c:1989]
               PyEval_EvalCodeEx [ceval.c:2570]
               function_call  [funcobject.c:374]
               PyObject_Call  [abstract.c:1665]
               instancemethod_call [classobject.c:2276]
               PyObject_Call  [abstract.c:1665]
               PyEval_CallObjectWithKeywords [ceval.c:3034]
         Block of 44 bytes (16 times); last block at 0x18bf0a8


--

         PLK: 220 bytes potentially leaked in 5 blocks
         This memory was allocated from:
               malloc         [rtlib.o]
               _PyObject_GC_New [gcmodule.c:832]
               PyWeakref_NewRef [weakrefobject.c:37]
               add_subclass   [typeobject.c:2054]
               PyType_Ready   [typeobject.c:2026]
               type_new       [typeobject.c:1142]
               type_call      [typeobject.c:148]
               PyObject_Call  [abstract.c:1665]
               PyEval_CallObjectWithKeywords [ceval.c:3034]
               PyObject_CallFunction [abstract.c:1656]
               build_class    [ceval.c:3583]
               eval_frame     [ceval.c:1507]
         Block of 44 bytes (5 times); last block at 0xced9b8

--

         PLK: 44 bytes potentially leaked at 0xcb2ba8
         This memory was allocated from:
               malloc         [rtlib.o]
               _PyObject_GC_New [gcmodule.c:832]
               PyWeakref_NewRef [weakrefobject.c:37]
               add_subclass   [typeobject.c:2054]
               PyType_Ready   [typeobject.c:2026]
               type_new       [typeobject.c:1142]
               tp_new_wrapper [typeobject.c:2586]
               PyCFunction_Call [methodobject.c:69]
               PyObject_Call  [abstract.c:1665]
               do_call        [ceval.c:3247]
               eval_frame     [ceval.c:1984]
               PyEval_EvalCodeEx [ceval.c:2570]

--

         PLK: 44 bytes potentially leaked at 0xcb3470
         This memory was allocated from:
               malloc         [rtlib.o]
               _PyObject_GC_New [gcmodule.c:832]
               PyWeakref_NewRef [weakrefobject.c:37]
               add_subclass   [typeobject.c:2054]
               PyType_Ready   [typeobject.c:2026]
               type_new       [typeobject.c:1142]
               tp_new_wrapper [typeobject.c:2586]
               PyCFunction_Call [methodobject.c:69]
               PyObject_Call  [abstract.c:1665]
               slot_tp_new    [typeobject.c:3355]
               type_call      [typeobject.c:148]
               PyObject_Call  [abstract.c:1665]