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

Stream doesn't know that transport is broken #154

Closed
ghost opened this issue Apr 7, 2015 · 3 comments
Closed

Stream doesn't know that transport is broken #154

ghost opened this issue Apr 7, 2015 · 3 comments

Comments

@ghost
Copy link

ghost commented Apr 7, 2015

How to reproduce:

  1. Do normal server streaming rpc
  2. Streaming runs smoothly
  3. Turn off network
  4. ClientStream.RecvMsg() waits indefinitely, there's no way to cancel
    ServerStream.SendMsg() successfully sending (nil error) until, I assume, transport.defaultWindowSize, there's no way to cancel()
    This happens no matter how long I turn off the network.

Expectation:

  1. Provide a way to cancel method instead of waiting indefinitely.
  2. Stream should be aware of broken transport in the middle of transmission

I provide a gist to help reproduce the problem

@yinhm
Copy link

yinhm commented Apr 9, 2015

I encountered another stream dead lock,

  • server stream handler return error
  • client waits indefinitely(I could use a timeout contenxt, but it wasn't what I want)

I want to produce it by tests then report it, just not have time yet.

@iamqizhao
Copy link
Contributor

I think this is due to the lack of a health checking mechanism to detect the state of transport when no TCP signal (e.g., RST) is generated. The health checking is on our radar but the detailed design has not been fleshed out. For now, you can set a timeout for the entire stream as a workaround. BTW, you can always cancel the rpc via the context binding with the rpc.

For yinhm's question, I have no clue from your simplistic description. Let me know when you have a reproduction.

@iamqizhao
Copy link
Contributor

The thread is unresponsive for long time. close it for now. Feel free to reopen if it sustains.

@lock lock bot locked as resolved and limited conversation to collaborators Sep 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants