[issue46954] Awaiting multiple times on same task increases memory usage unboundedly

2022-03-09 Thread Irit Katriel
Irit Katriel added the comment: This is a duplicate of bpo-45924. The traceback accumulates another frame every time the exception is raised. To see that, change main in your script to async def main(): task = asyncio.create_task(task_that_raise()) while True: try:

[issue46954] Awaiting multiple times on same task increases memory usage unboundedly

2022-03-08 Thread David M.
New submission from David M. : Awaiting multiple times on a single task that failed with an exception results in an unbounded increase in memory usage. Enough repeated "await"s of the task can result in an OOM. The same pattern on a task that didn't raise an exception behaves as expected.