Skip to content

test_type_comments leaks references and memory blocks #80062

Closed

Description

@pablogsal
BPO 35881
Nosy @gvanrossum, @vstinner, @ambv, @pablogsal, @tirkarthi
Superseder
  • bpo-35879: test_type_comments leaks references
  • 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 2019-02-01.14:09:03.830>
    created_at = <Date 2019-02-01.14:02:45.794>
    labels = ['interpreter-core', '3.8', 'tests']
    title = 'test_type_comments leaks references and memory blocks'
    updated_at = <Date 2019-02-01.15:14:41.462>
    user = 'https://github.com/pablogsal'

    bugs.python.org fields:

    activity = <Date 2019-02-01.15:14:41.462>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2019-02-01.14:09:03.830>
    closer = 'vstinner'
    components = ['Interpreter Core', 'Tests']
    creation = <Date 2019-02-01.14:02:45.794>
    creator = 'pablogsal'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 35881
    keywords = []
    message_count = 5.0
    messages = ['334676', '334679', '334680', '334681', '334686']
    nosy_count = 5.0
    nosy_names = ['gvanrossum', 'vstinner', 'lukasz.langa', 'pablogsal', 'xtreak']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = '35879'
    type = None
    url = 'https://bugs.python.org/issue35881'
    versions = ['Python 3.8']

    Activity

    1. pablogsal commented on Feb 1, 2019

      @pablogsal
      MemberAuthor

      The refleak buildbots have detected that test_type_comments is leaking references. Example failure:

      https://buildbot.python.org/all/#/builders/1/builds/490/steps/4/logs/stdio

      test_type_comments leaked [37, 37, 37] references, sum=111
      test_type_comments leaked [11, 12, 11] memory blocks, sum=34
      1 test failed again:
      test_type_comments

      Bisecting shows that PR11645 is the one that introduced the refleaks:

      https://github.com/python/cpython/pull/11645/files#

      After some hours of debugging, I have identified the (possible) cause of the majority of the refleaks.

      The type_comments created in ast.c with new_type_comment() never reaches 0 reference counts. This **seems** to be because the cleanup for the stmt_ty elements where the type_comments are included never call DECREF on these elements when destroyed unless I am missing something fundamental.

    2. added
      interpreter-core(Objects, Python, Grammar, and Parser dirs)
      testsTests in the Lib/test dir
      on Feb 1, 2019
    3. tirkarthi commented on Feb 1, 2019

      @tirkarthi
      Member

      This looks like the same as https://bugs.python.org/issue35879

    4. vstinner commented on Feb 1, 2019

      @vstinner
      Member

      This looks like the same as https://bugs.python.org/issue35879

      Yeah, as usual Pablo is way too slow: he posted the same bug 1h30 after me.

    5. pablogsal commented on Feb 1, 2019

      @pablogsal
      MemberAuthor

      Yeah, as usual, Pablo is way too slow: he posted the same bug 1h30 after me.

      :(

    6. vstinner commented on Feb 1, 2019

      @vstinner
      Member

      :(

      I'm kidding :-) Sorry for not reviewing emails from buildbot-status.

    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

      3.8 (EOL)end of lifeinterpreter-core(Objects, Python, Grammar, and Parser dirs)testsTests in the Lib/test dir

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions