New submission from STINNER Victor:

When storing an exception in an asyncio Future object, there is a high risk of 
creating a reference cycle. In Python 3, exception objects store a traceback 
object which store frame objects. The problem is that a frame can also have a 
reference to the exception: we have a reference cycle (exception -> traceback 
-> frame -> same exception).

In debug mode, Future.set_exception() can schedule a task (ex: using 
loop.call_soon) to check that there is no reference cycle.

See also the issue #23587: "asyncio: use the new traceback.TracebackException 
class".

----------
components: asyncio
messages: 246499
nosy: gvanrossum, haypo, yselivanov
priority: normal
severity: normal
status: open
title: asyncio: add background task detecting reference cycles
versions: Python 3.6

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue24598>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to