Skip to content

Test failure: ConnectAsync_CancellationRequestedAfterConnect_ThrowsOperationCanceledException #56688

Closed

Description

@karelz

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 ---

Activity

  1. added this to the 7.0.0 milestone on Aug 1, 2021
  2. ghost added
    untriagedNew issue has not been triaged by the area owner
    on Aug 1, 2021
  3. removed
    untriagedNew issue has not been triaged by the area owner
    on Aug 1, 2021
  4. modified the milestones: 7.0.0, 6.0.0 on Aug 1, 2021
  5. wfurt commented on Aug 2, 2021

    @wfurt
    Member

    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

  6. ghost added
    in-prThere is an active PR which will close this issue when it is merged
    on Aug 6, 2021
  7. ghost removed
    in-prThere is an active PR which will close this issue when it is merged
    on Aug 6, 2021
  8. ManickaP commented on Aug 10, 2021

    @ManickaP
    Member

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

  9. modified the milestones: 6.0.0, Future on Aug 10, 2021
  10. rzikm commented on Aug 1, 2024

    @rzikm
    Member

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

  11. locked and limited conversation to collaborators on Sep 1, 2024
  12. modified the milestones: Future, 9.0.0 on Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions