-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Invoke hangs in client after server presents an incorrect certificate #1656
Comments
Invoke
hangs in client after server presents an incorrect certificate
@dfawley can you please take a look? thanks! |
The The error will be a general error "all SubConns are in TransientFailure" now. We will try to include the reason (for example creds handshake errors) in the error message. Non-failfast RPCs will keep waiting for connections to be ready, and will fail with DeadlineExceeded (in theory, the connection could recover, e.g. the resolver might return a new address). Let us know what you think of this behavior. |
Thanks for the fix! We set |
Yep, yyour fix makes sense. Thank you. |
Sounds good. Thanks for confirming. We will still work on including the error details in the RPC errors, but this issue should not be a blocker now. |
Please answer these questions before submitting your issue.
What version of gRPC are you using?
a5986a5
What version of Go are you using (
go version
)?1.6 and 1.8 (same behavior in both)
What operating system (Linux, Windows, …) and version?
Linux (Ubuntu 16.04)
What did you do?
When attempting to update our internal grpc-go at Dropbox to the above version, one of our tests started hanging until killed by a timeout. The test tries to connect to a gRPC server that is presenting a different certificate identity than the client is expecting. This is a regression from the previous version of grpc-go we were using (66c9ed8).
What did you expect to see?
The client should return from
Invoke
with an error.What did you see instead?
The client hung forever unless a timeout was set. This is true even if
FastFail
is set.Tracing into the grpc-go code, the call sequence appears to be as follows:
DialContext
succeeds.WaitForStateChange
eventually fails due to a timeout (as expected because a successful connection cannot be opened to the server presenting the incorrect certificate)Invoke
Invoke
->invoke
(incall.go
) callsgetTransport
getTransport
inclientconn.go
callspick
pick
inpicker_wrapper.go
setsch
tobp.blockingCh
(not the original value on entry)pick
callsPick
, which returns the errorbalancer.ErrNoSubConnAvailable
, causingcontinue
to restart the loop.ch
is nowbp.blockingCh
, sopick
enters the select onch
and at that point blocks forever.At this point, there is no background activity or attempt to re-establish the connection (as determined by annotations inside
ClientHandshake
in theTransportCredentials
), so I see no sign that theInvoke
call will ever recover barring a timeout.The text was updated successfully, but these errors were encountered: