Repository navigation
Closed
Labels
area-System.Net.Httpdisabled-testThe test is disabled in source code against the issuetest-run-coreTest failures in .NET Core test runs
Milestone
Description
Whole SocketsHttpHandlerTest_Cookies_Http3_Mock class is disabled since it fails in CI (doesn't reproduce locally with > 100 runs)
Error:
System.Net.Http.HttpRequestException : An error occurred while sending the request.
---- System.Net.Quic.QuicStreamAbortedException : Stream aborted by peer (267).
at System.Net.Http.Http3RequestStream.SendAsync(CancellationToken cancellationToken) in /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http3RequestStream.cs:line 246
at System.Net.Http.Http3RequestStream.SendAsync(CancellationToken cancellationToken) in /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http3RequestStream.cs:line 292
at System.Net.Http.Http3Connection.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) in /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http3Connection.cs:line 213
at System.Net.Http.HttpConnectionPool.TrySendUsingHttp3Async(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken) in /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs:line 927
at System.Net.Http.HttpConnectionPool.DetermineVersionAndSendAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken) in /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs:line 989
at System.Net.Http.HttpConnectionPool.SendAndProcessAltSvcAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken) in /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs:line 1019
at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken) in /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs:line 1038
at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) in /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/RedirectHandler.cs:line 81
at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken) in /_/src/libraries/System.Net.Http/src/System/Net/Http/HttpClient.cs:line 527
at System.Net.Http.Functional.Tests.HttpClientHandlerTest_Cookies.<GetAsyncWithRedirect_SetCookieContainer_CorrectCookiesSent>b__17_0(Uri url) in /_/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.Cookies.cs:line 318
at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks) in /_/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs:line 64
at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks) in /_/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs:line 91
at System.Net.Test.Common.LoopbackServerFactory.<>c__DisplayClass5_0.<<CreateClientAndServerAsync>b__0>d.MoveNext() in /_/src/libraries/Common/tests/System/Net/Http/GenericLoopbackServer.cs:line 38
--- End of stack trace from previous location ---
at System.Net.Test.Common.Http3LoopbackServerFactory.CreateServerAsync(Func`3 funcAsync, Int32 millisecondsTimeout, GenericLoopbackOptions options) in /_/src/libraries/Common/tests/System/Net/Http/Http3LoopbackServer.cs:line 98
at System.Net.Http.Functional.Tests.HttpClientHandlerTest_Cookies.GetAsyncWithRedirect_SetCookieContainer_CorrectCookiesSent() in /_/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.Cookies.cs:line 303
--- End of stack trace from previous location ---
----- Inner Stack Trace -----
at System.Net.Quic.Implementations.Mock.MockStream.ReadAsync(Memory`1 buffer, CancellationToken cancellationToken) in /_/src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/Mock/MockStream.cs:line 76
at System.Net.Http.Http3RequestStream.ReadFrameEnvelopeAsync(CancellationToken cancellationToken) in /_/src/libraries/System.
Metadata
Metadata
Assignees
Labels
area-System.Net.Httpdisabled-testThe test is disabled in source code against the issuetest-run-coreTest failures in .NET Core test runs
Activity
ManickaP commentedon Aug 5, 2021
Description how what the problem is: #56831 (comment)
Description how the problem manifests: #56831 (comment)
GoAway arrives on the control stream thus there's a race with the request processing, which might be faster and even make 3 retries on the same connection before it receives and processes GoAway.
[-][HTTP/3] Disabled cookie tests on mock[/-][+][HTTP/3] Disabled cookie tests on mock / retries happen on the same connection[/+][-][HTTP/3] Disabled cookie tests on mock / retries happen on the same connection[/-][+][HTTP/3] Disabled cookie tests / retries happen on the same connection[/+]geoffkizer commentedon Aug 31, 2021
I think we could solve the problem here by just not sending H3_REQUEST_REJECTED from the loopback server for new requests. This would eliminate the race between H3_REQUEST_REJECTED and GOAWAY. The GOAWAY itself, once received and processed, should be sufficient to cause new requests to be retried.
This doesn't address the general problem with HTTP3 here, but it would at least allow us to reliably reenable tests.
ManickaP commentedon Sep 19, 2023
We don't have a mock implementation anymore.