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: test_wait3 and test_wait4 leaked references on x86 Gentoo Refleaks 3.x
Type: Stage: resolved
Components: Tests Versions: Python 3.9
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: benjamin.peterson, eelizondo, vstinner
Priority: normal Keywords: patch

Created on 2019-11-14 22:46 by vstinner, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 17373 merged eelizondo, 2019-11-25 06:31
Messages (6)
msg356633 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2019-11-14 22:46
x86 Gentoo Refleaks 3.x, first failure:

test_wait3 leaked [23, 23, 23] references, sum=69
test_wait4 leaked [22, 21, 22] references, sum=65

The leak was introduced by:

commit b3966639d28313809774ca3859a347b9007be8d2
Author: Eddie Elizondo <>
Date:   Tue Nov 5 07:16:14 2019 -0800

    bpo-35381 Remove all static state from posixmodule (GH-15892)
    After #9665, this moves the remaining types in posixmodule to be heap-allocated to make it compatible with PEP384 as well as modifying all the type accessors to fully make the type opaque.
    The original PR that got messed up a rebase: All the issues in that commit have now been addressed since got committed.
    This change also removes any state from the data segment and onto the module state itself.
    Automerge-Triggered-By: @encukou
msg356635 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2019-11-14 22:50
Similar failure on other buildbot workers.

AMD64 RHEL7 Refleaks 3.x:

AMD64 Fedora Stable Refleaks 3.x:

AMD64 Fedora Rawhide Refleaks 3.x:

AMD64 RHEL8 Refleaks 3.x:
msg356699 - (view) Author: Eddie Elizondo (eelizondo) * Date: 2019-11-15 17:45
Woops! I'll get to it before the end of the weekend!
msg357426 - (view) Author: Eddie Elizondo (eelizondo) * Date: 2019-11-25 06:33
Victor, the PR with the fix is out. Easy catch after running it with my leak detector!
msg357475 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2019-11-26 03:07
New changeset e4db1f05e9a5828f6b287f99067362fa0e5732e8 by Benjamin Peterson (Eddie Elizondo) in branch 'master':
closes bpo-38803: Fix leak in posixmodule. (GH-17373)
msg357488 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2019-11-26 08:25
Thanks for the fix Eddie Elizondo!
Date User Action Args
2022-04-11 14:59:23adminsetgithub: 82984
2019-11-26 08:25:31vstinnersetmessages: + msg357488
2019-11-26 03:07:43benjamin.petersonsetstatus: open -> closed

nosy: + benjamin.peterson
messages: + msg357475

resolution: fixed
stage: patch review -> resolved
2019-11-25 06:33:41eelizondosetmessages: + msg357426
2019-11-25 06:31:37eelizondosetkeywords: + patch
stage: patch review
pull_requests: + pull_request16856
2019-11-15 17:45:40eelizondosetnosy: + eelizondo
messages: + msg356699
2019-11-14 22:50:42vstinnersetmessages: + msg356635
2019-11-14 22:46:32vstinnercreate