ImageImage

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.

classification
Title: subprocess_fork_exec leaks memory when extra_groups are supplied
Type: resource usage Stage: resolved
Components: Extension Modules Versions: Python 3.10, Python 3.9
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: christian.heimes, gregory.p.smith, koobs, miss-islington
Priority: normal Keywords: patch

Created on 2020-06-12 09:54 by christian.heimes, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 20825 merged christian.heimes, 2020-06-12 10:00
PR 20831 merged miss-islington, 2020-06-12 16:18
PR 20832 closed miss-islington, 2020-06-12 16:19
PR 20833 closed miss-islington, 2020-06-12 16:19
Messages (4)
msg371346 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2020-06-12 09:54
asan has detected a minor memory leak in subprocess_fork_exec:

Direct leak of 8 byte(s) in 1 object(s) allocated from:
    #0 0x7f008bf19667 in __interceptor_malloc (/lib64/libasan.so.6+0xb0667)
    #1 0x7f007a0bee4a in subprocess_fork_exec /home/heimes/dev/python/cpython/Modules/_posixsubprocess.c:774
    #2 0xe0305b in cfunction_call Objects/methodobject.c:546
    #3 0x4bdd0c in _PyObject_MakeTpCall Objects/call.c:191
    #4 0x462fd0 in _PyObject_VectorcallTstate Include/cpython/abstract.h:112
    #5 0x462fd0 in _PyObject_VectorcallTstate Include/cpython/abstract.h:99
    #6 0x462fd0 in PyObject_Vectorcall Include/cpython/abstract.h:123
    #7 0x462fd0 in call_function Python/ceval.c:5110
    #8 0x462fd0 in _PyEval_EvalFrameDefault Python/ceval.c:3510
    #9 0x8c1c1d in _PyEval_EvalFrame Include/internal/pycore_ceval.h:40
    #10 0x8c1c1d in _PyEval_EvalCode Python/ceval.c:4365
msg371392 - (view) Author: miss-islington (miss-islington) Date: 2020-06-12 16:18
New changeset 0d3350daa8123a3e16d4a534b6e873eb12c10d7c by Christian Heimes in branch 'master':
bpo-40955: Fix memory leak in subprocess module (GH-20825)
https://github.com/python/cpython/commit/0d3350daa8123a3e16d4a534b6e873eb12c10d7c
msg371396 - (view) Author: miss-islington (miss-islington) Date: 2020-06-12 17:02
New changeset ee3f7fee94915ab4f34c92d6c89b211de476660d by Miss Islington (bot) in branch '3.9':
bpo-40955: Fix memory leak in subprocess module (GH-20825)
https://github.com/python/cpython/commit/ee3f7fee94915ab4f34c92d6c89b211de476660d
msg371397 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2020-06-12 17:09
3.8 and 3.7 don't have the code path and are not affected.
History
Date User Action Args
2022-04-11 14:59:32adminsetgithub: 85127
2020-06-12 17:09:12christian.heimessetstatus: open -> closed
versions: - Python 3.7, Python 3.8
messages: + msg371397

components: + Extension Modules, - FreeBSD
resolution: fixed
stage: patch review -> resolved
2020-06-12 17:02:49miss-islingtonsetmessages: + msg371396
2020-06-12 16:19:18miss-islingtonsetpull_requests: + pull_request20027
2020-06-12 16:19:09miss-islingtonsetpull_requests: + pull_request20026
2020-06-12 16:18:59miss-islingtonsetpull_requests: + pull_request20025
2020-06-12 16:18:51miss-islingtonsetnosy: + miss-islington
messages: + msg371392
2020-06-12 15:01:48gregory.p.smithsettitle: subprocess_fork_exec leaks memory -> subprocess_fork_exec leaks memory when extra_groups are supplied
2020-06-12 10:00:52christian.heimessetkeywords: + patch
stage: patch review
pull_requests: + pull_request20020
2020-06-12 09:54:50christian.heimescreate