Skip to content

Test Failure: CancelTest_HttpClient_Loopback.ConnectAsync_Cancel_ThrowsCancellationException -- TimeoutException variant (jitstress2 win-x64) #128597

Open

Description

@kg

Summary:
CancelTest_HttpClient_Loopback.ConnectAsync_Cancel_ThrowsCancellationException(useSsl: False) on windows x64 under DOTNET_JitStress=2 fails with System.TimeoutException : The operation has timed out. from TaskTimeoutExtensions.WhenAllOrAnyFailed, called by LoopbackWebSocketServer.HttpRunner.RunAsync. Single test failure in libraries-jitstress build 1435045.

Failed in (1):

Console Log: Console Log
Source: runtime-coreclr libraries-jitstress / net11.0-windows-Release-x64-jitstress2-Windows.10.Amd64.Open / System.Net.WebSockets.Client.Tests.CancelTest_HttpClient_Loopback.ConnectAsync_Cancel_ThrowsCancellationException

Failed tests:

- net11.0-windows-Release-x64-jitstress2-Windows.10.Amd64.Open
  - System.Net.WebSockets.Client.Tests.CancelTest_HttpClient_Loopback.ConnectAsync_Cancel_ThrowsCancellationException

Error Message:

    System.Net.WebSockets.Client.Tests.CancelTest_HttpClient_Loopback.ConnectAsync_Cancel_ThrowsCancellationException(useSsl: False) [FAIL]

      System.TimeoutException : The operation has timed out.

      Stack Trace:

        /_/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs(54,0): at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks, Int32 millisecondsTimeout)

        /_/src/libraries/System.Net.WebSockets.Client/tests/LoopbackServer/LoopbackWebSocketServer.Http.cs(32,0): at System.Net.WebSockets.Client.Tests.LoopbackWebSocketServer.HttpRunner.RunAsync(Func`2 clientFunc, Func`3 wsServerFunc, Options options, CancellationToken clientExitCt, CancellationToken globalCt)

        --- End of stack trace from previous location ---

Stack Trace:

      Stack Trace:

        /_/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs(54,0): at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks, Int32 millisecondsTimeout)

        /_/src/libraries/System.Net.WebSockets.Client/tests/LoopbackServer/LoopbackWebSocketServer.Http.cs(32,0): at System.Net.WebSockets.Client.Tests.LoopbackWebSocketServer.HttpRunner.RunAsync(Func`2 clientFunc, Func`3 wsServerFunc, Options options, CancellationToken clientExitCt, CancellationToken globalCt)

        --- End of stack trace from previous location ---

Analysis:
The test sets up a loopback websocket server and calls ConnectAsync with a cancellation token, expecting a CancellationException; instead the internal WhenAllOrAnyFailed helper times out (the cancellation either does not propagate or the server-side task hangs) under jitstress2 codegen on windows x64. The closest issue from validator substring search (#121518) is about a different scenario (os-android System.Net.WebSockets.Client.Tests work-item-level failure). The historical #58355 is closed (milestone 9.0.0) with a different failure mode (Assert.Throws no exception thrown). No OPEN matching issue for this TimeoutException form of the test under jitstress2 on windows x64. Flagged as NEW.

Generated by ci-pipeline-monitor/scripts/update_github.py

Activity

  1. added this to the 11.0.0 milestone on May 26, 2026
  2. added
    JitStress
    blocking-clean-ci-optional
    on May 26, 2026
  3. dotnet-policy-service commented on May 26, 2026

    @dotnet-policy-service
    Contributor

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

  4. modified the milestones: 11.0.0, 12.0.0 on Aug 4, 2026
  5. VincentBu commented on Sep 11, 2026

    @VincentBu
    Contributor

    Failed in (2):

    Failed tests:

    runtime-coreclr libraries-jitstress-random
    - net11.0-linux-Release-arm-jitstress_random_1-(Debian.13.Arm32.Open)[[email protected]/dotnet-buildtools/prereqs:debian-13-helix-arm32v7@sha256:abc10e0395717f1d7dc92ac6c684ceb3a64d863f5679ed24fcee4d54e8622537](mailto:[email protected]/dotnet-buildtools/prereqs:debian-13-helix-arm32v7@sha256:abc10e0395717f1d7dc92ac6c684ceb3a64d863f5679ed24fcee4d54e8622537)
    - net11.0-windows-Release-x64-jitstress_random_1-Windows.Amd64.Open.rt
    - net11.0-windows-Release-x86-jitstress_random_1-Windows.10.Amd64.Open
    - net11.0-windows-Release-x86-jitstress_random_2-Windows.10.Amd64.Open
    runtime-coreclr libraries-pgo
    - net11.0-windows-Release-x64-syntheticpgo-Windows.Amd64.Open.rt
    - net11.0-windows-Release-x64-syntheticpgo_blend-Windows.Amd64.Open.rt
      - System.Net.WebSockets.Client.Tests.CancelTest_HttpClient_Loopback.ConnectAsync_Cancel_ThrowsCancellationException
      - System.Net.WebSockets.Client.Tests.CancelTest_SharedHandler_Loopback.ConnectAsync_Cancel_ThrowsCancellationException
    

    Error Details:

    System.TimeoutException : The operation has timed out.
    

    Stack Trace:

    /_/src/coreclr/System.Private.CoreLib/src/System/Runtime/CompilerServices/RuntimeAsyncTaskContinuation.cs(131,0): at System.Runtime.CompilerServices.RuntimeAsyncTaskContinuation.GetResult(Task task, Byte& result)
            /_/src/coreclr/System.Private.CoreLib/src/System/Runtime/CompilerServices/RuntimeAsyncTaskContinuation.cs(114,0): at System.Runtime.CompilerServices.RuntimeAsyncTaskContinuation.GetResult(Byte& returnValue)
            /_/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs(54,0): at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks, Int32 millisecondsTimeout)
            /_/src/libraries/System.Net.WebSockets.Client/tests/LoopbackServer/LoopbackWebSocketServer.Http.cs(32,0): at System.Net.WebSockets.Client.Tests.LoopbackWebSocketServer.HttpRunner.RunAsync(Func`2 clientFunc, Func`3 wsServerFunc, Options options, CancellationToken clientExitCt, CancellationToken globalCt)
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    JitStressarea-System.Netblocking-clean-ci-optional

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions