[Python-3000] refleaks and other errors

Guido van Rossum guido at python.org
Wed Mar 21 22:28:36 CET 2007


Thanks, got it. Found the leak, thanks to gc.get_objects() and your
hint about what was leaking in test_grammar. Were you tired when you
posted that first msg? It was incredibly terse. :-)

Committed revision 54502.

--Guido

On 3/20/07, Neal Norwitz <nnorwitz at gmail.com> wrote:
> That was mostly the first line of my message, although it was a bit terse. :-)
>
> It's just a cmd line option to regrtest.py -R 4:3:
> Everything else is the same.
>
> The way I run it for test_grammar:
>
> ./python -E -tt ./Lib/test/regrtest.py -R 4:3: test_grammar
>
> You can also pass "-R ::" instead of "-R 4:3:" however that takes
> longer and generally doesn't help much.
>
> Note that some tests that normally pass will fail (not the refleaks,
> actually fail) with this option due to the test not cleaning up after
> itself.
>
> n
> --
>
> On 3/20/07, Guido van Rossum <guido at python.org> wrote:
> > I'm pretty sure I introduced leaks with the new metaclass code; it was
> > a bit of a rush job and there's plenty of new C code. I need a hint on
> > how to reproduce this myself for a single test...
> >
> > On 3/20/07, Neal Norwitz <nnorwitz at gmail.com> wrote:
> > > regrtest.py -R 4:3:  # on 64-bit, but that might only affect the xpickle error
> > >
> > > test_grammar leaked [14, 14, 14] references
> > > test_doctest leaked [84, 84, 84] references
> > > test_ctypes leaked [13, 13, 13] references
> > > test_descrtut leaked [417, 417, 417] references
> > > test_generators leaked [227, 227, 227] references
> > > test_metaclass leaked [284, 284, 284] references
> > > test_modulefinder leaked [186, 186, 186] references
> > > test_scope leaked [78, 78, 78] references
> > > test_threading_local leaked [102, 102, 102] references
> > > test_unpack leaked [55, 55, 55] references
> > > test_weakref leaked [79, 79, 79] references
> > >
> > >
> > > test test_cpickle failed -- errors occurred; run in verbose mode for details
> > > test test_io failed -- errors occurred; run in verbose mode for details
> > > test test_structmembers failed -- errors occurred; run in verbose mode
> > > for details
> > >
> > > test test_fileio failed -- Traceback (most recent call last):
> > >   File "/home/neal/python/dev/py3k/Lib/test/test_fileio.py", line 37,
> > > in testSeekTell
> > >     self.f.seek(0)
> > > IOError: [Errno 22] Invalid argument
> > >
> > > test_socket_ssl skipped -- socket module has no ssl support
> > >
> > > test test_xpickle failed -- Traceback (most recent call last):
> > >   File "/home/neal/python/dev/py3k/Lib/test/pickletester.py", line
> > > 503, in test_ints
> > >     self.assertEqual(expected, n2)
> > > AssertionError: -9223372036854775807 != 1
> > >
> > > test test_xreload failed -- Traceback (most recent call last):
> > >
> > >
> > > test_grammar has these two cases leaking 7 refs each:
> > >   class foo:return 1
> > >   class foo:yield 1
> > > _______________________________________________
> > > Python-3000 mailing list
> > > Python-3000 at python.org
> > > http://mail.python.org/mailman/listinfo/python-3000
> > > Unsubscribe: http://mail.python.org/mailman/options/python-3000/guido%40python.org
> > >
> >
> >
> > --
> > --Guido van Rossum (home page: http://www.python.org/~guido/)
> >
>


-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-3000 mailing list