Repository navigation
Closed
Closed
Copy link
Labels
Known Build ErrorUse this to report build issues in the .NET Helix tabUse this to report build issues in the .NET Helix tabarea-System.Net.Quictest-run-coreTest failures in .NET Core test runsTest failures in .NET Core test runs
Milestone
Description
System.Net.Quic.Tests.QuicStreamTests.WriteCanceled_NextWriteThrows [FAIL]
System.AggregateException : One or more errors occurred. (Assert.Throws() Failure
Expected: typeof(System.Net.Quic.QuicException)
Actual: (No exception was thrown)) (Assert.Throws() Failure
Expected: typeof(System.Net.Quic.QuicException)
Actual: (No exception was thrown))
---- Assert.Throws() Failure
Expected: typeof(System.Net.Quic.QuicException)
Actual: (No exception was thrown)
---- Assert.Throws() Failure
Expected: typeof(System.Net.Quic.QuicException)
Actual: (No exception was thrown)
Stack Trace:
/_/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs(92,0): at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks)
/_/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs(55,0): at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks, Int32 millisecondsTimeout)
/_/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(303,0): at System.Net.Quic.Tests.QuicTestBase.RunClientServer(Func`2 clientFunction, Func`2 serverFunction, Int32
Failed in #76768. Full log: https://helixre107v0xdeko0k025g8.blob.core.windows.net/dotnet-runtime-refs-pull-76768-merge-80851214628f4109bd/System.Net.Quic.Functional.Tests/1/console.21da1d39.log?helixlogtype=result
{
"ErrorMessage": "System.Net.Quic.Tests.QuicStreamTests.WriteCanceled_NextWriteThrows",
"BuildRetry": false
}Report
| Build | Definition | Step Name | Console log | Pull Request |
|---|---|---|---|---|
| 392518 | dotnet/runtime | Send to Helix | Log | |
| 388991 | dotnet/runtime | Send to Helix | Log | |
| 384892 | dotnet/runtime | Send to Helix | Log |
Summary
| 24-Hour Hit Count | 7-Day Hit Count | 1-Month Count |
|---|---|---|
| 2 | 7 | 24 |
Known issue validation
Build: 🔎
Result validation:
Metadata
Metadata
Assignees
Labels
Known Build ErrorUse this to report build issues in the .NET Helix tabUse this to report build issues in the .NET Helix tabarea-System.Net.Quictest-run-coreTest failures in .NET Core test runsTest failures in .NET Core test runs
Activity
rzikm commentedon Jun 14, 2023
The test is flaky and the failure happens on regular runs as well (but usually succeeds on reruns)
The case seems to be when the cancellation happens to occur before the call to WriteAsync (and we call it with pre-cancelled token).
runtime/src/libraries/System.Net.Quic/tests/FunctionalTests/QuicStreamTests.cs
Lines 591 to 606 in 844702d
We should have a look someday.
rzikm commentedon Sep 8, 2023
Okay, my original thought was wrong, we handle precancelled tokens correctly, there is actually very slim chance to repro this because many things have to align properly.
the issue can be artificially enforced reproduced by adding sleep in
if (abortDirection.HasFlag(QuicAbortDirection.Write))branch)if (!_sendTcs.TryGetValueTask(out ValueTask valueTask, this, cancellationToken))) or by making huge writes (e.g. 1 GB) to ensure that CancellationTokenSource fires while send is in progressWhat happens is that cancellation token sets Write state to cancelled and unblocks the Test task to progress, and it completes the
clientFunctionandDisposes the clientQuicStream(i.e. completing the write direction gracefully), before the cancellation-registered action (which runs on a different thread) manages to finish theAbortcall.In other words, if cancellation token fires while send is in progress, we may end up gracefully closing the write side :/
rzikm commentedon Sep 19, 2023
fixed by #90253