[issue41467] asyncio: recv_into() must not return b'' if the socket/pipe is closed

STINNER Victor report at bugs.python.org
Mon Aug 3 18:44:45 EDT 2020


STINNER Victor <vstinner at python.org> added the comment:

> This bug may be the root cause of bpo-38912 bug.

Yeah, very likely. This bug makes asyncio inconsistent. A transport is "not closed" and "closed" at the same time...

C:\vstinner\python\master\lib\asyncio\proactor_events.py:121: ResourceWarning: unclosed transport <_ProactorReadPipeTransport>
  _warn(f"unclosed transport {self!r}", ResourceWarning, source=self)
ResourceWarning: Enable tracemalloc to get the object allocation traceback

Warning -- Unraisable exception
Exception ignored in: <function _ProactorBasePipeTransport.__del__ at 0x000001F30C938EB0>
Traceback (most recent call last):
  File "C:\vstinner\python\master\lib\asyncio\proactor_events.py", line 122, in __del__
    self.close()
  File "C:\vstinner\python\master\lib\asyncio\proactor_events.py", line 114, in close
    self._loop.call_soon(self._call_connection_lost, None)
  File "C:\vstinner\python\master\lib\asyncio\base_events.py", line 746, in call_soon
    self._check_closed()
  File "C:\vstinner\python\master\lib\asyncio\base_events.py", line 510, in _check_closed
    raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed

----------

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


More information about the Python-bugs-list mailing list