asyncio KeyboardInterrupt in select

Thomas Grainger tagrain at gmail.com
Wed Mar 27 14:25:58 EDT 2019


It seems quite easy to cause asyncio to deadlock:

  File "/usr/lib/python3.6/asyncio/base_events.py", line 1404, in _run_once
    event_list = self._selector.select(timeout)
  File "/usr/lib/python3.6/selectors.py", line 445, in select
    fd_event_list = self._epoll.poll(timeout, max_ev)
KeyboardInterrupt
^CError in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/usr/lib/python3.6/concurrent/futures/thread.py", line 40, in
_python_exit
    t.join()
  File "/usr/lib/python3.6/threading.py", line 1056, in join
    self._wait_for_tstate_lock()
  File "/usr/lib/python3.6/threading.py", line 1072, in
_wait_for_tstate_lock
    elif lock.acquire(block, timeout):

and you get a lot of hits for this exception on google:
https://www.google.com/search?q=File+
"/usr/lib/python3.6/selectors.py",+line+445,+in+select+++++fd_event_list+%3D+self._epoll.poll(timeout,+max_ev)+KeyboardInterrupt&filter=0

Thomas Grainger



More information about the Python-list mailing list