[New-bugs-announce] [issue25645] Reference leak in test_capi, on "import _pickle" in a subinterpreter

STINNER Victor report at bugs.python.org
Tue Nov 17 05:23:09 EST 2015


New submission from STINNER Victor:

"""
[Python-checkins] Daily reference leaks (97e2a6810f7f): sum=10

    results for 97e2a6810f7f on branch "default"
    --------------------------------------------

    test_asyncio leaked [0, 0, 3] memory blocks, sum=3
    test_capi leaked [1, 1, 1] references, sum=3
    test_functools leaked [0, 2, 2] memory blocks, sum=4


    Command line was: ['./python', '-m', 'test.regrtest', '-uall', '-R', '3:3:/home/psf-users/antoine/refleaks/reflogBLsY2a', '--timeout', '7200']
"""

It looks the leak comes from "import _pickle". The reference leak was introduced by the issue #24164 with the change bc5894a3a0e6. Attached patch should fix it.

To validate the patch, run: "./python -m test -R 3:3 test_capi", or "./python -m test -R 3:3 test_leak" with attached "test_leak.py".

@Serhiy: Since you wrote the change introduding the leak, could you please review my fix? Thanks.

----------
files: _pickle_partial.patch
keywords: patch
messages: 254787
nosy: haypo, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Reference leak in test_capi, on "import _pickle" in a subinterpreter
type: resource usage
versions: Python 3.6
Added file: http://bugs.python.org/file41060/_pickle_partial.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25645>
_______________________________________


More information about the New-bugs-announce mailing list