Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release/6.0] [HTTP/3] Fix content stream read hang #58460

Merged
merged 2 commits into from
Sep 2, 2021

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Aug 31, 2021

Backport of #58296 to release/6.0

The fix is similar to PR #56892 but for another branch (when data is buffered). The root cause is the same - if there's still space in user's buffer we'd start waiting for the next data frame to arrive (which will not happen in echo scenario).

Current code (including #56892 change) may be inefficient in case of small data frames that may be already available in transport, but refactoring that is too large of a change if we consider backporting. I thought #56891 would cover that, but it's QUIC specific, while we also have HTTP/3 specific problem here. I will create another issue later.

Fixes #57888

/cc @CarnaViire

Customer Impact

Reading from an HTTP/3 Response Content stream with large buffer size (bigger than available data) can hang.

Conditions for hitting the hang:

  • the user's buffer is bigger than available data (full data frame, or the end of current data frame if it was partially read before)
  • end of the current data frame is internally buffered
  • next data frame is not available

Testing

Functional test added, other HTTP/3 tests passed.

Risk

Low, H/3 only code path (hidden behind AppContext switch).
Impact on H/3 is Low/Medium -- it touches on the way Content stream is read, but is something fairly well covered by existing tests and the change is small. The data will be handed over in smaller chunks.

@ghost
Copy link

ghost commented Aug 31, 2021

Tagging subscribers to this area: @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

Issue Details

Backport of #58296 to release/6.0

/cc @CarnaViire

Customer Impact

Testing

Risk

Author: github-actions[bot]
Assignees: -
Labels:

area-System.Net.Http

Milestone: -

@karelz karelz added this to the 6.0.0 milestone Sep 1, 2021
@karelz
Copy link
Member

karelz commented Sep 2, 2021

@danmoseley this is ready for your approval ...

@Anipik
Copy link
Contributor

Anipik commented Sep 2, 2021

@danmoseley can you also add the servicing-approved label after the approval. it will make tracking the changes easier

@danmoseley
Copy link
Member

@danmoseley can you also add the servicing-approved label after the approval. it will make tracking the changes easier

For sure! I'm not using servicing-consider though as that goes to tactics.

@danmoseley
Copy link
Member

Approved - high impact bug in new .NET 6 feature, impact limited to HTTP/3.

@danmoseley danmoseley added the Servicing-approved Approved for servicing release label Sep 2, 2021
@danmoseley danmoseley merged commit b73658a into release/6.0 Sep 2, 2021
@danmoseley danmoseley deleted the backport/pr-58296-to-release/6.0 branch September 2, 2021 18:57
@ghost ghost locked as resolved and limited conversation to collaborators Oct 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Net.Http Servicing-approved Approved for servicing release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants