windows-boot: collect private crash dumps and stack traces on request #1693
No reviewers
No assignees
Labels
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
No project
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
No due date set.
Reference
leonida/mandy!1693
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/windows-boot-private-minidump"
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?
Pull request successfully merged and closed
Claimed in the coordination issue as WIN-BOOT-PRIVATE-MINIDUMP.
What and why
A Windows boot can exit with a numeric status before the runtime writes a diagnostic. With
boot.ps1 -CrashDump, a small native helper observes the child from a separate process. It passes first-chance exceptions through and records the faulting thread on an unhandled exception. An explicit nonzero exit gets an exit-time snapshot even when the exit code happens to match a Windows exception code. This also covers a case that the in-process exception handler in #994 cannot observe.The helper writes a minidump and a best-effort stack to a fresh directory under the user's external run folder. It uses local symbols. The stack at explicit exit can already be in shutdown, and unwinding can stop in manually mapped code. Each child keeps its original exit code. The harness's own timeout produces no dump. The dump and stack are private and must stay on the machine.
Tested
GPUs tested: n/a (CPU-only synthetic tests).
AI-assisted: yes
Checklist
Verified on Windows 11 (
10.0.26200.9974) with MSVC19.44.35228(x64,/std:c++20 /EHsc /W4 /permissive- /utf-8 /O2),dbghelp.lib, andpowershell.exe5.1againstmaind48a957bb+1b9e4969a5(claim#2570#issuecomment-7239583640):runtime/CMakeLists.txt,runtime/test/windows_crash_fixture.cpp,scripts/windows-boot/README.md,scripts/windows-boot/boot.ps1,scripts/windows-boot/crash_monitor.cpp,scripts/windows-boot/test_crash_monitor.py); attaches an out-of-process debug loop withDEBUG_ONLY_THIS_PROCESS, writescrash.dmp.partial-> atomicMoveFileExWcrash.dmp+StackWalk64stack.txtwithSYMOPT_IGNORE_NT_SYMPATH | SYMOPT_IGNORE_CVREC | SYMOPT_DISABLE_SYMSRV_AUTODETECT, enforcesfs::equivalentrepo-outside output isolation, and handles timeouts cleanly.check_no_game_data.pyandtest_docs_encoding.pyclean.d48a957bb):crash_monitor.cpp/test_crash_monitor.pyandboot.ps1 -CrashDumpare absent (C1083).d48a957bb+1b9e4969a5merge): Auto-merges cleanly (rc=0), compilesgta6rt_crash_monitor.exeandwindows_crash_fixture.exe(with.pdb) with0warnings under/W4 /permissive-, and passes all 10 integration tests inscripts/windows-boot/test_crash_monitor.py(Ran 10 tests in 7.536s OK, includingcrash_workersymbol resolution andboot.ps1 -CrashDumpexit/timeout subtests).target_compile_options(gta6rt_crash_monitor PRIVATE /W4 /permissive- /utf-8)(andWIN32_LEAN_AND_MEAN/NOMINMAX, already#defined incrash_monitor.cpp) inruntime/CMakeLists.txtwould keep the target aligned withgta6rt's warning level.AI-assisted.
Verified by OreoFR
48bae6cad+ PR head1b9e4969a(tested as a merge)ctest -R ^windows_crash_monitor$(buildsgta6rt_crash_monitorandwindows_crash_fixture)windows_crash_monitorpassesgta6rt.exebuilds and links;dumpbin /dependentsshows the same DLLs as main, no network DLL)5825b02ff)AI-assisted (Claude Code, Claude Opus 5.5).
Merging, thank you @sodove! OreoFR's agent verified this head merged with current main: the test fails on main and passes with the PR (https://github.com/ProjectLeonida/mandy/pull/1693#issuecomment-7248701336), and it still merges cleanly.
AI-assisted (Claude Code, Claude Opus 5.5), on behalf of DadaCap.