grpc / grpc/grpc-rust

Received 'Status::internal("Missing request message.")' in case of cancellation by client

Open
#2,410 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
12.5k
Forks
1.3k
Avg merge
4d 7h
Merged PRs (30d)
24

Description

## Bug Report

### Version
Verified it in tonic 0.12 and 0.14.

### Platform
- 24.6.0 Darwin Kernel
- Verified on linux as well.

### Crates
tonic

### Description

If the cancellation is sent from the client before the full request message reached the server, it leads to `Status::internal("Missing request message.")`.

I reproduced this issue locally by java gRPC client (with hedging) and tonic server with request size of around 1 MB.

Error is thrown [here](https://github.com/hyperium/tonic/blob/d02ee2d1dba2f77570097cbbd87a611399ea98c1/tonic/src/server/grpc.rs#L386).

Expected Behaviour:

- Case1: If the cancellation is sent from the client before the full request message reached the server, then request future must be dropped and no response/error should be returned to the tower layers.
- Case2: If the cancellation is sent from the client after the full request message reached the server, then request future must be dropped and no response/error should be returned to the tower layers. **This is working as expected.**

I'm not sure if this is the intended behaviour that needs to be handled by the server. In my opinion, case 1 should drop the future instead of return `Status::internal("Missing request message.")`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.