GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Leak in asyncio.selector_events._SelectorSocketTransport · Issue #87745 · python/cpython

Leak in asyncio.selector_events._SelectorSocketTransport #87745

New issue
Copy link
New issue
Copy link
Closed as not planned
Closed as not planned
Leak in asyncio.selector_events._SelectorSocketTransport#87745
Copy link
Labels
3.12only security fixesonly security fixesperformancePerformance or resource usagePerformance or resource usagetopic-asyncio

Description

begnac
mannequin
opened on Mar 21, 2021
Issue body actions
BPO 43579
Nosy @asvetlov, @1st1, @begnac

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 2021-03-21.07:11:10.990>
labels = ['expert-asyncio', '3.9', '3.10', 'performance']
title = 'Leak in asyncio.selector_events._SelectorSocketTransport'
updated_at = <Date 2021-03-21.07:11:10.990>
user = 'https://github.com/begnac'

bugs.python.org fields:

activity = <Date 2021-03-21.07:11:10.990>
actor = 'begnac'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = ['asyncio']
creation = <Date 2021-03-21.07:11:10.990>
creator = 'begnac'
dependencies = []
files = []
hgrepos = []
issue_num = 43579
keywords = []
message_count = 1.0
messages = ['389219']
nosy_count = 3.0
nosy_names = ['asvetlov', 'yselivanov', 'begnac']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = 'performance'
url = 'https://bugs.python.org/issue43579'
versions = ['Python 3.9', 'Python 3.10']

Activity

  1. begnac commented on Mar 21, 2021

    @begnac
    begnacmannequin
    on Mar 21, 2021
    MannequinAuthor
    More actions

    Hello,

    Even after close()ing, asyncio.selector_events._SelectorSocketTransport keeps a reference to itself via self._read_ready_cb.

    should probably add

    def close(self):
        super().close()
        self._read_ready_cb = None

    Cheers !
    Itaï.

  2. begnac
    added
    3.9 (EOL)end of lifeend of life
    3.10 (EOL)end of lifeend of life
    topic-asyncio
    performancePerformance or resource usagePerformance or resource usage
    on Mar 21, 2021
  3. ezio-melotti
    transferred this issue fromon Apr 10, 2022
  4. ezio-melotti
    added this to asyncioon Jun 20, 2022
  5. ezio-melotti
    moved this to Todo in asyncioon Jul 17, 2022
  6. iritkatriel
    added
    3.12only security fixesonly security fixes
    and removed
    3.10 (EOL)end of lifeend of life
    3.9 (EOL)end of lifeend of life
    on Aug 25, 2022
  7. kumaraditya303 commented on Sep 24, 2022

    @kumaraditya303
    kumaraditya303
    on Sep 24, 2022
    Contributor
    More actions

    The gc would break the cycle anyways, is this an issue in practice? @begnac

  8. kumaraditya303
    added
    pendingThe issue will be closed if no feedback is providedThe issue will be closed if no feedback is provided
    on Sep 24, 2022
  9. begnac commented on Sep 26, 2022

    @begnac
    begnac
    on Sep 26, 2022
    Author
    More actions

    In my experience, the gc doesn't always break all the cycles.
    Personally I like to check for cycles in my code and clean them up, just in case. Sometimes I stumble over cycles in code I use. Specifically about this one, it's been such a long time I do not remember... but if I found it, it's because something didn't get cleaned up :)

  10. gvanrossum commented on Sep 26, 2022

    @gvanrossum
    gvanrossum
    on Sep 26, 2022
    Member
    More actions

    I think it's a reasonable suggestion and the fix should be simple.

  11. kumaraditya303
    removed
    pendingThe issue will be closed if no feedback is providedThe issue will be closed if no feedback is provided
    on Oct 2, 2022
  12. kumaraditya303 commented on Dec 20, 2022

    @kumaraditya303
    kumaraditya303
    on Dec 20, 2022
    Contributor
    More actions

    Duplicate of #100348

  13. kumaraditya303
    marked this as a duplicate of asyncio._SelectorSocketTransport: help garbage collector #100348 on Dec 20, 2022
  14. kumaraditya303
    closed this as not plannedon Dec 20, 2022
  15. Repository owner moved this from Todo to Done in asyncioon Dec 20, 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.12only security fixesonly security fixesperformancePerformance or resource usagePerformance or resource usagetopic-asyncio

    Projects

    • asyncio
      Status
      Done
      Show more project fields

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.