Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

asyncio._wait() don't remove callback in case of exception #80794

Closed
gescheit mannequin opened this issue Apr 12, 2019 · 3 comments
Closed

asyncio._wait() don't remove callback in case of exception #80794

gescheit mannequin opened this issue Apr 12, 2019 · 3 comments
Labels
3.7 (EOL) end of life 3.8 (EOL) end of life performance Performance or resource usage topic-asyncio

Comments

@gescheit
Copy link
Mannequin

gescheit mannequin commented Apr 12, 2019

BPO 36613
Nosy @asvetlov, @gescheit, @1st1, @miss-islington
PRs
  • bpo-36613: call remove_done_callback if exception #12800
  • [3.7] bpo-36613: call remove_done_callback if exception (GH-12800) #13076
  • Files
  • asyncio_wait_callbacks_leak.py
  • 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-05-03.15:19:10.123>
    created_at = <Date 2019-04-12.12:38:08.366>
    labels = ['3.8', 'expert-asyncio', '3.7', 'performance']
    title = "asyncio._wait() don't remove callback in case of exception"
    updated_at = <Date 2019-05-03.15:35:54.977>
    user = 'https://github.com/gescheit'

    bugs.python.org fields:

    activity = <Date 2019-05-03.15:35:54.977>
    actor = 'miss-islington'
    assignee = 'none'
    closed = True
    closed_date = <Date 2019-05-03.15:19:10.123>
    closer = 'asvetlov'
    components = ['asyncio']
    creation = <Date 2019-04-12.12:38:08.366>
    creator = 'gescheit'
    dependencies = []
    files = ['48263']
    hgrepos = []
    issue_num = 36613
    keywords = ['patch']
    message_count = 3.0
    messages = ['340034', '341343', '341345']
    nosy_count = 4.0
    nosy_names = ['asvetlov', 'gescheit', 'yselivanov', 'miss-islington']
    pr_nums = ['12800', '13076']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'resource usage'
    url = 'https://bugs.python.org/issue36613'
    versions = ['Python 3.7', 'Python 3.8']

    @gescheit
    Copy link
    Mannequin Author

    gescheit mannequin commented Apr 12, 2019

    Attached script shows unexpected behavior of the wait() function.
    The wait_ function adds done callback on every call and removes it only if a waiter is successfully awaited. In case of CancelledError exception during "await waiter", callbacks are being accumulated infinitely in task._callbacks.

    @gescheit gescheit mannequin added 3.7 (EOL) end of life 3.8 (EOL) end of life topic-asyncio performance Performance or resource usage labels Apr 12, 2019
    @miss-islington
    Copy link
    Contributor

    New changeset c1964e9 by Miss Islington (bot) (gescheit) in branch 'master':
    bpo-36613: call remove_done_callback if exception (GH-12800)
    c1964e9

    @asvetlov asvetlov closed this as completed May 3, 2019
    @miss-islington
    Copy link
    Contributor

    New changeset 769ac7e by Miss Islington (bot) in branch '3.7':
    bpo-36613: call remove_done_callback if exception (GH-12800)
    769ac7e

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.7 (EOL) end of life 3.8 (EOL) end of life performance Performance or resource usage topic-asyncio
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants