Skip to content

Keep QUIC backlog test clients alive through server handshakes - #136507

Merged
rzikm merged 1 commit into
dotnet:mainfrom
rzikm:rzikm/quic-backlog-cancellation
Oct 27, 2026
Merged

rzikm merged 1 commit into
dotnet:mainfrom
rzikm:rzikm/quic-backlog-cancellation

Conversation

@rzikm

@rzikm rzikm commented Oct 27, 2026

Copy link
Copy Markdown
Member

The parallel listener-backlog test disposes each successful client before accepting the server-side connections. Client handshake completion does not guarantee that the server has received the client's Finished message. Early disposal can therefore terminate a pending server handshake, causing AcceptConnectionAsync to throw AuthenticationException with UserCanceled.

Keep successful clients alive until all pending server connections are accepted and the assertions finish, then dispose them in finally. This changes only test lifetime management; the exact backlog/refusal counts and accept-cancellation assertions remain unchanged. No product changes, additional skips, or timeout increases.

Evidence and validation

A controlled loopback UDP-loss reproduction using official .NET 11 and the same MsQuic OpenSSL 2.6.3 version as the failing CI run failed 8/10 times with the original lifetime and passed 100/100 times with retained clients. Tracing shows the client connecting and disposing before server handshake completion; the server receives transport APPLICATION_ERROR (11), which MsQuic maps to UserCanceled. This reproduces the failure mechanism and stack, not the exact AzureLinux CI occurrence.

  • build.cmd clr+libs -rc release: passed, no warnings or errors.
  • Normal and outerloop parallel-backlog cases: 12/12 passed on both Schannel and OpenSSL.
  • Full QUIC functional suite on Windows: Schannel 448 passed, 1 existing platform skip; OpenSSL 446 passed, 3 existing platform/backend skips. Both had zero failures, errors, or unobserved exceptions.

Resolves #133515

Note

This pull request description and code change were generated with GitHub Copilot.

Retain successful parallel clients until all pending server connections are accepted, then dispose them in finally. Early client disposal can terminate an unconfirmed server handshake with transport APPLICATION_ERROR, surfaced as UserCanceled.

Co-authored-by: Copilot App <[email protected]>
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).
13 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

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

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

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

@ManickaP

Copy link
Copy Markdown
Member

/backport to release/11.0

@github-actions

Copy link
Copy Markdown
Contributor

Started backporting to release/11.0 (link to workflow run)

lewing pushed a commit that referenced this pull request Nov 23, 2026
…ndshakes (#137890)

Backport of #136507 to release/11.0

/cc @ManickaP @rzikm

Fixes #136558

## Customer Impact

- [ ] Customer reported
- [x] Found internally

## Regression

- [ ] Yes
- [x] No

## Testing

CI

## Risk

Low. Test only change, Tell Mode.

Co-authored-by: Radek Zikmund <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

2 participants