← 输入框|github.com|刷新
Skip to content

test_asyncio refleak failures #63498

Closed
Closed

Description

@pitrou
BPO 19299
Nosy @gvanrossum, @pitrou, @larryhastings
Files
  • base_event_close.patch
  • 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 = 'https://github.com/pitrou'
    closed_at = <Date 2013-10-19.22:55:54.697>
    created_at = <Date 2013-10-19.15:04:04.597>
    labels = ['tests', 'library', 'performance']
    title = 'test_asyncio refleak failures'
    updated_at = <Date 2013-10-19.22:55:54.696>
    user = 'https://github.com/pitrou'

    bugs.python.org fields:

    activity = <Date 2013-10-19.22:55:54.696>
    actor = 'pitrou'
    assignee = 'pitrou'
    closed = True
    closed_date = <Date 2013-10-19.22:55:54.697>
    closer = 'pitrou'
    components = ['Library (Lib)', 'Tests']
    creation = <Date 2013-10-19.15:04:04.597>
    creator = 'pitrou'
    dependencies = []
    files = ['32231']
    hgrepos = []
    issue_num = 19299
    keywords = ['patch']
    message_count = 6.0
    messages = ['200425', '200482', '200484', '200508', '200511', '200512']
    nosy_count = 4.0
    nosy_names = ['gvanrossum', 'pitrou', 'larry', 'python-dev']
    pr_nums = []
    priority = 'high'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'resource usage'
    url = 'https://bugs.python.org/issue19299'
    versions = ['Python 3.4']

    Activity

    1. pitrou commented on Oct 19, 2013

      @pitrou
      MemberAuthor

      Either the tests forget to cleanup resources at the end, or the library itself has resource management issues.

      $ ./python -Wi -m test -R 3:3 test_asyncio
      [1/1] test_asyncio
      beginning 6 repetitions
      123456
      ......
      test_asyncio leaked [240, -677, -158] references, sum=-595
      test_asyncio leaked [36, -116, -29] memory blocks, sum=-109
    2. added
      stdlibStandard Library Python modules in the Lib/ directory
      testsTests in the Lib/test dir
      performancePerformance or resource usage
      on Oct 19, 2013
    3. pitrou commented on Oct 19, 2013

      @pitrou
      MemberAuthor

      It seems the attached patch solves it.

    4. pitrou commented on Oct 19, 2013

      @pitrou
      MemberAuthor

      (by the way, the part that really made a difference was losing the reference to the executor. I added the rest out of completeness.)

    5. gvanrossum commented on Oct 19, 2013

      @gvanrossum
      Member

      Looks good. How about adding executor.shutdown(wait=False)? E.g.

          def close(self):
              self._ready.clear()
              self._scheduled.clear()
              executor = self._default_executor
              if executor is not None:
                  self._default_executor = None
                  executor.shutdown(wait=False)

      If that works for you, please commit.

    6. python-dev commented on Oct 19, 2013

      python-devmannequin
      Mannequin

      New changeset 4019694a1ce4 by Antoine Pitrou in branch 'default':
      Issue bpo-19299: fix refleak test failures in test_asyncio
      http://hg.python.org/cpython/rev/4019694a1ce4

    7. pitrou commented on Oct 19, 2013

      @pitrou
      MemberAuthor

      Ok, should be fixed now!

    8. 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

    Labels

    performancePerformance or resource usagestdlibStandard Library Python modules in the Lib/ directorytestsTests in the Lib/test dir

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions