Re: [Python-Dev] [Python-checkins] Daily reference leaks (12de1ad1cee8): sum=6024

On Wed, Jan 18, 2012 at 2:31 PM, <solipsis@pitrou.net> wrote:
Yikes, you weren't kidding about that new subinterpreter code execution test upsetting the refleak detection... Cheers, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia

On Thu, 19 Jan 2012 01:06:07 +1000 Nick Coghlan <ncoghlan@gmail.com> wrote:
Well, these are real leaks, but I expect them to be quite difficult to track (I've found a couple of them), because they can be scattered around in C module initialization routines and the like. I suggest we skip this test on refleak runs. cheers Antoine.

On Wed, Jan 18, 2012 at 10:56, Antoine Pitrou <solipsis@pitrou.net> wrote:
Do we have any general strategy to help make it more fine-grained to detect where the leak might be coming from? We could then maybe try to get some people pound on this at the PyCon sprints. Otherwise I'm reluctant to skip it since they are legitimate leaks that should be get fixed.

On Wed, 18 Jan 2012 11:14:50 -0500 Brett Cannon <brett@python.org> wrote:
Unfortunately not. I've tried to track down the remaining leaks (*) by using gc.get_objects(), but apart from a couple of false positives (dead weakrefs lingering in some tp_subclasses slots until the next subclasses take their place ;-)), most refleaks seem to be either on long-lived objects (meaning the leaks are not severe) or on non-gc-tracked objects. (*) $ ./python -m test -R 3:2 test_capi [1/1] test_capi beginning 5 repetitions 12345 ..... test_capi leaked [152, 152] references, sum=304
Well it's the old well-known issue with pseudo-"permanent" references not being appropriately managed/cleaned up. Which only shows when calling Py_Initialize/Py_Finalize multiple times, or using sub-interpreters. Regards Antoine.

On Wed, Jan 18, 2012 at 11:27, Antoine Pitrou <solipsis@pitrou.net> wrote:
Could we tweak the report to somehow ignore the permanent refcounts for just this test? If not then we might as well leave it out since that number will never hit 0.

On Thu, 19 Jan 2012 01:06:07 +1000 Nick Coghlan <ncoghlan@gmail.com> wrote:
Well, these are real leaks, but I expect them to be quite difficult to track (I've found a couple of them), because they can be scattered around in C module initialization routines and the like. I suggest we skip this test on refleak runs. cheers Antoine.

On Wed, Jan 18, 2012 at 10:56, Antoine Pitrou <solipsis@pitrou.net> wrote:
Do we have any general strategy to help make it more fine-grained to detect where the leak might be coming from? We could then maybe try to get some people pound on this at the PyCon sprints. Otherwise I'm reluctant to skip it since they are legitimate leaks that should be get fixed.

On Wed, 18 Jan 2012 11:14:50 -0500 Brett Cannon <brett@python.org> wrote:
Unfortunately not. I've tried to track down the remaining leaks (*) by using gc.get_objects(), but apart from a couple of false positives (dead weakrefs lingering in some tp_subclasses slots until the next subclasses take their place ;-)), most refleaks seem to be either on long-lived objects (meaning the leaks are not severe) or on non-gc-tracked objects. (*) $ ./python -m test -R 3:2 test_capi [1/1] test_capi beginning 5 repetitions 12345 ..... test_capi leaked [152, 152] references, sum=304
Well it's the old well-known issue with pseudo-"permanent" references not being appropriately managed/cleaned up. Which only shows when calling Py_Initialize/Py_Finalize multiple times, or using sub-interpreters. Regards Antoine.

On Wed, Jan 18, 2012 at 11:27, Antoine Pitrou <solipsis@pitrou.net> wrote:
Could we tweak the report to somehow ignore the permanent refcounts for just this test? If not then we might as well leave it out since that number will never hit 0.
participants (4)
-
Antoine Pitrou
-
Brett Cannon
-
Gregory P. Smith
-
Nick Coghlan