Skip to content

Test Failure: System.Net.WebSockets.Client.Tests.CancelTest_SharedHandler_Loopback.ConnectAsync_Cancel_ThrowsCancellationException #130439

Open

Description

@JulieLeeMSFT

Build Information

Build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=1586870
Build error leg or test failing: android-x64 Release AllSubsets_CoreCLR_Smoke - System.Net.WebSockets.Client.Tests.CancelTest_HttpClient_Loopback.ConnectAsync_Cancel_ThrowsCancellationException
Pull request: #133404

Error Message

Fill the error message using step by step known issues guidance.

{
  "ErrorPattern": "System\\.Net\\.WebSockets\\.Client\\.Tests\\.CancelTest_\\w+Loopback\\.ConnectAsync_Cancel_ThrowsCancellationException",
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}

Known issue validation

Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=1500785
Error message validated: [System.Net.WebSockets.Client.Tests.CancelTest_SharedHandler_Loopback.ConnectAsync_Cancel_ThrowsCancellationException(useSsl: False) [FAIL]]
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 7/9/2026 10:27:44 PM UTC

Report

Build Repository Test Pull Request
1500785 dotnet/runtime System.Net.WebSockets.Client.Tests.CancelTest_SharedHandler_Loopback.ConnectAsync_Cancel_ThrowsCancellationException

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
0 0 1

Known issue validation

Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=1586870
Error message validated: [System\.Net\.WebSockets\.Client\.Tests\.CancelTest_\w+Loopback\.ConnectAsync_Cancel_ThrowsCancellationException]
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 9/8/2026 5:07:45 PM UTC

Report

Build Repository Test Pull Request
1500785 dotnet/runtime System.Net.WebSockets.Client.Tests.CancelTest_SharedHandler_Loopback.ConnectAsync_Cancel_ThrowsCancellationException

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
0 0 1

Report

Build Repository Test Pull Request
1634006 dotnet/runtime System.Net.WebSockets.Client.Tests.CancelTest_HttpClient_Http2Loopback.SendAsync_Cancel_Success #135601
1632805 dotnet/runtime System.Net.WebSockets.Client.Tests.WorkItemExecution
1632586 dotnet/runtime System.Net.WebSockets.Client.Tests.CancelTest_Invoker_Http2Loopback.SendAsync_Cancel_Success #135601
1631414 dotnet/runtime System.Net.WebSockets.Client.Tests.CancelTest_Invoker_Http2Loopback.SendAsync_Cancel_Success #135614
1632358 dotnet/runtime System.Net.WebSockets.Client.Tests.CancelTest_SharedHandler_Loopback.ConnectAsync_Cancel_ThrowsCancellationException #135633
1632080 dotnet/runtime System.Net.WebSockets.Client.Tests.CancelTest_Invoker_Http2Loopback.SendAsync_Cancel_Success #135618
1631683 dotnet/runtime System.Net.WebSockets.Client.Tests.CancelTest_SharedHandler_Loopback.ConnectAsync_Cancel_ThrowsCancellationException #134562
1631677 dotnet/runtime System.Net.WebSockets.Client.Tests.CancelTest_SharedHandler_Loopback.ConnectAsync_Cancel_ThrowsCancellationException #135261
1631680 dotnet/runtime System.Net.WebSockets.Client.Tests.CancelTest_SharedHandler_Loopback.ConnectAsync_Cancel_ThrowsCancellationException #135104
1631668 dotnet/runtime System.Net.WebSockets.Client.Tests.CancelTest_HttpClient_Loopback.ConnectAsync_Cancel_ThrowsCancellationException #135546
1631590 dotnet/runtime System.Net.WebSockets.Client.Tests.CancelTest_SharedHandler_Loopback.ConnectAsync_Cancel_ThrowsCancellationException #134322
1631224 dotnet/runtime System.Net.WebSockets.Client.Tests.CancelTest_Invoker_Http2Loopback.SendAsync_Cancel_Success #135594
1630475 dotnet/runtime System.Net.WebSockets.Client.Tests.CancelTest_SharedHandler_Loopback.SendAsync_Cancel_Success #135546
1629206 dotnet/runtime System.Net.WebSockets.Client.Tests.WorkItemExecution
1628470 dotnet/runtime System.Net.WebSockets.Client.Tests.WorkItemExecution
1628191 dotnet/runtime System.Net.WebSockets.Client.Tests.CancelTest_Invoker_Loopback.SendAsync_Cancel_Success #135424
1627313 dotnet/runtime System.Net.WebSockets.Client.Tests.CancelTest_SharedHandler_Loopback.SendAsync_Cancel_Success #135376
1626990 dotnet/runtime System.Net.WebSockets.Client.Tests.CancelTest_Invoker_Http2Loopback.SendAsync_Cancel_Success #135364
1624216 dotnet/runtime System.Net.WebSockets.Client.Tests.CancelTest_SharedHandler_Loopback.ConnectAsync_Cancel_ThrowsCancellationException
1624095 dotnet/runtime System.Net.WebSockets.Client.Tests.CancelTest_HttpClient_Http2Loopback.SendAsync_Cancel_Success #135065
1623708 dotnet/runtime System.Net.WebSockets.Client.Tests.CancelTest_SharedHandler_Loopback.ConnectAsync_Cancel_ThrowsCancellationException #135228
1623659 dotnet/runtime System.Net.WebSockets.Client.Tests.CancelTest_SharedHandler_Loopback.ConnectAsync_Cancel_ThrowsCancellationException
1621638 dotnet/runtime System.Net.WebSockets.Client.Tests.CancelTest_HttpClient_Loopback.SendAsync_Cancel_Success #135123
1621431 dotnet/runtime System.Net.WebSockets.Client.Tests.CancelTest_HttpClient_Loopback.SendAsync_Cancel_Success
1621013 dotnet/runtime System.Net.WebSockets.Client.Tests.CancelTest_Invoker_Http2Loopback.SendAsync_Cancel_Success #135010
1619469 dotnet/runtime System.Net.WebSockets.Client.Tests.CancelTest_HttpClient_Loopback.ConnectAsync_Cancel_ThrowsCancellationException #135009
1619247 dotnet/runtime System.Net.WebSockets.Client.Tests.CancelTest_Invoker_Http2Loopback.SendAsync_Cancel_Success #134993
1619126 dotnet/runtime System.Net.WebSockets.Client.Tests.CancelTest_HttpClient_Loopback.ConnectAsync_Cancel_ThrowsCancellationException #134999
1619085 dotnet/runtime System.Net.WebSockets.Client.Tests.CancelTest_HttpClient_Loopback.ConnectAsync_Cancel_ThrowsCancellationException
1618659 dotnet/runtime System.Net.WebSockets.Client.Tests.CancelTest_HttpClient_Loopback.ConnectAsync_Cancel_ThrowsCancellationException
1618581 dotnet/runtime System.Net.WebSockets.Client.Tests.CancelTest_HttpClient_Http2Loopback.SendAsync_Cancel_Success #134982
1617569 dotnet/runtime System.Net.WebSockets.Client.Tests.CancelTest_HttpClient_Http2Loopback.SendAsync_Cancel_Success #134843
1617535 dotnet/runtime System.Net.WebSockets.Client.Tests.CancelTest_HttpClient_Http2Loopback.SendAsync_Cancel_Success #134914
1616552 dotnet/runtime System.Net.WebSockets.Client.Tests.CancelTest_Invoker_Http2Loopback.SendAsync_Cancel_Success #134449
1616457 dotnet/runtime System.Net.WebSockets.Client.Tests.CancelTest_HttpClient_Http2Loopback.SendAsync_Cancel_Success #134869
1615155 dotnet/runtime System.Net.WebSockets.Client.Tests.CancelTest_HttpClient_Http2Loopback.SendAsync_Cancel_Success #134675
1614253 dotnet/runtime System.Net.WebSockets.Client.Tests.CancelTest_SharedHandler_Loopback.ConnectAsync_Cancel_ThrowsCancellationException #134322
1613788 dotnet/runtime System.Net.WebSockets.Client.Tests.CancelTest_HttpClient_Http2Loopback.SendAsync_Cancel_Success #134739
1613639 dotnet/runtime System.Net.WebSockets.Client.Tests.CancelTest_HttpClient_Http2Loopback.SendAsync_Cancel_Success #133222
1613256 dotnet/runtime System.Net.WebSockets.Client.Tests.WorkItemExecution #133575
1611418 dotnet/runtime System.Net.WebSockets.Client.Tests.CancelTest_HttpClient_Loopback.ConnectAsync_Cancel_ThrowsCancellationException #134622
1611281 dotnet/runtime System.Net.WebSockets.Client.Tests.CancelTest_Invoker_Http2Loopback.SendAsync_Cancel_Success #134211
1610063 dotnet/runtime System.Net.WebSockets.Client.Tests.CancelTest_SharedHandler_Loopback.ConnectAsync_Cancel_ThrowsCancellationException #134562
1610103 dotnet/runtime System.Net.WebSockets.Client.Tests.SendReceiveTest_HttpClient_Loopback.ReceiveAsync_MultipleOutstandingReceiveOperations_Throws #134541
1609948 dotnet/runtime System.Net.WebSockets.Client.Tests.CancelTest_SharedHandler_Loopback.SendAsync_Cancel_Success
1609714 dotnet/runtime System.Net.WebSockets.Client.Tests.AbortTest_Invoker_Http2Loopback.Abort_CloseAndAbort_Success #133662
1609647 dotnet/runtime System.Net.WebSockets.Client.Tests.CancelTest_SharedHandler_Loopback.ConnectAsync_Cancel_ThrowsCancellationException #133265
1608288 dotnet/runtime System.Net.WebSockets.Client.Tests.WorkItemExecution
1607794 dotnet/runtime System.Net.WebSockets.Client.Tests.ConnectTest_SharedHandler_Loopback.ConnectAsync_CancellationRequestedInflightConnect_ThrowsOperationCanceledException #130367
1607644 dotnet/runtime System.Net.WebSockets.Client.Tests.CancelTest_HttpClient_Http2Loopback.SendAsync_Cancel_Success #130935
1607555 dotnet/runtime System.Net.WebSockets.Client.Tests.CancelTest_HttpClient_Http2Loopback.SendAsync_Cancel_Success #134437
1607384 dotnet/runtime System.Net.WebSockets.Client.Tests.SendReceiveTest_HttpClient_Http2Loopback.ReceiveAsync_MultipleOutstandingReceiveOperations_Throws #134430
1605708 dotnet/runtime System.Net.WebSockets.Client.Tests.CancelTest_HttpClient_Loopback.SendAsync_Cancel_Success
1605109 dotnet/runtime System.Net.WebSockets.Client.Tests.CancelTest_SharedHandler_Loopback.ConnectAsync_Cancel_ThrowsCancellationException #133487
1604944 dotnet/runtime System.Net.WebSockets.Client.Tests.CancelTest_SharedHandler_Loopback.ConnectAsync_Cancel_ThrowsCancellationException
1603299 dotnet/runtime System.Net.WebSockets.Client.Tests.CancelTest_Invoker_Http2Loopback.SendAsync_Cancel_Success #131089
1602798 dotnet/runtime System.Net.WebSockets.Client.Tests.CancelTest_Invoker_Http2Loopback.SendAsync_Cancel_Success #134210
1602104 dotnet/runtime System.Net.WebSockets.Client.Tests.CancelTest_Invoker_Http2Loopback.SendAsync_Cancel_Success
1601650 dotnet/runtime System.Net.WebSockets.Client.Tests.CancelTest_Invoker_Http2Loopback.SendAsync_Cancel_Success #134090
1600723 dotnet/runtime System.Net.WebSockets.Client.Tests.CancelTest_Invoker_Http2Loopback.SendAsync_Cancel_Success #134126
1599172 dotnet/runtime System.Net.WebSockets.Client.Tests.CancelTest_Invoker_Http2Loopback.SendAsync_Cancel_Success #134058
1598961 dotnet/runtime System.Net.WebSockets.Client.Tests.CancelTest_Invoker_Http2Loopback.SendAsync_Cancel_Success #134037
1598028 dotnet/runtime System.Net.WebSockets.Client.Tests.CancelTest_HttpClient_Loopback.SendAsync_Cancel_Success
1597752 dotnet/runtime System.Net.WebSockets.Client.Tests.CancelTest_HttpClient_Loopback.ConnectAsync_Cancel_ThrowsCancellationException #133959
1597549 dotnet/runtime System.Net.WebSockets.Client.Tests.CancelTest_HttpClient_Http2Loopback.SendAsync_Cancel_Success #132448

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
1 18 65

Note

This issue body was updated with GitHub Copilot.

Activity

  1. dotnet-policy-service commented on Jul 9, 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.

  2. removed
    untriagedNew issue has not been triaged by the area owner
    on Jul 24, 2026
  3. added this to the Future milestone on Jul 24, 2026
  4. lewing commented on Jul 27, 2026

    @lewing
    Member

    Broadened the matcher from a fixed ErrorMessage on CancelTest_SharedHandler_Loopback to an ErrorPattern covering every CancelTest_*Loopback fixture, since the same test method is now failing the same way under other fixtures.

    {
      "ErrorPattern": "System\\.Net\\.WebSockets\\.Client\\.Tests\\.CancelTest_\\w+Loopback\\.ConnectAsync_Cancel_ThrowsCancellationException[^\\n]*\\[FAIL\\]",
      "BuildRetry": false,
      "ExcludeConsoleLog": false
    }

    The pattern matches SharedHandler_Loopback, HttpClient_Loopback, Invoker_Loopback and the *_Http2Loopback variants, and does not match *_External fixtures or other test methods on the same classes.

    Recent occurrences

    Latest hit is on dotnet/runtime#131401, build 1527384 — CancelTest_HttpClient_Loopback.ConnectAsync_Cancel_ThrowsCancellationException(useSsl: False) on net11.0-windows-Debug-x86-coreclr_checked-Windows.10.Amd64.Open:

    System.TimeoutException : The operation has timed out.
       at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks, Int32 millisecondsTimeout)
       at System.Net.WebSockets.Client.Tests.LoopbackWebSocketServer.HttpRunner.RunAsync(...)
          in src/libraries/System.Net.WebSockets.Client/tests/LoopbackServer/LoopbackWebSocketServer.Http.cs:line 32
    

    That PR only touches src/coreclr/jit/lclvars.cpp inside a #if ... || defined(TARGET_WASM) guard, so it is a no-op for a Windows x86 leg and cannot be the cause.

    Failure history from the AzDO test-history API (7-day retention window, refs/pull/*):

    Fixture Runs Failures Dates
    CancelTest_HttpClient_Loopback 8962 2 2026-07-24 (1524298), 2026-07-27 (1527384)
    CancelTest_SharedHandler_Loopback 8962 0 —
    CancelTest_Invoker_Loopback 8962 0 —

    So roughly a 0.02% hit rate, matching what Build Analysis reports. The two HttpClient_Loopback hits are on unrelated PRs (#131177 and #131401), which is consistent with infrastructure/timing flakiness rather than a product regression. The original SharedHandler_Loopback hit that opened this issue was on 2026-07-09 and has not recurred since.

    Note

    This comment and the issue body update were generated by GitHub Copilot on behalf of @lewing.

  5. JulieLeeMSFT commented on Aug 4, 2026

    @JulieLeeMSFT
    MemberAuthor

    Failed in: runtime-coreclr libraries-jitstressregs/20260804.1

    net11.0-windows-Release-x64-jitstressregs0x10-Windows.10.Amd64.Open
    - System.Net.WebSockets.Client.Tests.CancelTest_HttpClient_Loopback.ConnectAsync_Cancel_ThrowsCancellationException(useSsl: False)
    
  6. JulieLeeMSFT commented on Aug 5, 2026

    @JulieLeeMSFT
    MemberAuthor

    @wfurt, this test is blocking the libraries-jitstressregs pipeline from getting green. As we wait for a fix in the future, can you please disable the test?

  7. wfurt commented on Aug 6, 2026

    @wfurt
    Member

    is there way how to identify hit stress runs? You can make the test conditional if you want to. Any more thoughts on this @karelz?

  8. JulieLeeMSFT commented on Aug 6, 2026

    @JulieLeeMSFT
    MemberAuthor

    If you look at the report above, it's also failing daily in runtime pipeline for PR runs.

  9. JulieLeeMSFT commented on Sep 1, 2026

    @JulieLeeMSFT
    MemberAuthor

    Failed in (2):

    Failed tests:

    runtime-coreclr libraries-jitstress
    - net11.0-linux-Release-arm-disabler2r-(Debian.13.Arm32.Open)AzureLinux.3.Arm64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-13-helix-arm32v7@sha256:2ac4e961986424981bcbeb590b61c6db413bf7565d310c5e7ab13dfbedb2ee9d
    - net11.0-linux-Release-arm-jitstress1-(Debian.13.Arm32.Open)AzureLinux.3.Arm64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-13-helix-arm32v7@sha256:2ac4e961986424981bcbeb590b61c6db413bf7565d310c5e7ab13dfbedb2ee9d
    - net11.0-linux-Release-arm64-jitstress2-AzureLinux.3.Arm64.Open
    - net11.0-linux-Release-x64-jitstress2-AzureLinux.3.Amd64.Open
    runtime-coreclr libraries-jitstressregs
    - net11.0-windows-Release-x64-jitstressregs8-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
    
  10. added
    blocking-clean-ciBlocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms'
    and removed on Sep 8, 2026
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

    Known Build ErrorUse this to report build issues in the .NET Helix tabarea-System.Netblocking-clean-ciBlocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms'

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions