Skip to content

Conversation

DeagleGross
Copy link
Member

Backport of #63873 to release/9.0

(http2): Lower WINDOWS_UPDATE received on (half)closed stream to stream abortion

Change affects the server HTTP/2 behavior in the case client sends the RST_STREAM frame (moving stream to half-closed or closed state) and then sends another packet - WINDOW_UPDATE. Server behavior varies in this case (RFC HTTP/2 does not describe this case extremely clear) - for example HTTP.SYS does interpet this as a stream-level error (ignore of WINDOW_UPDATE packet); but Kestrel is more strict and sends the GO_AWAY packet closing not only the stream, but also the whole connection.

Such restrictive behavior of Kestrel impacts the client, which observes cancellations and has to re-establish the connection frequently.

Fixes #63726

Customer Impact

1P Customer which processes intensive traffic of another 1P customer with a Golang-based client observes high volume of cancellations. This not only impacts the performance where a new connection has to be established, but also means all streams existing on the connection were lost, resulting in bunch of customers seeing high latency.

Regression?

  • Yes
  • No

Risk

  • High
  • Medium
  • Low

Small change in behavior making Kestrel less restrictive. Also is being tested by the 1P team.

Verification

  • Manual (required)
  • Automated

Packaging changes reviewed?

  • Yes
  • No
  • N/A

When servicing release/2.3

  • Make necessary changes in eng/PatchConfig.props

@DeagleGross DeagleGross requested a review from halter73 as a code owner October 6, 2025 11:37
@Copilot Copilot AI review requested due to automatic review settings October 6, 2025 11:37
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR modifies Kestrel's HTTP/2 behavior to be less restrictive when handling WINDOW_UPDATE frames received on closed/half-closed streams. Instead of aborting the entire connection, it now treats this as a stream-level error, which improves compatibility with clients and reduces connection churn.

  • Changed WINDOW_UPDATE frame handling on reset streams from connection abortion to stream-level error
  • Updated test expectations to reflect the new stream-level error behavior instead of connection-level errors
  • Removed quarantine annotation from related test case

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/Servers/Kestrel/Core/src/Internal/Http2/Http2Connection.cs Modified WINDOW_UPDATE frame processing to throw stream error instead of connection abort
src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/Http2ConnectionTests.cs Updated test to expect stream error and removed quarantine annotation

@dotnet-policy-service dotnet-policy-service bot added this to the 9.0.x milestone Oct 6, 2025
@wtgodbe wtgodbe added Servicing-approved Shiproom has approved the issue Servicing-consider Shiproom approval is required for the issue and removed Servicing-approved Shiproom has approved the issue labels Oct 6, 2025
@rbhanda rbhanda modified the milestones: 9.0.x, 9.0.11 Oct 7, 2025
@rbhanda rbhanda added Servicing-approved Shiproom has approved the issue and removed Servicing-consider Shiproom approval is required for the issue labels Oct 7, 2025
@wtgodbe
Copy link
Member

wtgodbe commented Oct 7, 2025

Failure unrelated

@wtgodbe wtgodbe merged commit d13b3ee into release/9.0 Oct 7, 2025
23 of 25 checks passed
@wtgodbe wtgodbe deleted the dmkorolev/release9.0/h2-windowupdate branch October 7, 2025 20:54
@dotnet-policy-service dotnet-policy-service bot modified the milestone: 9.0.11 Oct 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Servicing-approved Shiproom has approved the issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants