[New-bugs-announce] [issue25779] deadlock with asyncio+contextmanager+ExitStack

Jack O'Connor report at bugs.python.org
Wed Dec 2 10:37:25 EST 2015


New submission from Jack O'Connor:

The following hangs at 100% CPU on Python 3.5, though not on Python 3.4:

1) Start an asyncio coroutine with run_until_complete().
2) Inside the coroutine, enter an ExitStack using a with-statement.
3) Inside the with-statement, call ExitStack.enter_context() with a generator context manager. It doesn't matter what the generator yields.
4) After the enter_context() call, raise an exception.

Here's an example script that does all of this and repros the hang: https://gist.github.com/oconnor663/483db2820bb5f877c9ed

----------
components: asyncio
messages: 255719
nosy: gvanrossum, haypo, oconnor663, yselivanov
priority: normal
severity: normal
status: open
title: deadlock with asyncio+contextmanager+ExitStack
type: behavior
versions: Python 3.5

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25779>
_______________________________________


More information about the New-bugs-announce mailing list