QuicException in System.Net.Quic.Tests.QuicStreamTests.WriteAbortedWithoutWriting_ReadThrows
- Dominant language
- C#
- Stars
- 18.3k
- Forks
- 5.6k
- PR merge metrics
- PR metrics pending
Description
```
/private/tmp/helix/working/9DE308A9/w/B373090E/e /private/tmp/helix/working/9DE308A9/w/B373090E/e
Discovering: System.Net.Quic.Functional.Tests (method display = ClassAndMethod, method display options = None)
Discovered: System.Net.Quic.Functional.Tests (found 143 of 158 test cases)
Starting: System.Net.Quic.Functional.Tests (parallel test collections = on [6 threads], stop on fail = off)
MsQuic supported and using 'libmsquic.dylib 2.5.5.0 (b3945bb0c9e44463c93dac13e40975a7c3a526ca)' (OpenSSL).
System.Net.Quic.Tests.MsQuicPlatformDetectionTests.UnsupportedPlatforms_ThrowsPlatformNotSupportedException [SKIP]
Condition(s) not met: "IsQuicUnsupported"
System.Net.Quic.Tests.MsQuicTests.QuicRootedConnectionGetsReleased_ConnectFails [SKIP]
Condition(s) not met: "IsNotMonoRuntime"
System.Net.Quic.Tests.MsQuicTests.QuicRootedObjectGetReleased [SKIP]
Condition(s) not met: "IsNotMonoRuntime"
System.Net.Quic.Tests.QuicStreamTests.WriteAbortedWithoutWriting_ReadThrows [FAIL]
System.Net.Quic.QuicException : The connection timed out from inactivity.
Stack Trace:
/_/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicConnection.cs(657,0): at System.Net.Quic.QuicConnection.HandleEventShutdownInitiatedByTransport(_SHUTDOWN_INITIATED_BY_TRANSPORT_e__Struct& data)
/_/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicConnection.cs(771,0): at System.Net.Quic.QuicConnection.HandleConnectionEvent(QUIC_CONNECTION_EVENT& connectionEvent)
/_/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicConnection.cs(806,0): at System.Net.Quic.QuicConnection.NativeCallback(QUIC_HANDLE* connection, Void* context, QUIC_CONNECTION_EVENT* connectionEvent)
--- End of stack trace from previous location ---
/_/src/libraries/System.Net.Quic/src/System/Net/Quic/Internal/ValueTaskSource.cs(176,0): at System.Net.Quic.ValueTaskSource.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)
/_/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicConnection.cs(452,0): at System.Net.Quic.QuicConnection.FinishConnectAsync(QuicClientConnectionOptions options, CancellationToken cancellationToken)
/_/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicConnection.cs(86,0): at System.Net.Quic.QuicConnection.g__StartConnectAsync|2_0(QuicClientConnectionOptions options, CancellationToken cancellationToken)
/_/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicConnection.cs(101,0): at System.Net.Quic.QuicConnection.g__StartConnectAsync|2_0(QuicClientConnectionOptions options, CancellationToken cancellationToken)
/_/src/libraries/System.Net.Quic/tests/FunctionalTests/QuicTestBase.cs(222,0): at System.Net.Quic.Tests.QuicTestBase.CreateConnectedQuicConnection(QuicClientConnectionOptions clientOptions, QuicListener listener)
/_/src/libraries/System.Net.Quic/tests/FunctionalTests/QuicTestBase.cs(257,0): at System.Net.Quic.Tests.QuicTestBase.CreateConnectedQuicConnection(QuicClientConnectionOptions clientOptions, QuicListener listener)
/_/src/libraries/System.Net.Quic/tests/FunctionalTests/QuicTestBase.cs(303,0): at System.Net.Quic.Tests.QuicTestBase.RunClientServer(Func`2 clientFunction, Func`2 serverFunction, Int32 iterations, Int32 millisecondsTimeout, QuicListenerOptions listenerOptions)
/_/src/libraries/System.Net.Quic/tests/FunctionalTests/QuicTestBase.cs(301,0): at System.Net.Quic.Tests.QuicTestBase.RunClientServer(Func`2 clientFunction, Func`2 serverFunction, Int32 iterations, Int32 millisecondsTimeout, QuicListenerOptions listenerOptions)
/_/src/libraries/System.Net.Quic/tests/FunctionalTests/QuicStreamTests.cs(531,0): at System.Net.Quic.Tests.QuicStreamTests.WriteAbortedWithoutWriting_ReadThrows()
--- End of stack trace from previous location ---
MsQuic Counters:
CONN_CREATED 1619
CONN_HANDSHAKE_FAIL 25
CONN_APP_REJECT 8
CONN_LOAD_REJECT 0
Unobserved exceptions of 1 different types:
Count 1: System.AggregateException: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. (Cannot access a disposed object.
Object name: 'System.Net.Quic.QuicListener'.)
---> System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'System.Net.Quic.QuicListener'.
at System.Net.Quic.QuicListener.DisposeAsync() in /_/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicListener.cs:line 432
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[d__21](d__21& stateMachine) in /_/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncMethodBuilderCore.cs:line 38
at System.Net.Quic.QuicListener.DisposeAsync()
at System.Net.Quic.Tests.QuicTestBase.RunClientServer(Func`2 clientFunction, Func`2 serverFunction, Int32 iterations, Int32 millisecondsTimeout, QuicListenerOptions listenerOptions) in /_/src/libraries/System.Net.Quic/tests/FunctionalTests/QuicTestBase.cs:line 301
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib, Version=11.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Net.Quic.Tests.QuicTestBase.d__40, System.Net.Quic.Functional.Tests, Version=11.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]].ExecutionContextCallback(Object s) in /_/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncTaskMethodBuilderT.cs:line 428
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/ExecutionContext.cs:line 196
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib, Version=11.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Net.Quic.Tests.QuicTestBase.d__40, System.Net.Quic.Functional.Tests, Version=11.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]].MoveNext(Thread threadPoolThread, Flags flags) in /_/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncTaskMethodBuilderT.cs:line 529
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib, Version=11.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Net.Quic.Tests.QuicTestBase.d__40, System.Net.Quic.Functional.Tests, Version=11.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]].MoveNext(Thread threadPoolThread) in /_/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncTaskMethodBuilderT.cs:line 500
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib, Version=11.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Net.Quic.Tests.QuicTestBase.d__40, System.Net.Quic.Functional.Tests, Version=11.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]].MoveNext() in /_/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncTaskMethodBuilderT.cs:line 486
at System.Threading.Tasks.SynchronizationContextAwaitTaskContinuation.<>c.<.cctor>b__8_0(Object state) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/TaskContinuation.cs:line 370
at Xunit.Sdk.AsyncTestSyncContext.<>c__DisplayClass7_0.b__0() in /_/src/xunit.execution/Sdk/AsyncTestSyncContext.cs:line 58
at Xunit.Sdk.XunitWorkerThread.<>c.b__5_0(Object _) in /_/src/common/XunitWorkerThread.cs:line 37
at System.Threading.Tasks.Task.InnerInvoke() in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs:line 2556
at System.Threading.Tasks.Task.<>c.<.cctor>b__291_0(Object obj) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs:line 2538
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/ExecutionContext.cs:line 196
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs:line 2496
at System.Threading.Tasks.Task.ExecuteEntryUnsafe(Thread threadPoolThread) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs:line 2434
at System.Threading.Tasks.ThreadPoolTaskScheduler.<>c.<.cctor>b__8_0(Object s) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/ThreadPoolTaskScheduler.cs:line 36
at System.Threading.Thread.StartCallback() in /_/src/mono/System.Private.CoreLib/src/System/Threading/Thread.Mono.cs:line 218
--- End of stack trace from previous location ---
at System.Net.Quic.QuicListener.AcceptConnectionAsync(CancellationToken cancellationToken) in /_/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicListener.cs:line 197
--- End of inner exception stack trace ---
Finished: System.Net.Quic.Functional.Tests
=== TEST EXECUTION SUMMARY ===
System.Net.Quic.Functional.Tests Total: 436, Errors: 0, Failed: 1, Skipped: 3, Time: 124.585s
/private/tmp/helix/working/9DE308A9/w/B373090E/e
----- end Wed Sep 9 01:04:16 PDT 2026 ----- exit code 1 ----------------------------------------------------------
```
## Build Information
Build: https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=1588569
Build error leg or test failing: System.Net.Quic.Tests.QuicStreamTests.WriteAbortedWithoutWriting_ReadThrows
Pull request: https://github.com/dotnet/runtime/pull/133474
## 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](https://github.com/dotnet/arcade/blob/main/Documentation/Build%20Analysis/KnownIssueJsonStepByStep.md).
```json
{
"ErrorMessage": ["System.Net.Quic.Tests.QuicStreamTests.WriteAbortedWithoutWriting_ReadThrows [FAIL]", "System.Net.Quic.QuicException : The connection timed out from inactivity."],
"ErrorPattern": "",
"BuildRetry": false,
"ExcludeConsoleLog": false
}
```
### Known issue validation
**Build: :mag_right:** https://dev.azure.com/dnceng-public/public/_build/results?buildId=1588569
**Error message validated:** `[System.Net.Quic.Tests.QuicStreamTests.WriteAbortedWithoutWriting_ReadThrows [FAIL] System.Net.Quic.QuicException : The connection timed out from inactivity.`]
**Result validation:** :white_check_mark: Known issue matched with the provided build.
**Validation performed at:** 9/9/2026 10:22:29 PM UTC
### Report
|Build|Repository|Test|Pull Request|
|---|---|---|---|
|[1588569](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1588569)|dotnet/runtime|[System.Net.Quic.Tests.QuicStreamTests.WriteAbortedWithoutWriting_ReadThrows](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1588569&view=ms.vss-test-web.build-test-results-tab&runId=43847086&resultId=194822)|dotnet/runtime#133474|
#### Summary
|24-Hour Hit Count|7-Day Hit Count|1-Month Count|
|---|---|---|
|0|1|1|
Contributor guide
Research direction
Start with QuicStreamTests.WriteAbortedWithoutWriting_ReadThrows and the setup in tests/FunctionalTests/QuicTestBase.cs; run the named functional test with MsQuic enabled to determine whether the timeout is reproducible. Read the connection event handling around QuicConnection.cs lines 657 and 771, and verify the test completes without the inactivity timeout or unobserved QuicListener disposal exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- networking, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100