Repository navigation
Assert failure: !"OBJECTREF being accessed while thread is in preemptive GC mode." #131925
Description
Activity
- addedblocking-outerloopBlocking the 'runtime-coreclr outerloop' and 'runtime-libraries-coreclr outerloop' runsBlocking the 'runtime-coreclr outerloop' and 'runtime-libraries-coreclr outerloop' runs
on Aug 6, 2026 - addeduntriagedNew issue has not been triaged by the area ownerNew issue has not been triaged by the area owner
on Aug 6, 2026 dotnet-policy-service commented
on Aug 6, 2026 ContributorMore actionsTagging subscribers to this area: @dotnet/interop-contrib
See info in area-owners.md if you want to be subscribed.dotnet-policy-service commented
on Aug 6, 2026 ContributorMore actionsTagging subscribers to 'arch-wasm': @lewing, @pavelsavara
See info in area-owners.md if you want to be subscribed.- removeduntriagedNew issue has not been triaged by the area ownerNew issue has not been triaged by the area owner
on Aug 6, 2026 dotnet-policy-service commented
on Aug 6, 2026 ContributorMore actionsTagging subscribers to this area: @agocke
See info in area-owners.md if you want to be subscribed.- marked [ci-scan] Test failure: Loader/ContextualReflection asserts OBJECTREF in preemptive GC mode on browser-wasm interpreter #131980 as a duplicate of this issue
on Aug 7, 2026 - addedKnown Build ErrorUse this to report build issues in the .NET Helix tabUse this to report build issues in the .NET Helix tab
on Aug 7, 2026 More analysis over in #132022.
We enabled Wasm SPC R2R but the change also more broadly enabled R2R in outerloop.
This test broadening surfaced #131924 as well.
Failed in: runtime-coreclr outerloop 20260809.3
Failed tests:
coreclr browser wasm Checked @ (Ubuntu.2604.Amd64.Open)AzureLinux.3.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-26.04-helix-webassembly-amd64@sha256:0be8725e08b6d0f58ec0290f3f3b70c449123e78b2b33853e9049df84b912fa8 - Loader/ContextualReflection/ContextualReflection/ContextualReflection.cmd coreclr browser wasm Checked no_tiered_compilation @ (Ubuntu.2604.Amd64.Open)AzureLinux.3.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-26.04-helix-webassembly-amd64@sha256:0be8725e08b6d0f58ec0290f3f3b70c449123e78b2b33853e9049df84b912fa8 - Loader/ContextualReflection/ContextualReflection/ContextualReflection.cmdError message:
Out-of-process wrapper failed with exit code 1. BEGIN EXECUTION Running with node CORE_ROOT: /root/helix/work/correlation ExePath: /root/helix/work/workitem/e/Loader/ContextualReflection/ContextualReflection/ContextualReflection.dll CLRTestExecutionArguments: node version: v23.11.1 Timeout in ms: 900000 Running: node --experimental-wasm-exnref --stack-size=8192 /root/helix/work/correlation/corerun.js -c /root/helix/work/correlation -p System.Reflection.Metadata.MetadataUpdater.IsSupported=false -p System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization=true /root/helix/work/workitem/e/Loader/ContextualReflection/ContextualReflection/ContextualReflection.dll ASSERT FAILED Expression: !"OBJECTREF being accessed while thread is in preemptive GC mode." Location: /__w/1/s/src/coreclr/vm/object.cpp:514 Function: Validate Process: 42 Frame (InterpreterFrame): 0x4ff358 0) Xunit.Assert::GetEqualityComparer, IR_0007 1) Xunit.Assert::Equal, IR_0010 2) ContextualReflectionTest.TestResolve::Assert, IR_002e 3) ContextualReflectionTest.TestResolve::Assert, IR_001c 4) ContextualReflectionTest.Program::TestResolveMissingAssembly, IR_002f 5) ContextualReflectionTest.Program::TestAssemblyLoad, IR_0031 6) ContextualReflectionTest.Program::TestAssemblyLoad, IR_00b8 7) ContextualReflectionTest.Program::RunTests, IR_0011 8) ContextualReflectionTest.Program::RunTests, IR_004e 9) ContextualReflectionTest.Program::TestEntryPoint, IR_0013 10) __GeneratedMainWrapper::Main, IR_0020 node:internal/process/promises:392 new UnhandledPromiseRejection(reason); ^ UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "Debugger not attached". at throwUnhandledRejectionsMode (node:internal/process/promises:392:7) at processPromiseRejections (node:internal/process/promises:475:17) at process.processTicksAndRejections (node:internal/process/task_queues:106:32) { code: 'ERR_UNHANDLED_REJECTION' } Node.js v23.11.1 Kill watchdog with PID 675 Expected: 100 Actual: 1 END EXECUTION - FAILEDStack trace:
at Xunit.Assert.True(Nullable`1 condition, String userMessage) in /_/src/arcade/src/Microsoft.DotNet.XUnitAssert/src/BooleanAsserts.cs:line 135 at Xunit.Assert.True(Boolean condition, String userMessage) in /_/src/arcade/src/Microsoft.DotNet.XUnitAssert/src/BooleanAsserts.cs:line 117 at TestLibrary.OutOfProcessTest.ImportPrecomputedResult(String assemblyPath, String testPathPrefix) in /__w/1/s/src/tests/Common/CoreCLRTestLibrary/OutOfProcessTest.cs:line 285 at TestLibrary.OutOfProcessTest.RunOutOfProcessTest(String assemblyPath, String testPathPrefix) in /__w/1/s/src/tests/Common/CoreCLRTestLibrary/OutOfProcessTest.cs:line 84 at Program.<<Main>$>g__TestExecutor390|0_391(StreamWriter tempLogSw, StreamWriter statsCsvSw, StreamWriter outOfProcessPlanWriter, <>c__DisplayClass0_0&)This is probably JS exception thrown from emscripten/posix layer or a trap by invalid WASM access.
Thepreemptive GC modeis just consequence of unwinding thru the GC mode boundary and then trying to continue running.It would be great if we can catch it and report the underlying reason/stack.
At least in Debug/Checked builds.
I know that this is unexpected exception/trap and such things are also UB on the PInvoke/ICall layer.
But the diagnostic we get here is not useful. These things will continue happening with long tail of edge case reasons.Reacted by Jeremy KoritzinskyRelated #123482
- added a commit that references this issue
on Aug 19, 2026
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsNo status
Failed in: runtime-coreclr outerloop 20260805.6
Failed tests:
Error message:
Stack trace:
Known Issue 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.
{ "ErrorMessage": [ "Loader/ContextualReflection/ContextualReflection/ContextualReflection.cmd", "OBJECTREF being accessed while thread is in preemptive GC mode." ], "ErrorPattern": "", "BuildRetry": false, "ExcludeConsoleLog": false }Known issue validation
Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=1541935
Error message validated:
[Loader/ContextualReflection/ContextualReflection/ContextualReflection.cmd OBJECTREF being accessed while thread is in preemptive GC mode.]Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 8/7/2026 1:59:14 PM UTC
Report
Summary