Repository navigation
Test failure: System.Net.Http.Functional.Tests.HttpClientTest.Send_TimeoutRequestContent_Throws #39056
Copy link
Copy link
Closed
Labels
area-System.Net.Httpdisabled-testThe test is disabled in source code against the issueThe test is disabled in source code against the issuein-prThere is an active PR which will close this issue when it is mergedThere is an active PR which will close this issue when it is mergedtest-bugProblem in test source code (most likely)Problem in test source code (most likely)test-run-coreTest failures in .NET Core test runsTest failures in .NET Core test runs
Milestone
Description
failed in job: runtime-libraries outerloop 20200709.1
Error message
Assert.Throws() Failure
Expected: typeof(System.Threading.Tasks.TaskCanceledException)
Actual: typeof(System.Net.Http.HttpRequestException): Error while copying content to a stream.
---- System.Net.Http.HttpRequestException : Error while copying content to a stream.
-------- System.IO.IOException : Unable to write data to the transport connection: An established connection was aborted by the software in your host machine..
------------ System.Net.Sockets.SocketException : An established connection was aborted by the software in your host machine.
Stack trace
at System.Net.Http.HttpContent.CopyTo(Stream stream, TransportContext context, CancellationToken cancellationToken) in /_/src/libraries/System.Net.Http/src/System/Net/Http/HttpContent.cs:line 388
at System.Net.Http.HttpConnection.SendRequestContentAsync(HttpRequestMessage request, HttpContentWriteStream stream, Boolean async, CancellationToken cancellationToken) in /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnection.cs:line 783
at System.Net.Http.HttpConnection.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) in /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnection.cs:line 446
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 760
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 32
at System.Net.Http.HttpMessageHandlerStage.Send(HttpRequestMessage request, CancellationToken cancellationToken) in /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpMessageHandlerStage.cs:line 17
at System.Net.Http.SocketsHttpHandler.Send(HttpRequestMessage request, CancellationToken cancellationToken) in /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SocketsHttpHandler.cs:line 353
at System.Net.Http.HttpClientHandler.Send(HttpRequestMessage request, CancellationToken cancellationToken) in /_/src/libraries/System.Net.Http/src/System/Net/Http/HttpClientHandler.cs:line 276
at System.Net.Http.HttpMessageInvoker.Send(HttpRequestMessage request, CancellationToken cancellationToken) in /_/src/libraries/System.Net.Http/src/System/Net/Http/HttpMessageInvoker.cs:line 50
at System.Net.Http.HttpClient.SendAsyncCore(HttpRequestMessage request, HttpCompletionOption completionOption, Boolean async, CancellationToken cancellationToken) in /_/src/libraries/System.Net.Http/src/System/Net/Http/HttpClient.cs:line 498
at System.Net.Http.HttpClient.Send(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationToken cancellationToken) in /_/src/libraries/System.Net.Http/src/System/Net/Http/HttpClient.cs:line 466
at System.Net.Http.HttpClient.Send(HttpRequestMessage request) in /_/src/libraries/System.Net.Http/src/System/Net/Http/HttpClient.cs:line 449
at System.Net.Http.Functional.Tests.HttpClientTest.<>c__DisplayClass48_0.<Send_TimeoutRequestContent_Throws>b__2() in /_/src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientTest.cs:line 885
at System.Threading.Tasks.Task.InnerInvoke() in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs:line 2370
at System.Threading.Tasks.Task.<>c.<.cctor>b__277_0(Object obj) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs:line 2359
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/ExecutionContext.cs:line 266
--- End of stack trace from previous location ---
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/ExecutionContext.cs:line 266
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs:line 2352
--- End of stack trace from previous location ---
----- Inner Stack Trace -----
at
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-System.Net.Httpdisabled-testThe test is disabled in source code against the issueThe test is disabled in source code against the issuein-prThere is an active PR which will close this issue when it is mergedThere is an active PR which will close this issue when it is mergedtest-bugProblem in test source code (most likely)Problem in test source code (most likely)test-run-coreTest failures in .NET Core test runsTest failures in .NET Core test runs
Activity
stephentoub commentedon Jul 10, 2020
cc: @ManickaP
v-haren commentedon Jul 29, 2020
failed again in job: runtime-libraries outerloop 20200728.3
failed test: System.Net.Http.Functional.Tests.HttpClientTest.Send_TimeoutRequestContent_Throws
Error message
ManickaP commentedon Jul 29, 2020
I just merged it now (I was trigger happy with the labels here), so the failure is from before.
ManickaP commentedon Jul 29, 2020
The failure seems to happen predominantly on Windows machine (single alpine occurrence).
The underlying error:
An established connection was aborted by the software in your host machine.corresponds to winsock error:WSAECONNABORTEDwhich points to server closing the connection.My working theory is that the server code finishes sooner (not actually expecting the content:
ReadRequestBodyAsyncreturning immediatelly) and closes the connection without waiting on client to send it.The test sometimes passes because the client side timeout propagation is faster than the server side code.
[HTTP] Fix test race with semaphore. (dotnet#124388)
[HTTP] Fix test race with semaphore. (dotnet#124388)