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

Make asyncio task groups prevent child tasks from being GCed #93297

Closed
1st1 opened this issue May 27, 2022 · 1 comment
Closed

Make asyncio task groups prevent child tasks from being GCed #93297

1st1 opened this issue May 27, 2022 · 1 comment
Labels
topic-asyncio type-bug An unexpected behavior, bug, or error

Comments

@1st1
Copy link
Member

1st1 commented May 27, 2022

We discovered that sometimes child tasks in a task group can be picked up by a GC which leads to extremely hard to debug problems. This is fixable by switching to use a set() instead of weakset to internally track child tasks. I'll make a PR shortly.

See also edgedb/edgedb#3914.

@1st1 1st1 added the type-bug An unexpected behavior, bug, or error label May 27, 2022
1st1 added a commit to 1st1/cpython that referenced this issue May 27, 2022
miss-islington pushed a commit to miss-islington/cpython that referenced this issue May 27, 2022
…ng GCed (pythonGH-93299)

(cherry picked from commit e6a5767)

Co-authored-by: Yury Selivanov <yury@edgedb.com>
1st1 added a commit that referenced this issue May 27, 2022
GH-93299) (#93305)

(cherry picked from commit e6a5767)

Co-authored-by: Yury Selivanov <yury@edgedb.com>

Co-authored-by: Yury Selivanov <yury@edgedb.com>
@AlexWaygood
Copy link
Member

Closing, as I believe this was fixed in #93299, and backported in #93305. (Please reopen if there's more to do here).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic-asyncio type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

2 participants