[issue34159] asyncio basic event loop stuck with no tasks scheduled or ready

Sheng Zhong report at bugs.python.org
Thu Jul 19 18:19:35 EDT 2018


New submission from Sheng Zhong <zhsh at umich.edu>:

An exception is raised and propagates up the call stack without being consumed until the asyncio/events.py:_run function. The exception seemingly doesn't get consumed according to my breakpoint (quite strange and a part of my confusion) but the task does get removed from the next loop cycle as expected. 

However, a subsequent call to the loop's _run_once() gets stuck forever on `event_list = self._selector.select(timeout)` with no tasks in its `_ready` or `_scheduled` queue. 

A snippet of the debug session is below
https://i.imgur.com/YLcU8I6.png 

Shouldn't an event loop with no tasks left exit?

----------
components: asyncio
messages: 321969
nosy: Sheng Zhong, asvetlov, yselivanov
priority: normal
severity: normal
status: open
title: asyncio basic event loop stuck with no tasks scheduled or ready
type: behavior
versions: Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34159>
_______________________________________


More information about the Python-bugs-list mailing list