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

Test failure: ConnectAsync_CancellationRequestedAfterConnect_ThrowsOperationCanceledException #56688

Closed
karelz opened this issue Aug 1, 2021 · 4 comments
Labels
area-System.Net test-run-core Test failures in .NET Core test runs
Milestone

Comments

@karelz
Copy link
Member

karelz commented Aug 1, 2021

Test: System.Net.WebSockets.Client.Tests.ConnectTest.ConnectAsync_CancellationRequestedAfterConnect_ThrowsOperationCanceledException

Failures 6/1-9/3 (incl. PRs):

Day Run OS
7/21 PR #55871 Windows.7.Amd64.Open - x86
7/23 Official run Windows.10.Amd64.Open - x64
8/1 Official run Windows.7.Amd64.Open - x86
8/4 PR #56486 (main) Windows.10.Amd64.Server19H1.ES.Open
8/28 PR #58294 (main) Windows.10.Amd64.Open - dynamicpgo
9/2 PR #58448 (main) Windows.81.Amd64.Open - x86

Looks like recent regression -- we should probably take a look for 6.0.

Failure:

System.Net.Sockets.SocketException : An existing connection was forcibly closed by the remote host.

   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken) in /_/src/libraries/System.Net.Sockets/src/System/Net/Sockets/Socket.Tasks.cs:line 1370
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource<System.Net.Sockets.Socket>.GetResult(Int16 token) in /_/src/libraries/System.Net.Sockets/src/System/Net/Sockets/Socket.Tasks.cs:line 1305
   at System.Threading.Tasks.ValueTask`1.ValueTaskSourceAsTask.<>c.<.cctor>b__4_0(Object state) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/ValueTask.cs:line 624
--- End of stack trace from previous location ---
   at System.Net.Test.Common.LoopbackServer.EstablishConnectionAsync() in /_/src/libraries/Common/tests/System/Net/Http/LoopbackServer.cs:line 136
   at System.Net.Test.Common.LoopbackServer.AcceptConnectionAsync(Func`2 funcAsync) in /_/src/libraries/Common/tests/System/Net/Http/LoopbackServer.cs:line 159
   at System.Net.WebSockets.Client.Tests.ConnectTest.<>c__DisplayClass13_0.<<ConnectAsync_CancellationRequestedAfterConnect_ThrowsOperationCanceledException>b__1>d.MoveNext() in /_/src/libraries/System.Net.WebSockets.Client/tests/ConnectTest.cs:line 307
--- End of stack trace from previous location ---
   at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks) in /_/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs:line 63
   at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks) in /_/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs:line 82
   at System.Net.Test.Common.LoopbackServer.<>c__DisplayClass15_0.<<CreateClientAndServerAsync>b__0>d.MoveNext() in /_/src/libraries/Common/tests/System/Net/Http/LoopbackServer.cs:line 117
--- End of stack trace from previous location ---
   at System.Net.Test.Common.LoopbackServer.CreateServerAsync(Func`2 funcAsync, Options options) in /_/src/libraries/Common/tests/System/Net/Http/LoopbackServer.cs:line 101
   at System.Net.WebSockets.Client.Tests.ConnectTest.ConnectAsync_CancellationRequestedAfterConnect_ThrowsOperationCanceledException() in /_/src/libraries/System.Net.WebSockets.Client/tests/ConnectTest.cs:line 287
--- End of stack trace from previous location ---
@karelz karelz added area-System.Net test-run-core Test failures in .NET Core test runs labels Aug 1, 2021
@karelz karelz added this to the 7.0.0 milestone Aug 1, 2021
@ghost
Copy link

ghost commented Aug 1, 2021

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

Issue Details

Test: System.Net.WebSockets.Client.Tests.ConnectTest.ConnectAsync_CancellationRequestedAfterConnect_ThrowsOperationCanceledException

Failures 6/1-8/1 (incl. PRs):

Day Run OS
7/21 PR #55871 Windows.7.Amd64.Open - x86
7/23 Official run Windows.10.Amd64.Open - x64
8/1 Official run Windows.7.Amd64.Open - x86

Failure:

System.Net.Sockets.SocketException : An existing connection was forcibly closed by the remote host.

   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken) in /_/src/libraries/System.Net.Sockets/src/System/Net/Sockets/Socket.Tasks.cs:line 1370
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource<System.Net.Sockets.Socket>.GetResult(Int16 token) in /_/src/libraries/System.Net.Sockets/src/System/Net/Sockets/Socket.Tasks.cs:line 1305
   at System.Threading.Tasks.ValueTask`1.ValueTaskSourceAsTask.<>c.<.cctor>b__4_0(Object state) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/ValueTask.cs:line 624
--- End of stack trace from previous location ---
   at System.Net.Test.Common.LoopbackServer.EstablishConnectionAsync() in /_/src/libraries/Common/tests/System/Net/Http/LoopbackServer.cs:line 136
   at System.Net.Test.Common.LoopbackServer.AcceptConnectionAsync(Func`2 funcAsync) in /_/src/libraries/Common/tests/System/Net/Http/LoopbackServer.cs:line 159
   at System.Net.WebSockets.Client.Tests.ConnectTest.<>c__DisplayClass13_0.<<ConnectAsync_CancellationRequestedAfterConnect_ThrowsOperationCanceledException>b__1>d.MoveNext() in /_/src/libraries/System.Net.WebSockets.Client/tests/ConnectTest.cs:line 307
--- End of stack trace from previous location ---
   at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks) in /_/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs:line 63
   at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks) in /_/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs:line 82
   at System.Net.Test.Common.LoopbackServer.<>c__DisplayClass15_0.<<CreateClientAndServerAsync>b__0>d.MoveNext() in /_/src/libraries/Common/tests/System/Net/Http/LoopbackServer.cs:line 117
--- End of stack trace from previous location ---
   at System.Net.Test.Common.LoopbackServer.CreateServerAsync(Func`2 funcAsync, Options options) in /_/src/libraries/Common/tests/System/Net/Http/LoopbackServer.cs:line 101
   at System.Net.WebSockets.Client.Tests.ConnectTest.ConnectAsync_CancellationRequestedAfterConnect_ThrowsOperationCanceledException() in /_/src/libraries/System.Net.WebSockets.Client/tests/ConnectTest.cs:line 287
--- End of stack trace from previous location ---
Author: karelz
Assignees: -
Labels:

area-System.Net, test-run-core

Milestone: 7.0.0

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged New issue has not been triaged by the area owner label Aug 1, 2021
@karelz karelz removed the untriaged New issue has not been triaged by the area owner label Aug 1, 2021
@karelz karelz modified the milestones: 7.0.0, 6.0.0 Aug 1, 2021
@wfurt
Copy link
Member

wfurt commented Aug 2, 2021

This may be test bug...?
It seems like the server side already ignores IOException.
So we either need to add that or make product change to wrap SocketException as IOException

@ghost ghost added in-pr There is an active PR which will close this issue when it is merged and removed in-pr There is an active PR which will close this issue when it is merged labels Aug 6, 2021
@ManickaP
Copy link
Member

ManickaP commented Aug 10, 2021

Triage: attempt at a fix didn't reproduce the failure, this is probably just test bug, punting.
cc: @karelz

@ManickaP ManickaP modified the milestones: 6.0.0, Future Aug 10, 2021
@rzikm
Copy link
Member

rzikm commented Aug 1, 2024

No recent hits, not actionable at this moment, closing until issue resurfaces.

@rzikm rzikm closed this as completed Aug 1, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Sep 1, 2024
@karelz karelz modified the milestones: Future, 9.0.0 Sep 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Net test-run-core Test failures in .NET Core test runs
Projects
None yet
4 participants