Skip to content

subprocess_fork_exec leaks memory when extra_groups are supplied #85127

Closed

Description

@tiran
BPO 40955
Nosy @gpshead, @tiran, @koobs, @miss-islington
PRs
  • bpo-40955: Fix memory leak in subprocess module #20825
  • [3.9] bpo-40955: Fix memory leak in subprocess module (GH-20825) #20831
  • [3.8] bpo-40955: Fix memory leak in subprocess module (GH-20825) #20832
  • [3.7] bpo-40955: Fix memory leak in subprocess module (GH-20825) #20833
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2020-06-12.17:09:12.793>
    created_at = <Date 2020-06-12.09:54:50.526>
    labels = ['extension-modules', '3.9', '3.10', 'performance']
    title = 'subprocess_fork_exec leaks memory when extra_groups are supplied'
    updated_at = <Date 2020-06-12.17:09:12.791>
    user = 'https://github.com/tiran'

    bugs.python.org fields:

    activity = <Date 2020-06-12.17:09:12.791>
    actor = 'christian.heimes'
    assignee = 'none'
    closed = True
    closed_date = <Date 2020-06-12.17:09:12.793>
    closer = 'christian.heimes'
    components = ['Extension Modules']
    creation = <Date 2020-06-12.09:54:50.526>
    creator = 'christian.heimes'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 40955
    keywords = ['patch']
    message_count = 4.0
    messages = ['371346', '371392', '371396', '371397']
    nosy_count = 4.0
    nosy_names = ['gregory.p.smith', 'christian.heimes', 'koobs', 'miss-islington']
    pr_nums = ['20825', '20831', '20832', '20833']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'resource usage'
    url = 'https://bugs.python.org/issue40955'
    versions = ['Python 3.9', 'Python 3.10']

    Activity

    1. tiran commented on Jun 12, 2020

      @tiran
      MemberAuthor

      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

    2. changed the title [-]subprocess_fork_exec leaks memory[/-] [+]subprocess_fork_exec leaks memory when extra_groups are supplied[/+] on Jun 12, 2020
    3. miss-islington commented on Jun 12, 2020

      @miss-islington
      Contributor

      New changeset 0d3350d by Christian Heimes in branch 'master':
      bpo-40955: Fix memory leak in subprocess module (GH-20825)
      0d3350d

    4. miss-islington commented on Jun 12, 2020

      @miss-islington
      Contributor

      New changeset ee3f7fe by Miss Islington (bot) in branch '3.9':
      bpo-40955: Fix memory leak in subprocess module (GH-20825)
      ee3f7fe

    5. tiran commented on Jun 12, 2020

      @tiran
      MemberAuthor

      3.8 and 3.7 don't have the code path and are not affected.

    6. added and removed on Jun 12, 2020
    7. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions