Skip to content

Conversation

@wbpcode
Copy link
Member

@wbpcode wbpcode commented Nov 26, 2025

Commit Message: HTTP2: change the default reset code from no error to internal error
Additional Description:

This PR makes Envoy generate less NO_ERROR from the codec when there is a stream reset to close #36200.

https://httpwg.org/specs/rfc9113.html#RST_STREAM
https://httpwg.org/specs/rfc9113.html#ErrorCodes

Thanks so much for the great work from @botengyao in the #40729

Risk Level: mid.
Testing: unit + integration
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]

@repokitteh-read-only
Copy link

CC @envoyproxy/runtime-guard-changes: FYI only for changes made to (source/common/runtime/runtime_features.cc).

🐱

Caused by: #42269 was opened by wbpcode.

see: more, trace.

Comment on lines -897 to +924
codec_callbacks_->onCodecLowLevelReset();
// TODO(wbpcode): this ensure that onCodecLowLevelReset is only called once. But
// we should replace this with a better design later.
// See https://github.com/envoyproxy/envoy/issues/42264 for why we need this.
if (!codec_low_level_reset_is_called_) {
codec_low_level_reset_is_called_ = true;
codec_callbacks_->onCodecLowLevelReset();
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR changed the default stream reset code and will enlarger the problem in the #42264. So, I made a quick work around to resolve problem here.

@wbpcode
Copy link
Member Author

wbpcode commented Nov 26, 2025

Compare to the change in the #40729, this PR removed all RemoteResetNoError related things. This is because:

  1. error code from remote is untrustable anyway. The server or client may have similar problem of Envoy and abuse NO_ERROR.
  2. upstream remote reset no error not means that we can reset the downstream stream with NO_ERROR because the retrying, L7 filter chain processing and so on.
  3. In the Envoy, the resetStream() should only be called when there is an error. And any other normal response or completion, the end stream flag should be used in the frame.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HTTP2 locally-originated stream resets use the NO_ERROR code

4 participants