Blocking stub blocks indefinitely if client exceeds max outbound message size
- Dominant language
- Java
- Stars
- 12.1k
- Forks
- 4k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 37
Description
### What version of gRPC-Java are you using?
1.72.0
### What is your environment?
Linux - Ubuntu 22.04.5 LTS
JDK - jdk-corretto_21.0.1.12.1
Repro repository - https://github.com/jackrwoods/grpc-problem-repro
### What did you expect to see?
In the console output, I expect to see "Sending message (Java)" followed by an exception/stacktrace that should interrupt and exit the application
### What did you see instead?
In the console output, I see "Sending message (Java)" and an exception, but the application hangs and does not exit.
### Steps to reproduce the bug
1. Clone the repository https://github.com/jackrwoods/grpc-problem-repro
2. Within the repository, run `./gradlew build`
3. Within the repository, run `./gradlew run`
4. Observe that the application does not exit.
---
When using a blocking stub to frame a grpc message, I am observing that my GRPC call parks the calling thread indefinitely. I always see a logged exception detailing why the request failed, but the GRPC call does not return.
I have set up a repro in this repository: [jackrwoods/grpc-problem-repro](https://github.com/jackrwoods/grpc-problem-repro). I've reproduced this behavior with a "blocking" stub ([jackrwoods/grpc-problem-repro@main/src/main/java/org/example/Main.java](https://github.com/jackrwoods/grpc-problem-repro/blob/main/src/main/java/org/example/Main.java)) and a coroutine stub wrapped with a runBlocking ([jackrwoods/grpc-problem-repro@main/src/main/kotlin/org/example/MainKotlinCoroutineVersion.kt](https://github.com/jackrwoods/grpc-problem-repro/blob/main/src/main/kotlin/org/example/MainKotlinCoroutineVersion.kt?)). In both cases, the application hangs when the maximum GRPC message size is exceeded.
Is this user (me) error, or is there a workaround?
Contributor guide
Assessment
This issue has not been assessed yet.