-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Client-side streaming early OK fails with StatusCode.CANCELLED
from python client
#992
Comments
Yeah interesting, I believe the cancelled comes from the python code since the h2 connection is getting RST. Curious if you could reproduce this with a rust client? |
Hi @LucioFranco , as I stated in my first message I can call rust server from rust client without an issue. I am not familiar with the internals of the In addition, I implemented same server in
*: My rust client gives error below when I try to connect to the go server:
|
So the cancelled is likely returned from the client when it encounters a GoAway/connection drop/request ended before getting the full trailers etc. The error is not passed from server -> client. As for why go works and python does not....that one I don't know I would maybe open an issue in the python implementation? As for your last error there that is just a regular tcp error coming from the tcp connection in the underlying OS, so maybe you're not connecting on the right port etc. |
@LucioFranco I opened an issue in the official |
@LucioFranco are there any update on this issue? |
Hi @ebraraktas I've started to look but have had a few other high priority items come up. I am about to head out on vacation so not sure how far I will get on this until I get back. This sounds like it will need some low level investigation to understand where the gap is. |
Small update: I dug pretty deep into the issue on Friday afternoon (weekend hit before I had time to reply here). From what I can tell the behavior from the Rust side is interesting in that we send a RST_STREAM.Cancel even though we reply with a regular Ok status. My theory has to do with the fact that we drop the RecvStream before the sender side has half-closed it. Will keep looking into this and return with a better answer. |
Once we get the next release out of h2 hyperium/h2#633 this will fix this issue I believe. |
I tried the repro repo with the patch, and indeed it should fix the issue.
At least no traceback |
I confirm that it is fixed. Updated & archived the repro repo. Thanks for your efforts @erebe and @LucioFranco . |
Bug Report
Version
Platform
Darwin Mustafas-MacBook-Pro.local 20.5.0 Darwin Kernel Version 20.5.0: Sat May 8 05:10:33 PDT 2021; root:xnu-7195.121.3~9/RELEASE_X86_64 x86_64
Description
I implemented simple client-side streaming endpoint using
tonic-rs
. It may return early if some condition occurs:However, when I call this server from a simple python client it fails with the exception (
StatusCode.CANCELLED
) below:GitHub repo to reproduce issue: https://github.com/ebraraktas/tonic-client-stream-early-ok
As the Issue section of README of the linked repo states, it runs ok with rust client. I know this may be related with grpc Python, but same server implemented in Python works smoothly if it is called from same Python client.
The text was updated successfully, but these errors were encountered: