[issue38856] asyncio ProactorEventLoop: wait_closed() can raise ConnectionResetError

2021-08-12 Thread Artem


Artem  added the comment:

Python 3.9.6 Linux same issue.

--
nosy: +seer
versions: +Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38856] asyncio ProactorEventLoop: wait_closed() can raise ConnectionResetError

2020-07-16 Thread Chris Meyer


Change by Chris Meyer :


--
nosy: +cmeyer

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38856] asyncio ProactorEventLoop: wait_closed() can raise ConnectionResetError

2020-07-16 Thread Bas Nijholt


Bas Nijholt  added the comment:

I have noticed the following on Linux too:
```
Traceback (most recent call last):
  File "/config/custom_components/kef_custom/aiokef.py", line 327, in 
_disconnect
await self._writer.wait_closed()
  File "/usr/local/lib/python3.7/asyncio/streams.py", line 323, in wait_closed
await self._protocol._closed
  File "/config/custom_components/kef_custom/aiokef.py", line 299, in 
_send_message
await self._writer.drain()
  File "/usr/local/lib/python3.7/asyncio/streams.py", line 339, in drain
raise exc
  File "/usr/local/lib/python3.7/asyncio/selector_events.py", line 814, in 
_read_ready__data_received
data = self._sock.recv(self.max_size)
ConnectionResetError: [Errno 104] Connection reset by peer
```
after which every invocation of `await asyncio.open_connection` fails with 
`ConnectionRefusedError` until I restart the entire Python process.

IIUC, just ignoring the exception will not be enough.

This issue is about the `ProactorEventLoop` for Windows specifically, however, 
my process uses the default event loop on Linux.

--
nosy: +basnijholt

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38856] asyncio ProactorEventLoop: wait_closed() can raise ConnectionResetError

2020-03-22 Thread Ido Michael


Change by Ido Michael :


--
nosy:  -Ido Michael

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38856] asyncio ProactorEventLoop: wait_closed() can raise ConnectionResetError

2020-03-16 Thread STINNER Victor


Change by STINNER Victor :


--
nosy:  -vstinner

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38856] asyncio ProactorEventLoop: wait_closed() can raise ConnectionResetError

2020-03-15 Thread Kyle Stanley


Kyle Stanley  added the comment:

> Is this open for a PR?

I opened a PR for this issue a bit ago (applies Yury's suggestion of 
suppressing the exception), just waiting on review from Andrew when he finds 
the time to do so.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38856] asyncio ProactorEventLoop: wait_closed() can raise ConnectionResetError

2020-03-15 Thread Ido Michael


Ido Michael  added the comment:

Is this open for a PR?

--
nosy: +Ido Michael

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38856] asyncio ProactorEventLoop: wait_closed() can raise ConnectionResetError

2020-02-25 Thread Łukasz Langa

Łukasz Langa  added the comment:

Downgrading priority on this, agreed with Victor.

--
priority: release blocker -> high

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38856] asyncio ProactorEventLoop: wait_closed() can raise ConnectionResetError

2020-01-27 Thread Kyle Stanley


Change by Kyle Stanley :


--
keywords: +patch
pull_requests: +17577
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/18199

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38856] asyncio ProactorEventLoop: wait_closed() can raise ConnectionResetError

2020-01-27 Thread Kyle Stanley


Kyle Stanley  added the comment:

> The exception should probably be just ignored.

It looks like the "ERROR_NETNAME_DELETED" (win32 error 64) exception is already 
ignored in multiprocessing's connection.wait(): 
https://github.com/python/cpython/blob/bccacd19fa7b56dcf2fbfab15992b6b94abb/Lib/multiprocessing/connection.py#L857.
 Would it be appropriate to ignore it here as well?

I think that we should still retain the ConnectionResetError for 
"ERROR_OPERATION_ABORTED", but just specifically ignore 
"ERROR_NETNAME_DELETED". Ignoring "ERROR_OPERATION_ABORTED" doesn't seem 
correct here since it's relied on for cancelling file I/O (see 
https://docs.microsoft.com/en-us/windows/win32/fileio/canceling-pending-i-o-operations).

The patch should be straightforward. I'll test it locally and then open a PR, 
unless Andrew is currently working on it.

--
nosy: +aeros

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38856] asyncio ProactorEventLoop: wait_closed() can raise ConnectionResetError

2020-01-21 Thread STINNER Victor


Change by STINNER Victor :


--
components: +Windows, asyncio
nosy: +paul.moore, steve.dower, tim.golden, zach.ware

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38856] asyncio ProactorEventLoop: wait_closed() can raise ConnectionResetError

2020-01-21 Thread STINNER Victor


Change by STINNER Victor :


--
title: wait_closed() can raise ConnectionResetError -> asyncio 
ProactorEventLoop: wait_closed() can raise ConnectionResetError

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com