xcl run: a title's minidump of itself is declined, not left to hang #742
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!742
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-742"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@abilliontokens on GitHub · 2026-11-24 04:24 UTC · original
abilliontokens:title-minidump-of-itself→main· +70 −0 · 2 files · 1 commits · draftA 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: The process exits with0xc00000058 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.
@crosettiremi on GitHub · 2026-11-24 04:35 UTC · original
Tested #742 at
a8d712fon a Radeon RX 7900 XT, Windows 11 build 26100, in a local integration build. The title reached its Series S account picker, accepted the scripted A press, displayed loading artwork and later hit the world-loading watchdog. The host exited on its own and preserved the original exception status.0xc0000005at title+0x23cf683 at 191.747 s. XCL logged the declined self-dump at 191.766 s and the process exit at 191.793 s, 46 ms after the exception. The launcher returned0xc0000005.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.
@Foniass on GitHub · 2026-11-24 07:43 UTC · original
Test report: #742 at
a8d712fon NVIDIA, native Windows – 0 hangs in 8 crashes;mainalone hung in 2 of 11Tested
a8d712fmerged ontomainbeaa245(local merge, no conflicts), againstmainbeaa245alone. Release builds for the title runs, debug for the tests.XCL_NETWORK=0 XCL_ACTIVITY=1, scripted input (XCL_PRESS_A_AT, A every 3 s from 20 s). Every run loads the story and ends in the title's watchdog abort at+0x23cf683, 97.6–104.6 s after start.process endslinemainbeaa245beaa245+ #742dbghelp: the title's minidump of its own process is not written (…)3–5 ms after the crash line. XCL'sprocess endsline and its thread dump follow as before, and the exit status is still0xc0000005.XCL_NETWORK=0refuses it (WinHttpConnect fails (no network)).cargo test --workspace -- --test-threads=4on the merged tree: 714 passed, 0 failed, 41 ignored. SKIPPED:gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware(no wave64).hle::dbghelp::tests::a_minidump_of_the_process_itself_is_declinedpasses.The hang on
main, from a minidump of one hung run (taken from another process, unwound with the modules'.pdata; ntdll, KERNELBASE and xcl.exe match the files on disk). It is the deadlock this PR describes, with a different lock holder:eh::unhandled_filter→ the title's filter →WaitForSingleObject(…, INFINITE)on the semaphore its dump thread releases;dbgcore!MiniDumpWriteDump→GetFileVersionInfoSizeExW→RtlReAllocateHeap, waiting for a heap's lock;bind::set_pipeline_state→pso_async::resolve_wait→real::build_compute→finish_pso→CreateComputePipelineState→nvgpucomp64→RtlAllocateHeap(35 KB).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
beaa245).dbgcore.dllitself, or whose filter blocks on something other than its own dump.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.
@Anon64 on GitHub · 2026-11-24 23:38 UTC · original
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,
XCL_NETWORK=0 XCL_PSO_PRELOAD=0.XCL_SLEEP_HOLD=0, so the title's watchdog fires again at its+0x23cf683write. On today'smain, #1288 holds the watchdog back during a pipeline wait, and the crash this PR is about no longer happens there by default.main689f2db, the hang:unhandled exceptionline with noprocess endsline.cdbattached to the hung host (the childxcl.exe, not thexcl runlauncher):xcl!xcl::eh::unhandled_filter+0x9ec, inside the title's filter, which waits inKERNELBASE!WaitForSingleObjectEx;process endscame about 0.6 s after the crash line.This PR's head
a8d712fmerged ontomain20cf130(clean merge):process endscame 14 ms after the crash line (102.778 s → 102.792 s).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.
@DavidM1911 on GitHub · 2026-11-25 11:28 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.