Skip to content

System.Net.WebSockets.Tests.WebSocketCloseTests fail with TaskCanceledException #134569

Description

@jkotas
    System.Net.WebSockets.Tests.WebSocketCloseTests.ReceiveAsync_ValidCloseStatus_Success(closeStatus: PolicyViolation) [FAIL]
      System.Threading.Tasks.TaskCanceledException : A task was canceled.
      Stack Trace:
        /_/src/libraries/System.Net.WebSockets/src/System/Net/WebSockets/ManagedWebSocket.cs(610,0): at System.Net.WebSockets.ManagedWebSocket.SendFrameFallbackAsync(MessageOpcode opcode, Boolean endOfMessage, Boolean disableCompression, ReadOnlyMemory`1 payloadBuffer, Task lockTask, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.WebSockets/src/System/Net/WebSockets/ManagedWebSocket.cs(487,0): at System.Net.WebSockets.ManagedWebSocket.SendFrameAsync(MessageOpcode opcode, Boolean endOfMessage, Boolean disableCompression, ReadOnlyMemory`1 payloadBuffer, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.WebSockets/src/System/Net/WebSockets/ManagedWebSocket.cs(1579,0): at System.Net.WebSockets.ManagedWebSocket.SendCloseFrameAsync(WebSocketCloseStatus closeStatus, String closeStatusDescription, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.WebSockets/src/System/Net/WebSockets/ManagedWebSocket.cs(420,0): at System.Net.WebSockets.ManagedWebSocket.CloseOutputAsyncCore(WebSocketCloseStatus closeStatus, String statusDescription, Boolean enterReceiveMutex, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.WebSockets/src/System/Net/WebSockets/ManagedWebSocket.cs(411,0): at System.Net.WebSockets.ManagedWebSocket.CloseOutputAsync(WebSocketCloseStatus closeStatus, String statusDescription, CancellationToken cancellationToken)
        /_/src/libraries/System.Net.WebSockets/tests/WebSocketCloseTests.cs(73,0): at System.Net.WebSockets.Tests.WebSocketCloseTests.ReceiveAsync_ValidCloseStatus_Success(WebSocketCloseStatus closeStatus)
        --- End of stack trace from previous location ---

Build Information

Build: https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=1609152
Build error leg or test failing: System.Net.WebSockets.Tests.WebSocketCloseTests.ReceiveAsync_ValidCloseStatus_Success
Pull request: #134506

Error Message

DO NOT USE JSON BELOW IF THIS IS A BUILD BREAK otherwise build analysis will allow pull requests to merge that break the build worse. For a build break, do not use this issue form. Make a regular new issue.

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

{
  "ErrorMessage": ["System.Net.WebSockets.Tests.WebSocketCloseTests","TaskCanceledException"],
  "ErrorPattern": "",
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}

Known issue validation

Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=1609152
Error message validated: [System.Net.WebSockets.Tests.WebSocketCloseTests TaskCanceledException]
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 9/24/2026 4:33:50 AM UTC

Report

Build Repository Test Pull Request
1609152 dotnet/runtime System.Net.WebSockets.Tests.WebSocketCloseTests.ReceiveAsync_ValidCloseStatus_Success #134506

Summary

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

Activity

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

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions