Skip to content

[release/11.0] Separate QUIC idle-timeout test setup from inactivity - #134036

Merged
svick merged 1 commit into
release/11.0from
backport/pr-133945-to-release/11.0
Sep 17, 2026
Merged

svick merged 1 commit into
release/11.0from
backport/pr-133945-to-release/11.0

Conversation

@github-actions

@github-actions github-actions Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Backport of #133945 to release/11.0

Test-only change to clean up CI

<!-- -->
`IdleTimeout_ThrowsQuicException` can expire its one-second connection
idle timeout before the initial stream exchange completes, failing
during setup rather than reaching its intended assertions. Controlled
three-second managed pauses reproduce this premature failure. This
change separates successful setup from deliberate inactivity; it does
not establish where the delay occurred in the natural CI failures.

### Approach

Enable server-only keep-alive during setup, then disable it through the
existing MsQuic API table after establishing a pending server read and
inbound accept. Keep the original one-second idle setting and all three
exact `ConnectionIdle` assertions. Require the setup byte to be received
and bound the initial stream operations with cancellation.

The test-only helper protects the native handle with
`DangerousAddRef`/`DangerousRelease`, preserves the exact private
`_handle` field for NativeAOT, and checks native status plus settings
readback. Pending operation faults are observed after resource disposal
if setup fails. No product API, exception mapping, shared connection
helper, global setting or test skip changes.

### Validation

- Windows x64 CoreCLR, Schannel, MsQuic 2.5.10: 100 ordinary gated
iterations and 12 iterations with three-second pauses across four setup
phases passed. All three ungated delayed controls reproduced premature
idle failure.
- Omitting disable kept operations pending beyond five seconds;
disabling keep-alive then allowed all idle assertions to pass. Across
113 gated completions, time from disable/readback to completed
assertions was 963-1107 ms. These are managed observation times, not
exact native timer measurements.
- Native setter failure, cancellation cleanup and closed-handle controls
passed. The closed-handle control disposes the stream first because a
live stream retains the native connection handle.
- Final complete QUIC innerloop plus outerloop suite: 478 passed, 0
failed, 1 existing platform skip. Final focused independent-process
repetitions: 20/20 passed.
- Final Windows x64 NativeAOT executable: 1/1 passed with each of
OpenSSL and Schannel. Native code generation succeeded, but the standard
test wrapper failed to resolve the bare executable name (exit 9009);
these passes used the generated executable by explicit path. No new
broad rooting or warning suppression was added.

### Review considerations

This hardens the test against managed setup pauses while native workers
remain responsive. The natural CI cause remains unproven, and the gate
does not protect against native-worker starvation or sustained packet
loss. Setup now uses keep-alive, while the intentional idle phase
retains the original timeout semantics.

Private-field reflection and mutable native settings add maintenance
cost. Linux, Windows x86 and the minimum supported MsQuic 2.2.2 have not
been tested; Windows OpenSSL coverage is not Linux coverage. No native
leak audit was performed.

> [!NOTE]
> This PR description and implementation were generated with GitHub
Copilot.

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@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: @karelz, @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

@rzikm
rzikm requested review from ManickaP and karelz September 16, 2026 07:44
@rzikm rzikm self-assigned this Sep 16, 2026
@rzikm

rzikm commented Sep 17, 2026

Copy link
Copy Markdown
Member

/ba-g test failures are #124079 and #132059

@rzikm

rzikm commented Sep 17, 2026

Copy link
Copy Markdown
Member

Test only change => tell mode, approved by Karel

@rzikm rzikm added the Servicing-approved Approved for servicing release label Sep 17, 2026
@svick
svick enabled auto-merge (squash) September 17, 2026 11:03
@svick
svick merged commit 8b88db9 into release/11.0 Sep 17, 2026
88 of 91 checks passed
@svick
svick deleted the backport/pr-133945-to-release/11.0 branch September 17, 2026 11:03
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 11.0-rc2 milestone Sep 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-System.Net Servicing-approved Approved for servicing release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants