(original) (raw)
Hi Yury, you may be interested in some leak-finding code that wrote for Pyston. It uses the GC infrastructure to show you objects that were directly leaked, ignoring indirect leaks -- ie objects that were only leaked because they were referenced by a leaked object. It can often give you a very small list of objects to look into (depending on how many non-gc objects were leaked). If you're interested I can try porting it to CPython.
kmod
On Wed, Nov 9, 2016 at 7:16 AM, Yury Selivanov <yselivanov.ml@gmail.com> wrote:
I'm trying to fix refleaks in 3.6\. So far:
On 2016-11-09 4:02 AM, solipsis@pitrou.net wrote:
results for b78574cb00ab on branch "default"
\--------------------------------------------
test\_ast leaked \[98, 98, 98\] references, sum=294
test\_ast leaked \[98, 98, 98\] memory blocks, sum=294
test\_asyncio leaked \[3, 0, 0\] memory blocks, sum=3
test\_code leaked \[2, 2, 2\] references, sum=6
test\_code leaked \[2, 2, 2\] memory blocks, sum=6
test\_functools leaked \[0, 3, 1\] memory blocks, sum=4
test\_pydoc leaked \[106, 106, 106\] references, sum=318
test\_pydoc leaked \[42, 42, 42\] memory blocks, sum=126
test\_trace leaked \[12, 12, 12\] references, sum=36
test\_trace leaked \[11, 11, 11\] memory blocks, sum=33
test\_ast, test\_code and test\_trace were fixed by https://hg.python.org/cpython/rev/2c6825c9ecfd
test\_pydoc leaks in test\_typing\_pydoc. I tried git bisect and it looks like that the first commit that introduced the refleak was the one that added test\_typing\_pydoc!
62127e60e7b0 doesn't modify any CPython internals, so it looks like that test\_typing\_pydoc exposed some bug that has existed before it. Any help tracking that down is welcome :)
Yury
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: https://mail.python.org/mailman/options/python-dev/kmod% 40dropbox.com