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] Abort response stream on dispose if content not finished #57741

Closed
wants to merge 3 commits into from

Conversation

github-actions[bot]
Copy link
Contributor

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

Backport of #57156 to release/6.0

Sends abort read/write if H/3 stream is disposed before respective contents are finished.

Fixes #56129

/cc @ManickaP

Customer Impact

Causes data loss / data corruption on server side.
Blocking ASP.NET (cc @adityamandaleeka)

Testing

CI (tests are part of the PR)
Local stress validation: 10,000 tight loop runs (without the fix it failed in ~500 iterations)

Risk

Low, H/3 only code path (hidden behind AppContext switch).
Impact on H/3 is Low/Medium -- the change is scoped only to error code path.

@ghost
Copy link

ghost commented Aug 19, 2021

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

Issue Details

Backport of #57156 to release/6.0

/cc @ManickaP

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 Aug 19, 2021
@karelz
Copy link
Member

karelz commented Aug 19, 2021

@adityamandaleeka @Tratcher @JamesNK this is one of your blockers -- is it sufficient in RC2? Or do you need it in RC1 as well?

@adityamandaleeka
Copy link
Member

@karelz From the ASP.NET perspective, RC2 will work fine, but that said, we think the behavior here is bad enough to consider getting it into RC1 if possible (the client cancels a request and the server isn't notified, so pending reads will be hung until the connection is killed).

@JamesNK
Copy link
Member

JamesNK commented Aug 19, 2021

When I was testing with the gRPC functional tests I believe I saw this issue cause the server to kill connections:

The client canceled requests, and the unit test went off to do other things, while on the server the request hung around. Sometimes Kestrel DDOS protection would kick in a tear down the connection because data the server was writing wasn't being read by the client. I saw this a couple of days ago so I don't have exact details.

It's not critical to fix immediately, but something to consider.

@karelz
Copy link
Member

karelz commented Aug 20, 2021

@adityamandaleeka @JamesNK your responses on urgency for RC1 seem to be a bit conflicting to me ...
I wonder how common is this problem. I believe for not-so-common stress issue (which this one seems to be - please correct me if I am wrong), it should be fine RC2, given HTTP/3 is in Preview for 6.0.
Thoughts? Did I miss anything?

@karelz
Copy link
Member

karelz commented Aug 20, 2021

CI: 1 failure - we've hit massive long running tests (#56477 - which should be fixed already) on SLES.15.Amd64.Open, unrelated to this PR. I will include it in the #56477 report.

Re-running tests

@JamesNK
Copy link
Member

JamesNK commented Aug 20, 2021

The behavior and outcome are bad if someone cancels an HTTP request that is in the middle of downloading. I don't know how common it is for apps to do that.

@danmoseley
Copy link
Member

Risk

Low, H/3 is hidden behind AppContext switch

That reduces the risk for other scenarios, but we don't want to break HTTP/3 either so it would be good going forward to estimate the risk to that.

Approved for release/6.0 due to high impact.

As far as RC1 goes -- if it would give us more confidence that we are shipping the right change, it's probably worth taking to tactics. (GA quality being much more important than RC1 quality.)

@karelz
Copy link
Member

karelz commented Aug 23, 2021

@danmoseley Risk is updated above. Can you please review? Thanks!

@karelz
Copy link
Member

karelz commented Aug 27, 2021

Not needed, closing. The change is now in RC1 (via PR #57999) which will flow automatically to RC2 (release/6.0) branch.

@karelz karelz closed this Aug 27, 2021
@akoeplinger akoeplinger deleted the backport/pr-57156-to-release/6.0 branch August 28, 2021 22:04
@ghost ghost locked as resolved and limited conversation to collaborators Sep 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants