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

Failed test SendAsync_CorrectVersionSelected_LoopbackServer #56026

Closed
danmoseley opened this issue Jul 20, 2021 · 2 comments · Fixed by #56552
Closed

Failed test SendAsync_CorrectVersionSelected_LoopbackServer #56026

danmoseley opened this issue Jul 20, 2021 · 2 comments · Fixed by #56552
Assignees
Labels
area-System.Net.Http test-run-core Test failures in .NET Core test runs
Milestone

Comments

@danmoseley
Copy link
Member

Random timeout? I don't see an obvious timeout to increase.

Console log: 'System.Net.Http.Functional.Tests' from job 56296aec-a654-4686-88e7-c8f0d441d37d (ubuntu.1604.amd64.open.svc) using docker image mcr.microsoft.com/dotnet-buildtools/prereqs:centos-8-helix-20201229003624-c1bf759 on a0010UJ

    System.Net.Http.Functional.Tests.HttpClientTest.SendAsync_CorrectVersionSelected_LoopbackServer(requestVersion: 2.0, versionPolicy: RequestVersionExact, serverVersion: 1.1, useSsl: False, expectedResult: typeof(System.Net.Http.HttpRequestException)) [FAIL]
      System.TimeoutException : The operation has timed out.
      Stack Trace:
        /_/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs(49,0): at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks, Int32 millisecondsTimeout)
        /_/src/libraries/Common/tests/System/Net/Http/HttpAgnosticLoopbackServer.cs(161,0): at System.Net.Test.Common.HttpAgnosticLoopbackServer.CreateClientAndServerAsync(Func`2 clientFunc, Func`2 serverFunc, HttpAgnosticOptions httpOptions, Int32 timeout)
        /_/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientTest.cs(1158,0): at System.Net.Http.Functional.Tests.HttpClientTest.SendAsync_CorrectVersionSelected_LoopbackServer(Version requestVersion, HttpVersionPolicy versionPolicy, Version serverVersion, Boolean useSsl, Object expectedResult)
        --- End of stack trace from previous location ---
      Output:
        Server exception: Xunit.Sdk.EqualException: Assert.Equal() Failure
        Expected: typeof(System.Net.Http.HttpRequestException)
        Actual:   2.0
           at Xunit.Assert.Equal[T](T expected, T actual, IEqualityComparer`1 comparer) in C:\Dev\xunit\xunit\src\xunit.assert\Asserts\EqualityAsserts.cs:line 40
           at System.Net.Http.Functional.Tests.HttpClientTest.<>c__DisplayClass54_0.<<SendAsync_CorrectVersionSelected_LoopbackServer>b__1>d.MoveNext() in /_/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientTest.cs:line 1190
  Finished:    System.Net.Http.Functional.Tests
=== TEST EXECUTION SUMMARY ===

https://helixre8s23ayyeko0k025g8.blob.core.windows.net/dotnet-runtime-refs-pull-55960-merge-56296aeca654468688/System.Net.Http.Functional.Tests/console.f68314b8.log?sv=2019-07-07&se=2021-08-08T21%3A40%3A56Z&sr=c&sp=rl&sig=gn3eeIXr5mCpUaeJAcNRg4RqUX8tDRnbOE2fhd1CT24%3D

#55960

@dotnet-issue-labeler dotnet-issue-labeler bot added area-System.Net.Http untriaged New issue has not been triaged by the area owner labels Jul 20, 2021
@ghost
Copy link

ghost commented Jul 20, 2021

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

Issue Details

Random timeout? I don't see an obvious timeout to increase.

Console log: 'System.Net.Http.Functional.Tests' from job 56296aec-a654-4686-88e7-c8f0d441d37d (ubuntu.1604.amd64.open.svc) using docker image mcr.microsoft.com/dotnet-buildtools/prereqs:centos-8-helix-20201229003624-c1bf759 on a0010UJ

    System.Net.Http.Functional.Tests.HttpClientTest.SendAsync_CorrectVersionSelected_LoopbackServer(requestVersion: 2.0, versionPolicy: RequestVersionExact, serverVersion: 1.1, useSsl: False, expectedResult: typeof(System.Net.Http.HttpRequestException)) [FAIL]
      System.TimeoutException : The operation has timed out.
      Stack Trace:
        /_/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs(49,0): at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks, Int32 millisecondsTimeout)
        /_/src/libraries/Common/tests/System/Net/Http/HttpAgnosticLoopbackServer.cs(161,0): at System.Net.Test.Common.HttpAgnosticLoopbackServer.CreateClientAndServerAsync(Func`2 clientFunc, Func`2 serverFunc, HttpAgnosticOptions httpOptions, Int32 timeout)
        /_/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientTest.cs(1158,0): at System.Net.Http.Functional.Tests.HttpClientTest.SendAsync_CorrectVersionSelected_LoopbackServer(Version requestVersion, HttpVersionPolicy versionPolicy, Version serverVersion, Boolean useSsl, Object expectedResult)
        --- End of stack trace from previous location ---
      Output:
        Server exception: Xunit.Sdk.EqualException: Assert.Equal() Failure
        Expected: typeof(System.Net.Http.HttpRequestException)
        Actual:   2.0
           at Xunit.Assert.Equal[T](T expected, T actual, IEqualityComparer`1 comparer) in C:\Dev\xunit\xunit\src\xunit.assert\Asserts\EqualityAsserts.cs:line 40
           at System.Net.Http.Functional.Tests.HttpClientTest.<>c__DisplayClass54_0.<<SendAsync_CorrectVersionSelected_LoopbackServer>b__1>d.MoveNext() in /_/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientTest.cs:line 1190
  Finished:    System.Net.Http.Functional.Tests
=== TEST EXECUTION SUMMARY ===

https://helixre8s23ayyeko0k025g8.blob.core.windows.net/dotnet-runtime-refs-pull-55960-merge-56296aeca654468688/System.Net.Http.Functional.Tests/console.f68314b8.log?sv=2019-07-07&se=2021-08-08T21%3A40%3A56Z&sr=c&sp=rl&sig=gn3eeIXr5mCpUaeJAcNRg4RqUX8tDRnbOE2fhd1CT24%3D

#55960

Author: danmoseley
Assignees: -
Labels:

area-System.Net.Http, untriaged

Milestone: -

@karelz
Copy link
Member

karelz commented Jul 20, 2021

Failures 5/20-7/27 (incl. PRs):

Day Run OS
7/16 PR #55596 Windows.10.Amd64.Server19H1.ES.Open
7/18 PR #55882 Windows.10.Amd64.Server19H1.Open
7/19 PR #55960 Centos.8.Amd64.Open
7/20 PR #56043 OSX.1014.Amd64.Open
7/22 PR #55577 OSX.1014.Amd64.Open
7/23 PR #56232 Windows.81.Amd64.Open
7/27 PR #53645 Ubuntu.1804.Amd64.Open

Likely recent regression, we should take a look in 6.0

@karelz karelz added the test-run-core Test failures in .NET Core test runs label Jul 20, 2021
@karelz karelz changed the title Failure in SendAsync_CorrectVersionSelected_LoopbackServer on Centos 8 Failed test SendAsync_CorrectVersionSelected_LoopbackServer Jul 20, 2021
@karelz karelz removed the untriaged New issue has not been triaged by the area owner label Jul 20, 2021
@karelz karelz added this to the 6.0.0 milestone Jul 20, 2021
@MihaZupan MihaZupan self-assigned this Jul 29, 2021
alnikola added a commit that referenced this issue Jul 30, 2021
In case of an error aborting the connection, there is a race between a thread creating new `Http2Stream` to send a request and the thread looping in `ProcessIncomingFrames` that sets _shutdown flag and `_abortException`. If the request thread first sees `_shutdown == true`, then it won't see the `_abortException` even if it's set, so the request will be retried when it shouldn't.

This PR adds `_abortException` check just before the `_shutdown == true` check to make sure an abort exception is observed.

Fixes #1581 
Fixes #56138
Fixes #56026
@ghost ghost locked as resolved and limited conversation to collaborators Aug 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Net.Http test-run-core Test failures in .NET Core test runs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants