Skip to content

HTTP2/3: Less NO_ERROR in RST_STREAM - #40729

Closed
botengyao wants to merge 14 commits into
envoyproxy:mainfrom
botengyao:less_no_error
Closed

botengyao wants to merge 14 commits into
envoyproxy:mainfrom
botengyao:less_no_error

Conversation

@botengyao

@botengyao botengyao commented Aug 15, 2025 •

Copy link
Copy Markdown
Member
  1. This PR makes Envoy generate less NO_ERROR from the codec when there is a remote reset
  2. Defaulted to the INTERNAL_ERROR generation

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

Commit Message:
Additional Description:
Risk Level:
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
Fixes: #36200
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]

@repokitteh-read-only

Copy link
Copy Markdown

As a reminder, PRs marked as draft will not be automatically assigned reviewers,
or be handled by maintainer-oncall triage.

Please mark your PR as ready when you want it to be reviewed!

🐱

Caused by: #40729 was opened by botengyao.

see: more, trace.

@repokitteh-read-only

Copy link
Copy Markdown

CC @envoyproxy/runtime-guard-changes: FYI only for changes made to (source/common/runtime/runtime_features.cc).
CC @envoyproxy/api-shepherds: Your approval is needed for changes made to (api/envoy/|docs/root/api-docs/).
envoyproxy/api-shepherds assignee is @mattklein123
CC @envoyproxy/api-watchers: FYI only for changes made to (api/envoy/|docs/root/api-docs/).

🐱

Caused by: #40729 was opened by botengyao.

see: more, trace.

Signed-off-by: Boteng Yao <[email protected]>
@github-actions

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@github-actions github-actions Bot added the stale stalebot believes this issue/PR has not been touched recently label Sep 14, 2025
@botengyao botengyao added no stalebot Disables stalebot from closing an issue and removed stale stalebot believes this issue/PR has not been touched recently labels Sep 15, 2025
@botengyao botengyao removed the no stalebot Disables stalebot from closing an issue label Sep 23, 2025
Signed-off-by: Boteng Yao <[email protected]>
Signed-off-by: Boteng Yao <[email protected]>
@botengyao botengyao changed the title HTTP2/3: handle remote reset NO_ERROR and add PROTO_ERROR HTTP2/3: better handle remote reset NO_ERROR Sep 23, 2025
@botengyao botengyao changed the title HTTP2/3: better handle remote reset NO_ERROR HTTP2/3: less remote reset with NO_ERROR Sep 23, 2025
@botengyao
botengyao marked this pull request as ready for review September 24, 2025 04:24
@botengyao

Copy link
Copy Markdown
Member Author

/assign @wbpcode

@botengyao botengyao changed the title HTTP2/3: less remote reset with NO_ERROR HTTP2/3: Less NO_ERROR in RST_STREAM Sep 24, 2025
@botengyao

Copy link
Copy Markdown
Member Author

There are more test failures related to how RST is handled.

/wait

@botengyao botengyao closed this Oct 2, 2025
@botengyao
botengyao deleted the less_no_error branch October 2, 2025 04:50
@botengyao
botengyao restored the less_no_error branch October 2, 2025 04:50
@botengyao botengyao reopened this Oct 9, 2025
Signed-off-by: Boteng Yao <[email protected]>
Signed-off-by: Boteng Yao <[email protected]>

@mattklein123 mattklein123 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is a very large behavior change and it's not really clear to me that it's the right one. Can you provide more information on the rationale?

/wait

Comment thread source/common/http/http2/codec_impl.cc Resolved
@github-actions

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@github-actions github-actions Bot added the stale stalebot believes this issue/PR has not been touched recently label Nov 12, 2025
Signed-off-by: Boteng Yao <[email protected]>
@botengyao botengyao removed the stale stalebot believes this issue/PR has not been touched recently label Nov 18, 2025
response_encoder_->encodeData(body, true);
EXPECT_CALL(server_stream_callbacks_, onResetStream(StreamResetReason::LocalReset, _));
EXPECT_CALL(server_codec_event_callbacks_, onCodecLowLevelReset());
EXPECT_CALL(server_codec_event_callbacks_, onCodecLowLevelReset()).Times(2);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I didn't get this when I am trying to understand the whole change. The onCodecLowLevelReset() obviously should be called once. If the test is correct and match our actual behaivor, then that means our code has bug. if the test doesn't match the actual behavior, then that means there is a test bug. Orz

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This was introduced from #37784 I believe, and in general it makes sense to have a callback when getting the RST_STREAM from codec, not only the active reset, then I am not sure if this is a bug or to fix some bug if the onCodecLowLevelReset is called and can be called multiple times.

@wbpcode wbpcode Nov 26, 2025 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yeah. I just figured out it and have created an issue. I think it's a bug and have made a workaround within my PR.

@botengyao

Copy link
Copy Markdown
Member Author

There are some issues that needs to sort out that I didn't put enough time on it, working with @wbpcode for this change.

Converting to draft now.

@botengyao
botengyao marked this pull request as draft November 25, 2025 18:27
@botengyao botengyao closed this Dec 4, 2025
wbpcode added a commit that referenced this pull request Dec 4, 2025
…42269)

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](https://github.com/envoyproxy/envoy/blob/main/api/review_checklist.md):]

---------

Signed-off-by: wbpcode <[email protected]>
Signed-off-by: code <[email protected]>
grnmeira pushed a commit to grnmeira/envoy that referenced this pull request Mar 20, 2026
…nvoyproxy#42269)

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
envoyproxy#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
envoyproxy#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](https://github.com/envoyproxy/envoy/blob/main/api/review_checklist.md):]

---------

Signed-off-by: wbpcode <[email protected]>
Signed-off-by: code <[email protected]>
Signed-off-by: Gustavo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HTTP2 locally-originated stream resets use the NO_ERROR code

3 participants