python / python/cpython

Garbage Collection makes some object live for very long

Open
#83,242 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

3.12 interpreter-core performance
Dominant language
Python
Stars
77.2k
Forks
36k
PR merge metrics
PR metrics pending

Description

BPO 39061
Nosy @pablogsal, @mistasse
Files
  • late_gc.py: Example program where the unnecessary growing of memory consumption is observable
  • 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 = None
    created_at = <Date 2019-12-16.10:01:34.949>
    labels = ['interpreter-core', 'performance']
    title = 'Garbage Collection makes some object live for very long'
    updated_at = <Date 2019-12-16.19:06:33.825>
    user = 'https://github.com/mistasse'
    

    bugs.python.org fields:

    activity = <Date 2019-12-16.19:06:33.825>
    actor = 'pablogsal'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Interpreter Core']
    creation = <Date 2019-12-16.10:01:34.949>
    creator = 'mistasse'
    dependencies = []
    files = ['48780']
    hgrepos = []
    issue_num = 39061
    keywords = []
    message_count = 4.0
    messages = ['358469', '358486', '358488', '358491']
    nosy_count = 2.0
    nosy_names = ['pablogsal', 'mistasse']
    pr_nums = []
    priority = 'normal'
    resolution = None
    stage = None
    status = 'open'
    superseder = None
    type = 'resource usage'
    url = 'https://bugs.python.org/issue39061'
    versions = []
    

    Contributor guide

    Open the contributing guide

    First steps

    1. Read the whole issue, then the project's contributing guide.
    2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
    3. Fork the repository and make your change on a branch.
    4. Open a pull request that references the issue number.

    Research direction

    Start by running the attached late_gc.py example to reproduce the unnecessary memory growth. Then trace the interpreter-core garbage-collection behavior involved in keeping objects live longer than necessary. Done means identifying the cause and demonstrating that the example no longer exhibits the reported prolonged object lifetime or memory growth.

    Written by the indexing model from the issue text.

    Assessment

    Tech stack
    python
    Domain
    performance
    Issue type
    Bug
    Difficulty
    4/5
    Estimated time
    3-5 days
    Activity status
    Stale
    Clarity
    Needs clarification
    Newbie friendliness
    25/100

    Get new issues in your inbox

    A short digest of beginner-friendly GitHub issues.