Skip to content

[ci-scan] Test failure: System.Net.WebSockets.Tests.WebSocketCloseTests.CloseAsync_CancelableEvenWhenPendingReceive_Throws #137994

Open

Description

@github-actions

Build Information

Build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=1691611
Build error leg or test failing: windows-x64 Release libraries-jitstress-System.Net.WebSockets.Tests / WebSocketCloseTests.CloseAsync_CancelableEvenWhenPendingReceive_Throws
Pipeline: runtime-coreclr libraries-jitstress, definition 138, main.
Queue: windows.amd64.open.rt. DOTNET_TailcallStress=1; DOTNET_TieredCompilation=0.
First build it occurred: https://dev.azure.com/dnceng-public/public/_build/results?buildId=1691611 (finished 2026-11-20T08:42:20Z; first verified occurrence in the sampled window, not a proven introducing commit).

KBE authoring guidance (ci-failure-scan)
  • Error Details is for readers. Paste the full exception, stack trace, or build error excerpt so the failure is understandable without opening the raw log.
  • Build Analysis parses only the single JSON block under Error Message.
  • ErrorMessage is a case-sensitive ordinal String.Contains substring copied verbatim from the failing log.
  • Set BuildRetry to true only for a clear infrastructure retry case. ExcludeConsoleLog disables Helix console-log scanning.

Error Details

CloseAsync completes without throwing the expected OperationCanceledException while a receive is pending. The assembly reports 591 tests, one failure, and no skipped tests. The Helix command exits with 0, but the monitor correctly reports the failing AzDO test; the failure was included alongside nonzero-exit work items in the complete inventory.

One distinct build is verified. The ten preceding completed builds were examined: two succeeded, and all 24 failed-work-item consoles identified by the other eight builds' monitors were downloaded and checked without finding this failing test. The immediately preceding build is 1689546 (finished 2026-11-19T08:53:41Z). Definition 138 qualifies for the scanner's JIT first-occurrence rule; no later completed build is available for a follow-up presence check.

Source console: https://helix.dot.net/api/jobs/3ed080b8-4398-4408-af0f-895da31585ab/workitems/System.Net.WebSockets.Tests/console

    System.Net.WebSockets.Tests.WebSocketCloseTests.CloseAsync_CancelableEvenWhenPendingReceive_Throws [FAIL]
      Assert.ThrowsAny() Failure: No exception was thrown
      Expected: typeof(System.OperationCanceledException)
      Stack Trace:
        /_/src/libraries/System.Net.WebSockets/tests/WebSocketCloseTests.cs(99,0): at System.Net.WebSockets.Tests.WebSocketCloseTests.CloseAsync_CancelableEvenWhenPendingReceive_Throws()
        --- End of stack trace from previous location ---

Error Message

{
  "ErrorMessage": [
    "System.Net.WebSockets.Tests.WebSocketCloseTests.CloseAsync_CancelableEvenWhenPendingReceive_Throws [FAIL]",
    "Assert.ThrowsAny() Failure: No exception was thrown",
    "Expected: typeof(System.OperationCanceledException)"
  ],
  "ErrorPattern": "",
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}
Agentic workflow metadata (ci-failure-scan)

Workflow artifact: ci-failure-scan
Artifact kind: kbe-verification
Verified match count: 1 hits in failure.log

All three literal elements match once, in order within this test's own assertion output in the saved canonical source console. Passing/skipped negative output is empty. The test marker and expected exception distinguish this failure from unrelated no-exception assertions.


Filed by ci-failure-scan (detection only). ci-failure-fix walks open [ci-scan] KBEs and either opens a small fix PR or comments here to loop in owners — it never disables the test.

Note

Generated by GitHub Copilot.

Generated by CI Outer-Loop Failure Scanner · copilot · gpt61 · ~367 AIC · ⌖ ~13 AIC · ⊞ 33.5K · ◷

Report

💡 View the full list in 🌐 Build Insights

Build Repository Branch Test Pull Request
1700700 dotnet/runtime release/10.0 System.Net.WebSockets.Tests.WebSocketCloseTests.CloseAsync_CancelableEvenWhenPendingReceive_Throws
1700598 dotnet/runtime main System.Net.WebSockets.Tests.WebSocketCloseTests.CloseAsync_CancelableEvenWhenPendingReceive_Throws
1698286 dotnet/runtime main System.Net.WebSockets.Tests.WebSocketCloseTests.CloseAsync_CancelableEvenWhenPendingReceive_Throws #138244
1697390 dotnet/runtime release/10.0 System.Net.WebSockets.Tests.WebSocketCloseTests.CloseAsync_CancelableEvenWhenPendingReceive_Throws #133956

Summary

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

Activity

  1. added
    blocking-clean-ci-optional
    Known Build Error
    on Nov 20, 2026
  2. added
    untriaged
    on Nov 20, 2026
  3. dotnet-policy-service commented on Nov 20, 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. github-actions commented on Nov 23, 2026

    @github-actions
    ContributorAuthor

    Workflow artifact: ci-fix
    Artifact kind: handoff
    Linked KBE: #137994

    Note

    AI/Copilot-generated triage note.

    This Known Build Error has no producible automated code change (reason: JIT-stress/codegen failure — must not be auto-fixed), so I could not open even a best-effort PR. Looping in owners so it can be fixed forward rather than muted.

    Root cause (best analysis)

    System.Net.WebSockets.Tests.WebSocketCloseTests.CloseAsync_CancelableEvenWhenPendingReceive_Throws fails only in the libraries-jitstress pipeline with DOTNET_TailcallStress=1 and DOTNET_TieredCompilation=0. The pending receive is closed without producing the expected OperationCanceledException:

    Assert.ThrowsAny() Failure: No exception was thrown
    Expected: typeof(System.OperationCanceledException)
    

    The failure is isolated to a JIT-stress configuration and the test itself is not a safe place to work around a runtime/codegen defect. Changing the expected exception or adding a test condition would mute the signal rather than fix the underlying behavior.

    Evidence

    • Failing build: 1691611
    • First build it occurred: 1691611 — 2026-11-20 UTC (earliest verified occurrence in the scanned window; may not be the true origin)
    • Possible related PR: none identified with sufficient confidence

    Suggested reviewers / area contacts

    • Likely author: none identified with sufficient confidence
    • Area owners (area-System.Net): @karelz, @dotnet/ncl

    A fix likely requires reproducing the cancellation behavior under tail-call stress and correcting the runtime/JIT interaction or the WebSocket close/receive synchronization, rather than changing or disabling the test.

    Structured data:

    {
      "artifact_kind": "handoff",
      "linked_kbe": 137994,
      "workflow_artifact": "ci-fix"
    }

    Structured data:

    {
      "artifact_kind": "handoff",
      "linked_kbe": 137994,
      "workflow_artifact": "ci-fix"
    }

    Generated by CI Outer-Loop Failure Fixer · copilot · gpt56 · ~8 AIC · ⌖ ~1 AIC · ⊞ 35.9K · ◷

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 Erroragentic-workflowsarea-System.Netblocking-clean-ci-optionaluntriaged

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions