Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

HTTP2: Fix handling of RST_STREAM with error = NO_ERROR after response EndStream - #39882

Merged
geoffkizer merged 5 commits into
dotnet:masterfrom
geoffkizer:fixrststreamnoerror
Aug 5, 2019
Merged

geoffkizer merged 5 commits into
dotnet:masterfrom
geoffkizer:fixrststreamnoerror

Conversation

@geoffkizer

@geoffkizer geoffkizer commented Jul 30, 2019 •

Copy link
Copy Markdown

Fixes #39586
Fixes #40030

The RFC defines special behavior for receiving a RST_STREAM with error = NO_ERROR after the response body stream has been completed. When this happens, a client is supposed to cancel sending the request body but still consider the request successful. Previously, we did not do this.

@danmosemsft This impacts GRPC scenarios and will need to be ported to the 3.0 branch.

@geoffkizer

Copy link
Copy Markdown
Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 4 pipeline(s).

@geoffkizer

Copy link
Copy Markdown
Author

Made some nontrivial changes to address the issues above. @stephentoub can you review again?

@geoffkizer

Copy link
Copy Markdown
Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 4 pipeline(s).

@karelz karelz modified the milestones: 3.0, 5.0 Jul 31, 2019
@geoffkizer geoffkizer modified the milestones: 5.0, 3.0 Aug 2, 2019
@geoffkizer

Copy link
Copy Markdown
Author

@karelz as stated above, we need this fix for 3.0

@geoffkizer

Copy link
Copy Markdown
Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 4 pipeline(s).

@davidsh

davidsh commented Aug 2, 2019

Copy link
Copy Markdown
Contributor

@karelz as stated above, we need this fix for 3.0

I'm fine with that (as 'virtual' karelz while he's OOF).

After this gets merged, please prepare a release/3.0 PR with template etc.

@geoffkizer

Copy link
Copy Markdown
Author

@stephentoub I added a comment; can I get your approval here?

@karelz karelz modified the milestones: 3.0, 5.0 Aug 2, 2019
@karelz

karelz commented Aug 2, 2019

Copy link
Copy Markdown
Member

This PR is in master, hence 5.0. The tracking issue should be 3.0 which will require another PR for 3.0 later. Makes sense?
Milestones in PRs JUST reflect where the specific PR went. Not where else it may have been ported later.

@geoffkizer

Copy link
Copy Markdown
Author

@karelz thanks for the explanation.


if (signalWaiter)
{
_waitSource.SetResult(true);

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.

Why don't we want to do this in the _requestBodyAbandoned == true case?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Because we haven't cancelled the response body in that case. It's the cancellation of the response body that requires us to signal the waiter.

@geoffkizer
geoffkizer force-pushed the fixrststreamnoerror branch from a4706de to 5db7c7c Compare August 5, 2019 16:52
@geoffkizer

Copy link
Copy Markdown
Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 4 pipeline(s).

@geoffkizer

Copy link
Copy Markdown
Author

@stephentoub I refactored to avoid the code duplication. If you have a chance, take one more look.

@geoffkizer

Copy link
Copy Markdown
Author

Also added a fix for #40030.

@geoffkizer

Copy link
Copy Markdown
Author

Ran stress on this for 10 minutes, no errors. Will continue running.

@geoffkizer

geoffkizer commented Aug 5, 2019 •

Copy link
Copy Markdown
Author

@dotnet/dnceng I'm not seeing a link to test failures in the build logs anymore. Am I missing something here?

I go here https://dev.azure.com/dnceng/public/_build/results?buildId=295529 and click on the red stuff under Send to Helix, and there used to be a link to test failures here, but now I don't see it.

@geoffkizer

Copy link
Copy Markdown
Author

Stress ran for an hour with no failures.

@davidsh

davidsh commented Aug 5, 2019 •

Copy link
Copy Markdown
Contributor

@dotnet/dnceng I'm not seeing a link to test failures in the build logs anymore. Am I missing something here?
I go here https://dev.azure.com/dnceng/public/_build/results?buildId=295529 and click on the red stuff under Send to Helix, and there used to be a link to test failures here, but now I don't see it.

You have to scroll the window horizontally a lot to see the link. See:

image

Here are the failures for Outerloop Linux:
https://helix.dot.net/api/2019-06-17/jobs/dd54ab18-9587-4366-aca5-4ae11febefac/workitems/System.IO.FileSystem.Watcher.Tests/console

Here are the failures for Outerloop OSX:
https://helix.dot.net/api/2019-06-17/jobs/c9c4f28d-a589-4e52-bc25-a2e95f963604/workitems/System.Security.Cryptography.X509Certificates.Tests/console

@geoffkizer

Copy link
Copy Markdown
Author

Thanks @davidsh. Though you used to actually see the test failures listed in a table, not just raw console output. Is that no longer available? @dotnet/dnceng

@geoffkizer

Copy link
Copy Markdown
Author

Failures are unrelated

@geoffkizer
geoffkizer merged commit ca6c44b into dotnet:master Aug 5, 2019
@MattGal

MattGal commented Aug 5, 2019

Copy link
Copy Markdown
Member

@geoffkizer this is because with the new version of the Helix Job API runs which were shown on Mission Control (meant to be deprecated for Azure DevOps) now (by design) don't have specific metadata they would need to be viewed on mc.dot.net.

I agree that we definitely need to improve the logging layout of these error log links, but you should be able to answer any question you were able to previously with mc.dot.net with Azure Devops & thes logs; if you find this is not the case please ping me and we'll work on it.

@geoffkizer

Copy link
Copy Markdown
Author

@MattGal So basically, the old tabular view is dead and there's no plan to replace it? And test failures are to be discovered by groveling console output from the test runs?

@davidsh

davidsh commented Aug 5, 2019

Copy link
Copy Markdown
Contributor

On a good day, the summary of test results appears in the 'Tests' tab.
image

Recently, that broke and was showing "write errors". But I think that has been fixed now?

@geoffkizer

Copy link
Copy Markdown
Author

@davidsh Thanks, didn't know that existed.

@MattGal

MattGal commented Aug 5, 2019 •

Copy link
Copy Markdown
Member

@geoffkizer yes I was getting similar screen shots for you:
image
and
image

... all show the stuff from those console logs. In general everything you should have gotten from the old system we're trying to get to Azure Dev Ops, and if there's something you're missing do let us know!

geoffkizer added a commit to geoffkizer/corefx that referenced this pull request Aug 7, 2019
…e EndStream (dotnet#39882)

* fix handling of RST_STREAM with error = NO_ERROR after response EndStream

* eat exception and ensure we don't cancel the response body

* add comment

* add CancelResponseBody to avoid code duplication, and add checks we are not holding the stream object lock when we don't expect to

* fix _expect100ContinueWaiter to use TaskCreationOptions.RunContinuationsAsynchronously
danmoseley pushed a commit that referenced this pull request Aug 8, 2019
…e EndStream (#39882) (#40112)

* fix handling of RST_STREAM with error = NO_ERROR after response EndStream

* eat exception and ensure we don't cancel the response body

* add comment

* add CancelResponseBody to avoid code duplication, and add checks we are not holding the stream object lock when we don't expect to

* fix _expect100ContinueWaiter to use TaskCreationOptions.RunContinuationsAsynchronously
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
…e EndStream (dotnet/corefx#39882)

* fix handling of RST_STREAM with error = NO_ERROR after response EndStream

* eat exception and ensure we don't cancel the response body

* add comment

* add CancelResponseBody to avoid code duplication, and add checks we are not holding the stream object lock when we don't expect to

* fix _expect100ContinueWaiter to use TaskCreationOptions.RunContinuationsAsynchronously


Commit migrated from dotnet/corefx@ca6c44b
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

5 participants