Fatal error on transport TCPTransport (error status in uv_stream_t.shutdown callback)
- uvloop version: 0.12.2
- Python version: 3.7.1
- Platform: Ubuntu 18.04.2 LTS
We're encountering the following fatal error on a daily basis on our production server using @aaugustin's WebSocket implementation:
Fatal error on transport TCPTransport (error status in uv_stream_t.shutdown callback)
protocol: <websockets.server.WebSocketServerProtocol object at 0x7fc1a3bd8f98>
transport: <TCPTransport closed=False reading=False 0x1cc72c8>
OSError: [Errno 107] Transport endpoint is not connected
Apparently this happens when reading using a subclassed asnycio.StreamReader since the websockets library subsequently raises a ConnectionClosed error in its recv function.
Unfortunately, I was not able to reproduce this locally and I honestly don't really know where to look either.
I'm also getting that error + I'm using the same websocket library (and python 3.7.3 on alpine linux)
This may have been solved by https://github.com/MagicStack/uvloop/commit/ef29dab2c80e7d5497f288deb7a817b873a188ab could you give uvloop 0.13.0 a spin a report back?
Looks like the problem is gone (I also switched to python 3.7.4 btw). Thanks for the hint @jlaine !
@lgrahl as it's your issue could you give it a go and report back?
I'm having the same/similar issue using 0.13.0 with streaming protocol (TCP):
protocol: <loader_comms.AsyncLoaderServiceProtocol object at 0x7f63564f1a58>
transport: <TCPTransport closed=False reading=False 0x17f0da8>
Traceback (most recent call last):
File "uvloop/handles/stream.pyx", line 769, in uvloop.loop.__uv_stream_on_read_common
File "uvloop/handles/stream.pyx", line 615, in uvloop.loop.UVStream._on_eof
File "/usr/lib/python3.5/asyncio/protocols.py", line 94, in eof_received
def eof_received(self):
File "./iteration_manager.py", line 267, in sig_handler
sys.exit(0)
SystemExit: 0
Attempted same shutdown with base asyncio; issue not present there. Thank you for looking at this.
Have you tried with python 3.7 ?
Closing for now, please feel free to reply/open a new issue.