Skip to content

Assert failure: thread->PreemptiveGCDisabled() in ObjectRefFlush in browser-wasm ReadyToRun runtime tests #133220

Description

@lewing

Build Information

Build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=1581582
Build error leg or test failing: coreclr Pri0 Runtime Tests Run R2R_CG2 browser wasm checked — reflection work item
Pull request: #133136

The reflection work item in the browser-wasm ReadyToRun runtime-test leg asserts in Thread::ObjectRefFlush. It fails deterministically — the same work item fails in both 1580911 (Helix job 20b86593-abb9-407d-9cd2-35a9f3ca8784) and 1581582 (Helix job 091c9316-24e7-4e7a-964c-940d0e133fdc).

Helix categorises this as InfrastructureError. It is not — it is a real product assert in a checked runtime.

Relationship to other issues

This is the same underlying defect as #133219, #131925, and #132022 — a thread left in preemptive GC mode on the browser-wasm ReadyToRun path — caught at a different debug checkpoint.

It is filed separately from #133219 only because Build Analysis matches on error text, and this assert's text differs. Object::Validate catches the bad mode on the next OBJECTREF access (#133219, 20 work items); Thread::ObjectRefFlush catches it on entry to the fixup worker (this issue, 1 work item). Consolidate if a maintainer prefers.

Error Details

19:53:05.741 Running test: reflection/DisallowAbstractConstructors/DisallowAbstractConstructors/DisallowAbstractConstructors.dll
ASSERT FAILED
	Expression: thread->PreemptiveGCDisabled()
	Location:   /__w/1/s/src/coreclr/vm/threads.cpp:4624
	Function:   ObjectRefFlush
	Process:    42
Frame (PrestubMethodFrame): 0x4febdc
    Skipping 0x4febdc
Frame (PrestubMethodFrame): 0x4fef1c
    Skipping 0x4fef1c
Frame (PrestubMethodFrame): 0x4ff28c

Error Message

{
  "ErrorMessage": [
    "Expression: thread->PreemptiveGCDisabled()",
    "Location:   /__w/1/s/src/coreclr/vm/threads.cpp:4624",
    "Function:   ObjectRefFlush",
    "Process:    42"
  ],
  "ErrorPattern": "",
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}

Why the match block is scoped this way

This uses the array form: each element matches one line, in order, with arbitrary lines allowed between them.

thread->PreemptiveGCDisabled() on its own is not a usable signature — it appears at 26 assert sites across the VM and is platform-neutral, so matching it alone would mark unrelated failures on any platform as known.

The four elements together scope the match: the exact assert text, the exact source location, the asserting function, and Process: 42 — emscripten's fixed PID, which native platforms do not report. That last element is what keeps the match on browser-wasm.

All four elements were verified verbatim against the reflection console log for Helix job 091c9316-24e7-4e7a-964c-940d0e133fdc. The frame chain is deliberately excluded because the innermost frame varies by work item across this failure family.

Note

This issue was authored with GitHub Copilot.

Known issue validation

Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=1581582
Error message validated: [Expression: thread->PreemptiveGCDisabled() Location: /__w/1/s/src/coreclr/vm/threads.cpp:4624 Function: ObjectRefFlush Process: 42]
Result validation: ❌ Known issue did not match with the provided build.
Validation performed at: 9/4/2026 3:06:22 AM UTC

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    • Status
      No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions