xcl run: a title's minidump of itself is declined, not left to hang #737
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/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?
Imported from ivall/xcl. Originally posted by abilliontokens on 2026-11-24T04:24:55Z.
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: 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.
Imported from ivall/xcl. Originally posted by crosettiremi on 2026-11-24T04:35:01Z.
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.
Imported from ivall/xcl. Originally posted by Foniass on 2026-11-24T07:43:17Z.
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.
upstream-sync referenced this pull request2026-11-24 19:06:45 +00:00
upstream-sync referenced this pull request2026-11-24 22:05:13 +00:00
Imported from ivall/xcl. Originally posted by Anon64 on 2026-11-24T23:38:56Z.
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.
upstream-sync referenced this pull request2026-11-25 02:07:14 +00:00
upstream-sync referenced this pull request2026-11-25 06:04:27 +00:00
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T11:28:53Z.
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!
upstream-sync referenced this pull request2026-11-25 15:05:51 +00:00
Imported from ivall/xcl. Originally posted by SergeAx on 2026-11-26T16:00:29Z.
Test report on NVIDIA / Windows 10, a second way into the title's crash handler: 0 hangs in 9 runs with this PR. Without it, 1 of 3 crashes that reached the title's minidump hung. Tested commit: this PR's head
a8d712f, merged ontomainb49be18+ #1435 (14c8a2d; without it the title crashes at 98 s, #662). Merge2775a63, no conflicts.Setup:
XCL_NETWORK=0 XCL_DRED=1 XCL_RUN_SECONDS=300,XCL_PRESS_A_AT=20,24,…,140.How the crash handler is reached here: the world-load device removal of #1452. A title call then fails with
0x887a0005, the title stops on its ownint3(0x80000003at+0x2474606), and its crash filter writes a minidump of the process. In one run, the handler was reached by an access violation inntdllwhile the process was ending.With this PR (9 runs):
int3, one access violation inntdllduring the exit. Both timesdbghelp: the title's minidump of its own process is not writtenwas logged, and the process ended within 0.1 s.Without it (
mainb49be18+ #1435, the 6 runs with a device removal in this #1452 comment; played by hand, some with DRED or the debug layer):int3. Two ended within 2 s..dmpin the title'stempfolder. Its stacks fit the description above:unhandled_filter, then the title's filter, inWaitForSingleObject.dbgcore!MiniDumpProvideDump→FindResourceExA→RtlReAllocateHeap, inRtlEnterCriticalSection.RtlpFreeHeap/RtlpReAllocateHeap, and anxcl-psoworker and anxcl-dstoragethread insideRtlpAllocateHeap.Unit test:
cargo test -p xcl --lib hle::dbghelpon the merge (debug): 1 passed, 0 failed (a_minidump_of_the_process_itself_is_declined).Not tested:
AI use: Claude Code (Claude Opus 5.5) ran the runs (unattended, scripted presses) and the test, read the logs and the hung process's stacks, and wrote this report.
Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-12-01T02:34:55Z.
Nothing has happened on this PR for 3 days, so it is marked
staleand will be closed in 4 days. A push or a comment takes the mark off: rebase it ontomainif it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T04:03:06Z.
Triage (#1607) – head
a8d712fNo open or merged PR hooks dbghelp or
MiniDumpWriteDump. #1811 loads dbghelp inside XCL to name XCL's own frames, which is unrelated.hle/dbghelp.rsdeclines only a dump of the current process (by pid or handle). Every other dbghelp export goes to the system DLL through the module's fallback, and the test checks both paths.No problems found in the diff.
Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.