This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Jonathan Slenders
Recipients Jonathan Slenders, asvetlov, yselivanov
Date 2019-12-09.20:47:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
We have a snippet of code that runs perfectly fine using the `SelectorEventLoop`, but crashes *sometimes* using the `ProactorEventLoop`.

The traceback is the following. The exception cannot be caught within the asyncio application itself (e.g., it is not attached to any Future or propagated in a coroutine). It probably propagates in `run_until_complete()`.

  File "C:\Python38\lib\asyncio\", line 768, in _loop_self_reading
    f.result()  # may raise
  File "C:\Python38\lib\asyncio\", line 808, in _poll
    value = callback(transferred, key, ov)
  File "C:\Python38\lib\asyncio\", line 457, in finish_recv
    raise ConnectionResetError(*exc.args)

I can see that in `IocpProactor._poll`, `OSError` is caught and attached to the future, but not `ConnectionResetError`. I would expect that `ConnectionResetError` too will be attached to the future.

In order to reproduce, run the following snippet on Python 3.8:

from prompt_toolkit import prompt  # pip install prompt_toolkit
while 1:

Hold down the enter key, and it'll trigger quickly.

See also:
Date User Action Args
2019-12-09 20:47:38Jonathan Slenderssetrecipients: + Jonathan Slenders, asvetlov, yselivanov
2019-12-09 20:47:38Jonathan Slenderssetmessageid: <>
2019-12-09 20:47:38Jonathan Slenderslinkissue39010 messages
2019-12-09 20:47:38Jonathan Slenderscreate