Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal error on transport TCPTransport (error status in uv_stream_t.shutdown callback) #244

Closed
lgrahl opened this issue Apr 8, 2019 · 7 comments

Comments

@lgrahl
Copy link

lgrahl commented Apr 8, 2019

  • 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.

@bsergean
Copy link

I'm also getting that error + I'm using the same websocket library (and python 3.7.3 on alpine linux)

@jlaine
Copy link
Contributor

jlaine commented Aug 24, 2019

This may have been solved by ef29dab could you give uvloop 0.13.0 a spin a report back?

bsergean pushed a commit to machinezone/cobra that referenced this issue Aug 24, 2019
… on transport TCPTransport](MagicStack/uvloop#244) kind of errors. Dockerfile uses Python 3.7.4
@bsergean
Copy link

Looks like the problem is gone (I also switched to python 3.7.4 btw). Thanks for the hint @jlaine !

@jlaine
Copy link
Contributor

jlaine commented Aug 25, 2019

@lgrahl as it's your issue could you give it a go and report back?

@Prideauxx
Copy link

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.

@bsergean
Copy link

bsergean commented Sep 6, 2019

Have you tried with python 3.7 ?

@fantix
Copy link
Member

fantix commented Sep 9, 2022

Closing for now, please feel free to reply/open a new issue.

@fantix fantix closed this as not planned Won't fix, can't repro, duplicate, stale Sep 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants