Repository navigation
xcl run: a title's minidump of itself is declined, not left to hang - #742
abilliontokens wants to merge 1 commit into
Conversation
A retail title's crash handler wakes its dump thread, which calls dbgcore!MiniDumpWriteDump on its own process while the crashed thread waits for it. In-process, dbgcore suspends every other thread and then takes the process heap's lock. When one of the suspended threads holds that lock, the dump never finishes: the process hangs after XCL's crash line, the window frozen and not responding. Seen at the title's world-loading crash (+0x23cf683) on an RTX 5060 Ti: one run ended a second after the crash, the next hung for minutes. cdb on the hung process showed every thread suspended once more than cdb itself suspends them, the dump thread in dbgcore!MiniDumpWriteDump waiting in RtlAllocateHeap's critical section, and the crashed thread in XCL's unhandled filter -> the title's filter -> WaitForSingleObject. The title loads dbghelp.dll by name and asks it for MiniDumpWriteDump. It is now routed to a small HLE module whose MiniDumpWriteDump returns FALSE with ERROR_NOT_SUPPORTED for the current process and calls Windows' for any other. The rest of dbghelp is Windows' own. XCL's log already holds the exception and every thread by then. Assisted-by: Claude Code (Claude Opus 5.5)
|
Tested #742 at
The two runs faulted at different instructions. This verifies the self-dump and exit behavior on AMD. World loading still crashes. The fixed run recorded 1,718 presents and zero device removals. The integration workspace reported 731 passed, 0 failed and 41 ignored, including the new self-dump test passing. One counted pass printed a runtime skip because xgameruntime.dll was unavailable for the debug-layer draw test. Codex (GPT-6) ran the local tests and prepared this report. |
Integrates upstream PR xcl-dev#742: route dbghelp!MiniDumpWriteDump and decline self-process minidumps so crashes exit cleanly instead of deadlocking on process heap locks.
Integrates upstream PR xcl-dev#742: route dbghelp!MiniDumpWriteDump and decline self-process minidumps so crashes exit cleanly instead of deadlocking on process heap locks.
Integrates upstream PR xcl-dev#742: route dbghelp!MiniDumpWriteDump and decline self-process minidumps so crashes exit cleanly instead of deadlocking on process heap locks.
Integrates upstream PR xcl-dev#742: route dbghelp!MiniDumpWriteDump and decline self-process minidumps so crashes exit cleanly instead of deadlocking on process heap locks.
|
Test report: #742 at Tested
The hang on
At this abort the title's render workers are seconds into driver compiles of compute pipelines, which fits how often it hangs here. Not tested
Runs, dump analysis and this report by Claude Code (Claude Fable 5.2, with Claude Opus 5.5 agents) on the machine above; every number is from the logs of those runs. |
Integrates upstream PR xcl-dev#742: route dbghelp!MiniDumpWriteDump and decline self-process minidumps so crashes exit cleanly instead of deadlocking on process heap locks.
|
Independent confirmation of the cause from a hung process, plus a run of this PR on a 12 GB NVIDIA card. Setup: RTX 3060 12 GB (581.80, wave32), Windows 11 26200, 64 GB RAM, release builds. World load with A pressed every 4 s from 20 s,
This PR's head
On the side: before finding this PR I tried a 10 s deadline on the title's filter from a thread in the host. It cannot work for this case, because the title's filter suspends that thread too. Declining the dump, as here, avoids the wait altogether. Not tested: the full suite on this head; AMD. Written with Claude Code (Claude Opus 5.5) from runs on this machine. |
A retail title's crash handler writes a minidump of its own process. Its dump thread calls
dbgcore!MiniDumpWriteDumpwhile the crashed thread waits for it. In-process, dbgcore suspends every other thread and then takes the process heap's lock. When one of the threads it suspended holds that lock, the dump never finishes: the process hangs after XCL's crash line, with the window frozen and not responding. It's a race. At the title's world-loading crash (+0x23cf683, #232 / #581) one run ended a second after the crash and the next one hung for minutes.The title loads
dbghelp.dllby name and asks it forMiniDumpWriteDump. This routes that DLL name to a small HLE module (with the realdbghelp.dllas its fallback). ItsMiniDumpWriteDumpreturnsFALSE/ERROR_NOT_SUPPORTEDfor the current process and calls Windows' for any other process. XCL's log already holds the exception and every thread by then (unhandled_filter,hk_nt_terminate_process).What is in it
crates/xcl/src/hle/dbghelp.rs: the module and its testa_minidump_of_the_process_itself_is_declined. Throughload_library/get_proc_addressas the title calls them,MiniDumpWriteDumpis XCL's and declines at once, andSymInitializeWis Windows' own. The test fails without the route:GetProcAddressreturns Windows'MiniDumpWriteDump.crates/xcl/src/hle/mod.rs: the module, and the route fordbghelp.dll.Tested
cargo test --workspace -- --test-threads=4ona8d712f: 702 passed, 0 failed, 41 ignored. SKIPPED:gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware(no wave64).-pv) on the hung process showed:dbgcore!MiniDumpWriteDump, waiting inRtlAllocateHeap's critical section;eh::unhandled_filter→ the title's filter →WaitForSingleObject.f076c50, the same diff before the rebase), a 480 s run that reaches the same crash ends without a hang:0xc00000058 ms after the crash line.Regression run
Main
f4ce27c:This PR
a8d712f:Not tested
MiniDumpWriteDumpunchanged).AI use
Claude Code (Claude Opus 5.5) found the hang with cdb, wrote the change and the test, ran the tests and runs above on my machine, and drafted this description.