[Python-Dev] refleak status (original) (raw)

Michael Hudson mwh at python.net
Mon Sep 15 14:01:37 EDT 2003


After a week or so of frantically searching for these things, I sort of forgot about the reference leak hunt I started in Python's tests. A week ago I ran my hacked regrtest.py again, made some notes, tried & failed to send them to python-dev, went on holiday, came back, digged a little more and am trying to send again...

real leaks i think i've fixed (am syncing up to CVS now, will test overnight).

 test_class leaked [66, 66, 66, 66] references
 test_hotshot leaked [111, 111, 111, 111] references

real leaks i cant fix:

 test_compile leaked [45, 45, 45, 45] references
     lambda a,a:0 worst offender.  confused.

red herrings:

 test_codeccallbacks leaked [2, 2, 2, 2] references
     callback registry
 test_mutants leaked [-1489, 1520, -755, -183] references
     randomized test

suspected bugs in _Py_RefTotal tracking:

 test_descr leaked [2, 2, 2, 2] references
     something to do with resurrection
 test_gc leaked [18, 18, 18, 18] references
     test_trashcan ... not a real leak, it seems

suspected red herrings:

 test_cpickle leaked [6, 3, 2, 1] references
 test_logging leaked [82, 82, 82, 82] references
     (bet this is registry stuff of one sort or another)
 test_threadedtempfile leaked [-74, 3, 3, 161] references
 test_unicode leaked [7, 7, 7, 7] references
     registries again

apparent refleaks that still need digging:

 test_minidom leaked [1, 1, 1, 1] references
 test_new leaked [2, 2, 2, 2] references
 test_pkg leaked [8, 8, 9, 9] references
 test_pkgimport leaked [5, 6, 6, 6] references
 test_sax leaked [1762, 1762, 1762, 1762] references

Wouldn't like to claim anything about the following tests:

6 tests failed: test_dircache test_doctest test_getopt test_multifile test_warnings test_zipimport 27 tests skipped: test_al test_bsddb test_bsddb3 test_cd test_cl test_curses test_dl test_email_codecs test_gdbm test_gl test_imgfile test_largefile test_linuxaudiodev test_locale test_mpz test_nis test_normalization test_ossaudiodev test_pep277 test_poll test_socket_ssl test_socketserver test_sunaudiodev test_timeout test_urllibnet test_winreg test_winsound Those skips are all expected on darwin.

(test_threaded_import deadlocks, so add that to the list)

Should investigate why the failing tests fail when run repeatedly and check that they're not hiding ref leaks.

Cheers, mwh



More information about the Python-Dev mailing list