<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Apr 24, 2014 at 7:31 AM, Ethan Furman <span dir="ltr"><<a href="mailto:ethan@stoneleaf.us" target="_blank">ethan@stoneleaf.us</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On 04/23/2014 09:06 PM, Benjamin Peterson wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Wed, Apr 23, 2014, at 19:14, Ethan Furman wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Command line:<br>
<br>
    ./python -m test.regrtest -v -R3:3 test_tools<br>
<br>
Results:<br>
<br>
    Ran 44 tests in 7.628s<br>
<br>
    OK (skipped=1)<br>
    .<br>
    test_tools leaked [0, 2, 2] references, sum=4<br>
    1 test failed:<br>
        test_tools<br>
<br>
Any words of wisdom for tracking those leaks?<br>
</blockquote>
<br>
Unless it's consistent, that sort of behavior usually just gets<br>
dismissed as intermittent.<br>
</blockquote>
<br></div>
test_tools leaked [331, 0, 0] references, sum=331<br>
test_tools leaked [108, 1, 0] memory blocks, sum=109<br>
<br>
test_tools leaked [2, 0, 0] references, sum=2<br>
<br>
test_tools leaked [0, 0, 4] references, sum=4<br>
test_tools leaked [0, 0, 3] memory blocks, sum=3<br>
<br>
Consistently the same, or consistently happening?  ;)<br></blockquote><div><br></div><div>Consistently a leak. If it's an occasional reported leak (especially in the first or last of the reported runs) or a mixture of positive and negative numbers, it's more likely it's an effect of delayed cleanup, for whatever reason. regrtest's -R takes two integers, 'stab' and 'run', for the number of times to run the same test without tracking reference counts (to stabilize caching effects) and the number of times to run the test while tracking reference counts. Some tests don't stabilize as easily as others, for example because the actual workload or timings rely on external sources. '2, 0, 0' and '0, 0, 4' are probably not leaks, but if you're worried you can run them with larger 'stab' and 'run' to see if they stabilize, or a smaller 'stab' to see if they just have unreliable refcount effects.</div>
<div><br></div><div>The easiest way to debug these things is to reduce the test until it has no net refcount effect, then look at the last thing you removed :)</div></div><div><br></div>-- <br>Thomas Wouters <<a href="mailto:thomas@python.org" target="_blank">thomas@python.org</a>><br>
<br>Hi! I'm an email virus! Think twice before sending your email to help me spread!
</div></div>