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 <1575924458.67.0.403977169674.issue39010@roundup.psfhosted.org>
In-reply-to
Content
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\proactor_events.py", line 768, in _loop_self_reading
    f.result()  # may raise
  File "C:\Python38\lib\asyncio\windows_events.py", line 808, in _poll
    value = callback(transferred, key, ov)
  File "C:\Python38\lib\asyncio\windows_events.py", 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:
    prompt('>')

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

See also: https://github.com/prompt-toolkit/python-prompt-toolkit/issues/1023
History
Date User Action Args
2019-12-09 20:47:38Jonathan Slenderssetrecipients: + Jonathan Slenders, asvetlov, yselivanov
2019-12-09 20:47:38Jonathan Slenderssetmessageid: <1575924458.67.0.403977169674.issue39010@roundup.psfhosted.org>
2019-12-09 20:47:38Jonathan Slenderslinkissue39010 messages
2019-12-09 20:47:38Jonathan Slenderscreate