This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Reference leak in test_capi, on "import _pickle" in a subinterpreter
Type: resource usage Stage: resolved
Components: Versions: Python 3.6
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: python-dev, serhiy.storchaka, vstinner
Priority: normal Keywords: patch

Created on 2015-11-17 10:23 by vstinner, last changed 2022-04-11 14:58 by admin. This issue is now closed.

File name Uploaded Description Edit
_pickle_partial.patch vstinner, 2015-11-17 10:23 review vstinner, 2015-11-17 10:23
Messages (4)
msg254787 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2015-11-17 10:23
[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 "".

@Serhiy: Since you wrote the change introduding the leak, could you please review my fix? Thanks.
msg254791 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2015-11-17 11:07
The patch LGTM. Thank you Victor.
msg254792 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2015-11-17 11:15
New changeset 7adc1d24d05b by Victor Stinner in branch 'default':
Closes #25645: Fix a reference leak introduced by change bc5894a3a0e6 of the
msg254794 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2015-11-17 11:16
> The patch LGTM. Thank you Victor.

Thanks for the review Serhiy.
Date User Action Args
2022-04-11 14:58:23adminsetgithub: 69831
2015-11-17 11:16:16vstinnersetmessages: + msg254794
2015-11-17 11:15:19python-devsetstatus: open -> closed

nosy: + python-dev
messages: + msg254792

resolution: fixed
stage: resolved
2015-11-17 11:07:25serhiy.storchakasetmessages: + msg254791
2015-11-17 10:23:30vstinnersetfiles: +
2015-11-17 10:23:09vstinnercreate