netty: Ignore inbound frames without a transport state - #13073
Open
NianJiuZst wants to merge 1 commit into
Open
NianJiuZst wants to merge 1 commit into
NianJiuZst wants to merge 1 commit into
Conversation
Guard HEADERS and DATA callbacks when the HTTP/2 stream has no associated gRPC TransportState. Return discarded DATA payload and padding to the inbound flow controller, and keep notifying keepalive for received frames. Add decoder-level regression coverage for headers, trailers, and DATA with and without END_STREAM, including buffer release and flow control. Fixes grpc#13065.
NianJiuZst
marked this pull request as ready for review
September 23, 2026 15:38
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
HEADERS and DATA callbacks dereference a null
TransportStatewhen the HTTP/2 stream exists without an associated gRPC stream, which can shut down the client connection. Ignore these headers and return the discarded DATA payload and padding to Netty's inbound flow controller. Keepalive still observes the received frames.Add four regression tests that feed serialized frames through the decoder, covering headers, trailers, and DATA with and without END_STREAM. They check buffer release, consumed flow-control bytes, keepalive notifications, and continued delivery to another stream.
Fixes #13065.
Validation
9e0ff283e9a727546c46d889e02a9376c36ab411.NettyClientHandlerTest: 63 tests passed after the fix.NettyServerTest.multiPortConnectionsandNettyServerTest.connectionSettingsPropagatedboth also time out after 60 seconds at the same stack locations in a clean checkout of upstream9e0ff283e. The full suite is not green locally.The tests construct the missing-transport-state condition deterministically; they do not reproduce the original Pub/Sub startup race.