Skip to content

gh-158688: Fix crash when dumping a deep chain of awaiting tasks - #158690

Open
deadlovelll wants to merge 1 commit into
python:mainfrom
deadlovelll:gh-158688-recursion
Open

deadlovelll wants to merge 1 commit into
python:mainfrom
deadlovelll:gh-158688-recursion

Conversation

@deadlovelll

Copy link
Copy Markdown
Contributor

Fix crash when dumping a deep chain of awaiting tasks

For more details see gh-158688

@maurycy

maurycy commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

I think this is a duplicate of #153365

@deadlovelll

Copy link
Copy Markdown
Contributor Author

I think this is a duplicate of #153365

hi! yes, i see problems overlaps. But solutions differ

#153365 keeps no visited set, so the check if there are infinite loop or not only depends on the const (MAX_TASK_WAITER_WALK_TASKS). For example repro from #158688 with range(20000) instead of 5000 will raise an RuntimeError

RuntimeError: Too many task waiters (possible infinite loop)

But actually the program does not produce the infinite loop

I don't think these PRs compete, #153365 covers things mine doesn't. Feel free to cherry pick this commit into your PR =)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants