Repository navigation
Description
Description
TaskContinueWithTests.RunContinueWithStressTestsNoState failed with OutOfMemoryException while collecting canceled-task exceptions in a Windows x86 CoreCLR CI run.
Reproduction Steps
Run the existing System.Threading.Tasks.Tests.TaskContinueWithTests.RunContinueWithStressTestsNoState test in the configuration from the linked build. A local reproduction has not been established.
Expected behavior
The continuation stress test completes without exhausting memory.
Actual behavior
Task.WaitAll failed with OutOfMemoryException. The reported stack starts in StringBuilder.ToString and includes Task.AddExceptionsForCompletedTask. The complete failure excerpt is below.
Regression?
Unknown. The failing CoreLib and task-test source files are not changed by the associated PR; no PR-specific code fix has been identified.
Known Workarounds
None verified. No tests have been disabled.
Configuration
- Target framework:
net11.0-windows. - Runtime configuration: CoreCLR Release.
- Process architecture: x86.
- Helix queue:
Windows.Server2025.Amd64.Open. - CI merge commit:
8f99bc69fbd3400ef93c60d45f943c2326403803. - PR head:
4661e533bf2fd5e88182d0b9194648c12870f813.
Other information
The failure is recorded in the Helix console log. This issue tracks only the task-continuation OOM.
Build Information
Build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=1644344
Build error leg or test failing: net11.0-windows-Release-x86-coreclr_release-Windows.Server2025.Amd64.Open-System.Threading.Tasks.Tests.TaskContinueWithTests.RunContinueWithStressTestsNoState
Pull request: #136221
KBE authoring guidance (ci-failure-scan)
Error Detailsis for readers. Paste the full exception, stack trace, or build error excerpt so the failure is understandable without opening the raw log.- Build Analysis parses only the single JSON block under
Error Message. ErrorMessageis a case-sensitive ordinalString.Containssubstring copied verbatim from the failing log.- Set
BuildRetrytotrueonly for a clear infrastructure retry case.ExcludeConsoleLogdisables Helix console-log scanning.
Error Details
System.Threading.Tasks.Tests.TaskContinueWithTests.RunContinueWithStressTestsNoState [FAIL]
System.OutOfMemoryException : Exception of type 'System.OutOfMemoryException' was thrown.
Stack Trace:
/_/src/libraries/System.Private.CoreLib/src/System/Text/StringBuilder.cs(324,0): at System.Text.StringBuilder.ToString()
/_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs(5328,0): at System.Threading.Tasks.Task.AddExceptionsForCompletedTask(List`1& exceptions, Task t)
/_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs(5233,0): at System.Threading.Tasks.Task.WaitAllCore(ReadOnlySpan`1 tasks, Int32 millisecondsTimeout, CancellationToken cancellationToken)
/_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs(4903,0): at System.Threading.Tasks.Task.WaitAll(Task[] tasks)
/_/src/libraries/System.Runtime/tests/System.Threading.Tasks.Tests/Task/TaskContinueWithTests.cs(1380,0): at System.Threading.Tasks.Tests.TaskContinueWithTests.ContinueWithTortureTest(Int32 numCanceled, Int32 numLeftover, Int32 completeAfter, Int32 cancelAfter)
/_/src/libraries/System.Runtime/tests/System.Threading.Tasks.Tests/Task/TaskContinueWithTests.cs(71,0): at System.Threading.Tasks.Tests.TaskContinueWithTests.RunContinueWithStressTestsNoState()
/_/src/coreclr/System.Private.CoreLib/src/System/Reflection/IntrinsicInvokeHelper.cs(432,0): at System.Reflection.IntrinsicInvokeHelper.Static_Void_0(IntPtr fn, Object _, IntPtr* __, RuntimeType ___)
/_/src/coreclr/System.Private.CoreLib/src/System/Reflection/MethodBaseInvoker.CoreCLR.cs(30,0): at System.Reflection.MethodBaseInvoker.InvokeWithSharedThunk(Object obj, IntPtr* args)
/_/src/libraries/System.Private.CoreLib/src/System/Reflection/RuntimeMethodInfo.cs(134,0): at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
Error Message
{
"ErrorMessage": [
"System.Threading.Tasks.Tests.TaskContinueWithTests.RunContinueWithStressTestsNoState [FAIL]",
"System.OutOfMemoryException : Exception of type 'System.OutOfMemoryException' was thrown.",
"at System.Threading.Tasks.Tests.TaskContinueWithTests.RunContinueWithStressTestsNoState()"
],
"ErrorPattern": "",
"BuildRetry": false,
"ExcludeConsoleLog": false
}Agentic workflow metadata (ci-failure-scan)
Workflow artifact: ci-failure-scan
Artifact kind: kbe-verification
Verified match count: 1 hits in failure.log
Note
This issue was generated by GitHub Copilot.
Known issue validation
Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=1644344
Error message validated: [System.Threading.Tasks.Tests.TaskContinueWithTests.RunContinueWithStressTestsNoState [FAIL] System.OutOfMemoryException : Exception of type 'System.OutOfMemoryException' was thrown. at System.Threading.Tasks.Tests.TaskContinueWithTests.RunContinueWithStressTestsNoState()]
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 10/22/2026 3:01:53 AM UTC
Report
Summary
| 24-Hour Hit Count | 7-Day Hit Count | 1-Month Count |
|---|---|---|
| 1 | 5 | 9 |
Activity
dotnet-policy-service commentedon Oct 22, 2026
Tagging subscribers to this area: @dotnet/area-system-threading-tasks
See info in area-owners.md if you want to be subscribed.
fix(tasks): preserve StackTrace on TaskCanceledException in WaitAll w…