Skip to content

Assert failure: !"OBJECTREF being accessed while thread is in preemptive GC mode." #131925

Description

@VincentBu

Failed in: runtime-coreclr outerloop 20260805.6

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.cmd

Error 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 674
Expected: 100
Actual: 1
END EXECUTION - FAILED

Stack 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__TestExecutor389|0_390(StreamWriter tempLogSw, StreamWriter statsCsvSw, StreamWriter outOfProcessPlanWriter, <>c__DisplayClass0_0&)

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

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

Activity

  1. added
    blocking-outerloopBlocking the 'runtime-coreclr outerloop' and 'runtime-libraries-coreclr outerloop' runs
    on Aug 6, 2026
  2. dotnet-policy-service commented on Aug 6, 2026

    @dotnet-policy-service
    Contributor

    Tagging subscribers to this area: @dotnet/interop-contrib
    See info in area-owners.md if you want to be subscribed.

  3. dotnet-policy-service commented on Aug 6, 2026

    @dotnet-policy-service
    Contributor

    Tagging subscribers to 'arch-wasm': @lewing, @pavelsavara
    See info in area-owners.md if you want to be subscribed.

  4. self-assigned this
    on Aug 6, 2026
  5. added this to the Future milestone on Aug 6, 2026
  6. removed
    untriagedNew issue has not been triaged by the area owner
    on Aug 6, 2026
  7. dotnet-policy-service commented on Aug 6, 2026

    @dotnet-policy-service
    Contributor

    Tagging subscribers to this area: @agocke
    See info in area-owners.md if you want to be subscribed.

  8. added
    Known Build ErrorUse this to report build issues in the .NET Helix tab
    on Aug 7, 2026
  9. AndyAyersMS commented on Aug 7, 2026

    @AndyAyersMS
    Member

    More analysis over in #132022.

    We enabled Wasm SPC R2R but the change also more broadly enabled R2R in outerloop.

  10. AndyAyersMS commented on Aug 7, 2026

    @AndyAyersMS
    Member

    This test broadening surfaced #131924 as well.

  11. VincentBu commented on Aug 10, 2026

    @VincentBu
    ContributorAuthor

    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.cmd
    
    

    Error 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 - FAILED
    
    

    Stack 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&)
    
  12. pavelsavara commented on Aug 13, 2026

    @pavelsavara
    Member

    This is probably JS exception thrown from emscripten/posix layer or a trap by invalid WASM access.
    The preemptive GC mode is 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.

  13. pavelsavara commented on Aug 14, 2026

    @pavelsavara
    Member

    Related #123482

  14. self-assigned this
    on Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Known Build ErrorUse this to report build issues in the .NET Helix tabarch-wasmWebAssembly architecturearea-VM-coreclrblocking-outerloopBlocking the 'runtime-coreclr outerloop' and 'runtime-libraries-coreclr outerloop' runs

Type

No type

Projects

  • Status
    No status

Relationships

None yet

Development

No branches or pull requests

Issue actions