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

ServerCallStreamObserver#isReady seems to be reporting incorrectly causing crashes #10905

Closed
Jrashid1998 opened this issue Feb 8, 2024 · 3 comments
Labels

Comments

@Jrashid1998
Copy link

Jrashid1998 commented Feb 8, 2024

Currently on 1.60.2 for io.grpc:grpc-stub, io.grpc:grpc-protobuf, io.grpc:grpc-netty.
Running a GRPC Java Server routing to a react frontend (using nice-grpc 2.1.4 and nice-grpc-web 1.1.0) via grpc-webproxy v0.15.0

I'm using bidi streaming and we send messages quite heavily from server to client. This is regulated using the isReady() conditional but I've found the stream will crash with a nondescript CLIENT_CANCELLED error unless I manually rate limit what we send through. If I log true/false against the isReady() conditional, I can see it's always true until the stream dies implying there is no regulation.

I am querying the responseObserver for the isReady() condition and I can see a ticket open around how that could be a check for server readiness instead of client however it's still open and the comments seem ambiguous. #8910

If it is only an indication of sending side readiness, is there a way to check client readiness from the server? Happy to provide any more info if needed

@sergiitk
Copy link
Member

Hey @Jrashid1998. Could you please provide the full response you're getting? CLIENT_CANCELLED is not found in our source.
Would be great to have the stack trace of the crash too.

@ejona86
Copy link
Member

ejona86 commented Feb 13, 2024

I would figure that most likely one the other components you are using (e.g., grpc-webproxy) isn't applying flow control/backoff, and when it buffers to much it kills the RPC. grpc-java doesn't behave that way. If the proxy is "near" the server, then gRPC might be sending to it as fast as you are generating messages, so isReady() stays true.

@sergiitk sergiitk added the Waiting on reporter there was a request for more information without a response or answer or advice has been provided label Feb 13, 2024
@sergiitk
Copy link
Member

No response to provide more information, so closing. More information can be provided and then we can reopen.

@sergiitk sergiitk removed the Waiting on reporter there was a request for more information without a response or answer or advice has been provided label Feb 27, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants