<div dir="ltr">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.<div><br></div><div><a href="https://github.com/dropbox/pyston/blob/master/from_cpython/Modules/gcmodule.c#L894">https://github.com/dropbox/pyston/blob/master/from_cpython/Modules/gcmodule.c#L894</a><br></div><div><br></div><div>kmod</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 9, 2016 at 7:16 AM, Yury Selivanov <span dir="ltr"><<a href="mailto:yselivanov.ml@gmail.com" target="_blank">yselivanov.ml@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I'm trying to fix refleaks in 3.6.  So far:<br>
<br>
On 2016-11-09 4:02 AM, <a href="mailto:solipsis@pitrou.net" target="_blank">solipsis@pitrou.net</a> wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
results for b78574cb00ab on branch "default"<br>
------------------------------<wbr>--------------<br>
<br>
test_ast leaked [98, 98, 98] references, sum=294<br>
test_ast leaked [98, 98, 98] memory blocks, sum=294<br>
test_asyncio leaked [3, 0, 0] memory blocks, sum=3<br>
test_code leaked [2, 2, 2] references, sum=6<br>
test_code leaked [2, 2, 2] memory blocks, sum=6<br>
test_functools leaked [0, 3, 1] memory blocks, sum=4<br>
test_pydoc leaked [106, 106, 106] references, sum=318<br>
test_pydoc leaked [42, 42, 42] memory blocks, sum=126<br>
test_trace leaked [12, 12, 12] references, sum=36<br>
test_trace leaked [11, 11, 11] memory blocks, sum=33<br>
<br>
<br>
</blockquote>
<br>
test_ast, test_code and test_trace were fixed by <a href="https://hg.python.org/cpython/rev/2c6825c9ecfd" rel="noreferrer" target="_blank">https://hg.python.org/cpython/<wbr>rev/2c6825c9ecfd</a><br>
<br>
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!<br>
<br>
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 :)<br>
<br>
Yury<br>
______________________________<wbr>_________________<br>
Python-Dev mailing list<br>
<a href="mailto:Python-Dev@python.org" target="_blank">Python-Dev@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-dev" rel="noreferrer" target="_blank">https://mail.python.org/mailma<wbr>n/listinfo/python-dev</a><br>
Unsubscribe: <a href="https://mail.python.org/mailman/options/python-dev/kmod%40dropbox.com" rel="noreferrer" target="_blank">https://mail.python.org/mailma<wbr>n/options/python-dev/kmod%<wbr>40dropbox.com</a><br>
</blockquote></div><br></div>