Skip to content

Test failure: System.Linq.AsyncEnumerable.Tests #130105

Description

@VincentBu

Failed in: runtime-coreclr libraries-jitstress 20260701.1

Failed tests:

net11.0-windows-Release-x86-jitstress1-Windows.10.Amd64.Open
- System.Linq.AsyncEnumerable.Tests Work Item
net11.0-windows-Release-x86-jitstress2_tiered-Windows.10.Amd64.Open
- System.Linq.AsyncEnumerable.Tests Work Item
net11.0-windows-Release-x86-jitstress1_tiered-Windows.10.Amd64.Open
- System.Linq.AsyncEnumerable.Tests Work Item
net11.0-windows-Release-x86-jitstress2-Windows.10.Amd64.Open
- System.Linq.AsyncEnumerable.Tests Work Item
net11.0-linux-Release-x64-jitstress2-AzureLinux.3.Amd64.Open
- System.Linq.AsyncEnumerable.Tests Work Item
net11.0-windows-Release-x64-jitstress1-Windows.10.Amd64.Open
- System.Linq.AsyncEnumerable.Tests Work Item
net11.0-windows-Release-arm64-jitstress2-Windows.11.Arm64.Open
- System.Linq.AsyncEnumerable.Tests Work Item

Error message:

Assertion failed.
The runtime should have initialized the thread id by now.

Stack trace:

   at System.Linq.Tests.MaxByAsyncTests.VariousValues_MatchesEnumerable(Int32[] values) in /_/src/libraries/System.Linq.AsyncEnumerable/tests/MaxByAsyncTests.cs:line 52
   at System.Runtime.CompilerServices.AsyncHelpers.RuntimeAsyncTask`1.ExecuteDirectly(Thread threadPoolThread) in /_/src/coreclr/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncHelpers.CoreCLR.cs:line 738
   at System.Runtime.CompilerServices.RuntimeAsyncTaskContinuation.Execute(Boolean canInline) in /_/src/coreclr/System.Private.CoreLib/src/System/Runtime/CompilerServices/RuntimeAsyncTaskContinuation.cs:line 35
   at System.Threading.Tasks.Task.RunContinuations(Object continuationObject) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs:line 3632
   at System.Threading.Tasks.Task.FinishContinuations() in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs:line 3606
   at System.Threading.Tasks.Task`1.TrySetResult(TResult result) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task_T.cs:line 385
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.SetExistingTaskResult(Task`1 task, TResult result) in /_/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncTaskMethodBuilderT.cs:line 524
   at System.Runtime.CompilerServices.AsyncValueTaskMethodBuilder`1.SetResult(TResult result) in /_/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncValueTaskMethodBuilderT.cs:line 54
   at System.Linq.AsyncEnumerable.<MaxByAsync>g__Impl|117_0[TSource,TKey](IAsyncEnumerable`1 source, Func`3 keySelector, IComparer`1 comparer, CancellationToken cancellationToken) in /_/src/libraries/System.Linq.AsyncEnumerable/src/System/Linq/MaxByAsync.cs:line 230
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.ExecutionContextCallback(Object s) in /_/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncTaskMethodBuilderT.cs:line 292
   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.MoveNext(Thread threadPoolThread) in /_/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncTaskMethodBuilderT.cs:line 371
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext() in /_/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncTaskMethodBuilderT.cs:line 350
   at System.Threading.ThreadPool.<>c.<.cctor>b__57_0(Object state) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadPoolWorkQueue.cs:line 1428
   at System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1.SignalCompletion() in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Sources/ManualResetValueTaskSourceCore.cs:line 249
   at System.Linq.AsyncEnumerable.<Select>g__Impl|148_0[TSource,TResult](IAsyncEnumerable`1 source, Func`2 selector, CancellationToken cancellationToken)+MoveNext() in /_/src/libraries/System.Linq.AsyncEnumerable/src/System/Linq/Select.cs:line 45
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.ExecutionContextCallback(Object s) in /_/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncTaskMethodBuilderT.cs:line 290
   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.MoveNext(Thread threadPoolThread) in /_/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncTaskMethodBuilderT.cs:line 356
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext() in /_/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncTaskMethodBuilderT.cs:line 350
   at System.Threading.ThreadPool.<>c.<.cctor>b__57_0(Object state) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadPoolWorkQueue.cs:line 1428
   at System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1.SignalCompletion() in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Sources/ManualResetValueTaskSourceCore.cs:line 249
   at System.Linq.Tests.AsyncEnumerableTestExtensions.Yield[T](IAsyncEnumerable`1 source, CancellationToken cancellationToken)+MoveNext() in /_/src/libraries/System.Linq.AsyncEnumerable/tests/AsyncEnumerableTests.cs:line 104
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.ExecutionContextCallback(Object s) in /_/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncTaskMethodBuilderT.cs:line 290
   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.MoveNext(Thread threadPoolThread) in /_/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncTaskMethodBuilderT.cs:line 356
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext() in /_/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncTaskMethodBuilderT.cs:line 350
   at System.Linq.Tests.AsyncEnumerableTestExtensions.ForceYieldingAwaiter.<>c.<OnCompleted>b__3_0(Object s) in /_/src/libraries/System.Linq.AsyncEnumerable/tests/AsyncEnumerableTests.cs:line 110
   at System.Threading.QueueUserWorkItemCallbackDefaultContext.Execute() in /_/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadPoolWorkQueue.cs:line 1330
   at System.Threading.ThreadPoolWorkQueue.Dispatch() in /_/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadPoolWorkQueue.cs:line 960
   at System.Threading.PortableThreadPool.WorkerThread.WorkerDoWork(PortableThreadPool threadPoolInstance) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/PortableThreadPool.WorkerThread.cs:line 137
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart() in /_/src/libraries/System.Private.CoreLib/src/System/Threading/PortableThreadPool.WorkerThread.cs:line 110
   at System.Threading.Thread.StartCallback(Thread* pThread) in /_/src/coreclr/System.Private.CoreLib/src/System/Threading/Thread.CoreCLR.cs:line 117

Note

The KBE additions below were prepared with AI/Copilot assistance.

Build Information

Build: runtime-coreclr libraries-jitstress 20260701.1
Build error leg or test failing: net11.0-linux-Release-x64-jitstress2-AzureLinux.3.Amd64.Open - System.Linq.AsyncEnumerable.Tests Work Item

Error Details

Representative confirmed failure excerpt from the preserved failure logs:

Assertion failed.
The runtime should have initialized the thread id by now.
   at System.Linq.Tests.ToHashSetAsyncTests.VariousValues_MatchesEnumerable(Int32[] values) in /_/src/libraries/System.Linq.AsyncEnumerable/tests/ToHashSetAsyncTests.cs:line 28

Error Message

{
  "ErrorMessage": "The runtime should have initialized the thread id by now.",
  "ErrorPattern": "",
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}

Failure Logs

Known issue validation

Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=1489260
Error message validated: [The runtime should have initialized the thread id by now.]
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 7/3/2026 12:30:50 PM UTC

Report

Build Repository Test Pull Request
1505567 dotnet/runtime System.Linq.AsyncEnumerable.Tests.WorkItemExecution
1505119 dotnet/runtime System.Linq.AsyncEnumerable.Tests.WorkItemExecution
1505020 dotnet/runtime System.Linq.AsyncEnumerable.Tests.WorkItemExecution
1504741 dotnet/runtime System.Linq.AsyncEnumerable.Tests.WorkItemExecution
1504679 dotnet/runtime System.Linq.AsyncEnumerable.Tests.WorkItemExecution
1504534 dotnet/runtime System.Linq.AsyncEnumerable.Tests.WorkItemExecution
1504504 dotnet/runtime System.Linq.AsyncEnumerable.Tests.WorkItemExecution
1502812 dotnet/runtime System.Linq.AsyncEnumerable.Tests.WorkItemExecution
1500785 dotnet/runtime System.Linq.AsyncEnumerable.Tests.WorkItemExecution
1500203 dotnet/runtime System.Linq.AsyncEnumerable.Tests.WorkItemExecution
1500199 dotnet/runtime System.Threading.Tasks.Dataflow.Tests.WorkItemExecution
1494534 dotnet/runtime System.Linq.AsyncEnumerable.Tests.WorkItemExecution
1500201 dotnet/runtime System.Linq.AsyncEnumerable.Tests.WorkItemExecution
1500200 dotnet/runtime System.Linq.AsyncEnumerable.Tests.WorkItemExecution
1494056 dotnet/runtime System.Linq.AsyncEnumerable.Tests.WorkItemExecution
1498655 dotnet/runtime System.Linq.AsyncEnumerable.Tests.WorkItemExecution
1496513 dotnet/runtime System.Linq.AsyncEnumerable.Tests.WorkItemExecution
1494990 dotnet/runtime System.Linq.AsyncEnumerable.Tests.WorkItemExecution
1494363 dotnet/runtime System.Linq.AsyncEnumerable.Tests.WorkItemExecution
1494188 dotnet/runtime System.Linq.AsyncEnumerable.Tests.WorkItemExecution
1494160 dotnet/runtime System.Linq.AsyncEnumerable.Tests.WorkItemExecution
1494037 dotnet/runtime System.Linq.AsyncEnumerable.Tests.WorkItemExecution
1489260 dotnet/runtime System.Linq.AsyncEnumerable.Tests.WorkItemExecution

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
0 16 23

Metadata

Metadata

Assignees

Labels

JitStressCLR JIT issues involving JIT internal stress modesKnown Build ErrorUse this to report build issues in the .NET Helix tabPriority:1Work that is critical for the release, but we could probably ship withoutarea-System.Threadingblocking-clean-ci-optionalBlocking optional rolling runs

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions