Skip to content

Conversation

@wfurt
Copy link
Member

@wfurt wfurt commented Oct 27, 2023

When I look at the normal passing run I see something like

passingTest

when it fails, the exchange looks like
failTest

So it seems like if the GOAWAY is sent before the client even start making request the test fails with Couldn't find HttpProtocolException with matching error code in exception: System.Net.Http.HttpRequestException: An HTTP/2 connection could not be established because the server did not complete the HTTP/2 handshake.

This may (or may not) be caused by the connection pool refactor. Since the requests are now detached, the connection can be closed by the 'GOAWAY` and the request does not fail with protocol error.

To minimize risk, I only changed the test to wait for beginning of the request to arrive so when HttpClient process the response it would produce deterministic result. I was running tests in loop with this change and I did not see failure. It was failing for me before frequently with less than 20-50 iterations.

fixes #92647

@wfurt wfurt added area-System.Net.Http test-enhancement Improvements of test source code labels Oct 27, 2023
@wfurt wfurt added this to the 9.0.0 milestone Oct 27, 2023
@wfurt wfurt requested a review from a team October 27, 2023 20:24
@wfurt wfurt self-assigned this Oct 27, 2023
@ghost
Copy link

ghost commented Oct 27, 2023

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

Issue Details

When I look at the normal passing run I see something like

passingTest

when it fails, the exchange looks like
failTest

So it seems like if the GOAWAY is sent before the client even start making request the test fails with Couldn't find HttpProtocolException with matching error code in exception: System.Net.Http.HttpRequestException: An HTTP/2 connection could not be established because the server did not complete the HTTP/2 handshake.

This may (or may not) be caused by the connection pool refactor. Since the requests are now detached, the connection can be closed by the 'GOAWAY` and the request does not fail with protocol error.

To minimize risk, I only changed the test to wait for beginning of the request to arrive so when HttpClient process the response it would produce deterministic result. I was running tests in loop with this change and I did not see failure. It was failing for me before frequently with less than 20-50 iterations.

fixes #92647

Author: wfurt
Assignees: wfurt
Labels:

area-System.Net.Http, test-enhancement

Milestone: 9.0.0

Copy link
Contributor

@antonfirsov antonfirsov left a comment

Choose a reason for hiding this comment

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

LGTM

@wfurt
Copy link
Member Author

wfurt commented Oct 31, 2023

enterprised-linux failures are unrelated. looks like infrastructure problem.

@ManickaP
Copy link
Member

/backport to release/8.0-staging

@github-actions
Copy link
Contributor

Started backporting to release/8.0-staging: https://github.com/dotnet/runtime/actions/runs/17242678894

@github-actions github-actions bot unlocked this conversation Aug 26, 2025
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 26, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-System.Net.Http test-enhancement Improvements of test source code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Test Failure] Http2_IncorrectServerPreface_RequestFailsWithAppropriateHttpProtocolException

3 participants