Repository navigation
gh-158688: Fix crash when dumping a deep chain of awaiting tasks - #158960
deadlovelll wants to merge 5 commits into
Conversation
|
@maurycy happy to see your review here =) |
|
@deadlovelll Thank you! I will try to do so over the weekend. |
| self.assertEqual(asyncio.run(rec(3)), ["rec"] * 4) | ||
|
|
||
| @skip_if_not_supported | ||
| def test_deep_awaiter_chain_is_walked_fully(self): |
There was a problem hiding this comment.
Can we add a graph where two waiters share the same parent? Both changed tests still pass without the seen set. The extra b task does not make the walk visit a task twice.
My shared-parent check returns root, p, q, shared, shared without seen. It returns four unique tasks with this patch. A cycle case can also check that the walk terminates.
There was a problem hiding this comment.
yes. just pushed the change!
There was a problem hiding this comment.
@deadlovelll Does the crash still happen after merging #153365? My understanding is that we only get RuntimeError, and the visited set was added in #161508. And, if I'm reading the PR right, it effectively removes the 16384 limit for get_async_stack_trace() and keeps it only for futures from get_all_awaited_by().
Fix crash when dumping a deep chain of awaiting tasks
For details see gh-158688