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

Http2_MultipleConnectionsEnabled_IdleConnectionTimeoutExpired_ConnectionRemovedAndNewCreated test failure #40115

Closed
jkotas opened this issue Jul 30, 2020 · 8 comments · Fixed by #40209, #40464 or #40844
Assignees
Labels
area-System.Net.Http test-bug Problem in test source code (most likely)
Milestone

Comments

@jkotas
Copy link
Member

jkotas commented Jul 30, 2020

System.Net.Http.Functional.Tests.SocketsHttpHandlerTest_Http2.Http2_MultipleConnectionsEnabled_IdleConnectionTimeoutExpired_ConnectionRemovedAndNewCreated [FAIL]
     Assert.Equal() Failure
     Expected: 2
     Actual:   1
     Stack Trace:
       /_/src/libraries/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.cs(2176,0): at System.Net.Http.Functional.Tests.SocketsHttpHandlerTest_Http2.Http2_MultipleConnectionsEnabled_IdleConnectionTimeoutExpired_ConnectionRemovedAndNewCreated()
       --- End of stack trace from previous location ---

Failed in #40053 on net5.0-Linux-Debug-x64-CoreCLR_release-Debian.9.Amd64.Open

Log: https://github.com/dotnet/runtime/pull/40053/checks?check_run_id=925107221

@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added area-System.Net.Http untriaged New issue has not been triaged by the area owner labels Jul 30, 2020
@ghost
Copy link

ghost commented Jul 30, 2020

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

@ghost
Copy link

ghost commented Jul 30, 2020

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

@ManickaP
Copy link
Member

cc: @alnikola

@alnikola
Copy link
Contributor

It's caused by a test agent perf downgrade. A bit later, I will try to adjust timeouts again.

@karelz karelz added test-bug Problem in test source code (most likely) and removed untriaged New issue has not been triaged by the area owner labels Jul 30, 2020
@karelz karelz added this to the 5.0.0 milestone Jul 30, 2020
@eerhardt
Copy link
Member

eerhardt commented Aug 4, 2020

This just failed again on my PR

https://dev.azure.com/dnceng/public/_build/results?buildId=755967&view=logs&j=71afe768-e493-597c-228c-037834193aeb&t=3e74a8b7-5e62-58f8-6a85-9e36ef39d1c1

https://helix.dot.net/api/2019-06-17/jobs/a9968df9-6b68-4276-bb22-8a2a0a97863f/workitems/System.Net.Http.Functional.Tests/console

    System.Net.Http.Functional.Tests.SocketsHttpHandlerTest_Http2.Http2_MultipleConnectionsEnabled_IdleConnectionTimeoutExpired_ConnectionRemovedAndNewCreated [FAIL]
      Assert.Equal() Failure
      Expected: 2
      Actual:   1
      Stack Trace:
        /_/src/libraries/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.cs(2175,0): at System.Net.Http.Functional.Tests.SocketsHttpHandlerTest_Http2.Http2_MultipleConnectionsEnabled_IdleConnectionTimeoutExpired_ConnectionRemovedAndNewCreated()
        --- End of stack trace from previous location ---

@MihaZupan
Copy link
Member

Looks like the test is failing even after #40464

@v-haren
Copy link

v-haren commented Aug 12, 2020

failed again in job: runtime 20200811.83

failed test: System.Net.Http.Functional.Tests.SocketsHttpHandlerTest_Http2.Http2_MultipleConnectionsEnabled_IdleConnectionTimeoutExpired_ConnectionRemovedAndNewCreated

Error message

Assert.Equal() Failure
Expected: 2
Actual:   1


Stack trace
   at System.Net.Http.Functional.Tests.SocketsHttpHandlerTest_Http2.Http2_MultipleConnectionsEnabled_IdleConnectionTimeoutExpired_ConnectionRemovedAndNewCreated() in /_/src/libraries/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.cs:line 2176
--- End of stack trace from previous location ---

alnikola added a commit that referenced this issue Aug 14, 2020
There are 2 flaky HTTP/2 tests verifying multiple connections feature which are randomly failing on CI, but not locally.
- Http2_MultipleConnectionsEnabled_ConnectionLimitNotReached_ConcurrentRequestsSuccessfullyHandled
- Http2_MultipleConnectionsEnabled_IdleConnectionTimeoutExpired_ConnectionRemovedAndNewCreated

It seems the failure is caused by not reading the request body. In current implementation, `Http2LoopbackServer` read only HEADERS frame via `ReadRequestHeaderAsync` and then immediately sends response. However, the client firstly completely sends headers and body and only then starting reading a response. Thus, it seems to get blocked sometimes if the server didn't read the full body. This PR fixes this by calling `ReadAndParseRequestHeaderAsync` instead of `ReadRequestHeaderAsync`.

Fixes #40436
Fixes #40115
@vcsjones
Copy link
Member

vcsjones commented Aug 26, 2020

@ghost ghost locked as resolved and limited conversation to collaborators Dec 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.