-
Notifications
You must be signed in to change notification settings - Fork 93
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.end() on stream closed from other side leaves protocol in a broken state and raises h2 exception #117
Comments
The reason you get these errors is because "your" code handles You get the first exception because you try to continue work with a closed stream, we probably received You get the second exception because you don't re-raise original exception and Here is the corresponding docs: https://grpclib.readthedocs.io/en/latest/errors.html#client-side |
Ah, I see, didn't think it could be context's responsibility to handle these. Thank you for detailed explaination, and apologies for a bogus report. |
See vmagamedov/grpclib#117 for more information
See vmagamedov/grpclib#117 for more information
Hi,
I'm not very familiar with gRPC and grpclib, so feel free to correct me on anything below, as I might be misunderstanding what's going on here.
Have following issue when gRPC stream gets closed:
If I understand correctly, stream is already closed from the other side (etcd daemon there logs error, so I assume does some kind of closing too), and attempting to "end" it via grpclib fails, as it tries to send something gRPC-related there, which it can't do in this state.
This looks like a bug, as underlying h2 exception slips through the stack instead of grpclib's StreamTerminatedError or something like that, if anything should be raised here at all.
And this also does not finish closing the stream, leading to following error, I assume when GC collects the stream, if ignored:
I.e. there doesn't seem to be a way to handle such case cleanly in grpclib-using application at the moment, as stream.end() does not work and yet not ending the stream is a ProtocolError.
Seem to be happening here when communicating with etcd using grpclib-0.3.2 and grpclib-0.4.0rc1 installed from current git 87cc902 via
pip install --user https://github.com/vmagamedov/grpclib/
.The text was updated successfully, but these errors were encountered: