Repository navigation
Crash reports: name the host's CPU and Windows build - #213
Conversation
Whether a crash is a missing instruction depends on the CPU (Intel CPUs lack some of the console's AMD-only instructions), and which D3D12 runtime there is depends on the Windows build, yet a report carries neither, so every report has needed a follow-up question. Unhandled exceptions, panics and host GPU failures now end with a "host:" line naming the CPU's brand string and the real Windows version (RtlGetVersion), read once when the crash log is set up.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks @Dufftwt for making the host line in crash reports identify the CPU and Windows build. I tested commit The targeted test passed (1 passed, 0 failed; 18 filtered). This validates the formatted host-information line. It does not generate or inspect a full crash report from an actual exception. |
mercuryVM
left a comment
There was a problem hiding this comment.
Tested 7f00a62 on Windows 11, RTX 5070, MSVC: the workspace passes (196 outside victory-shader).
- Safety screen: the
Cargo.tomlchange only adds twowindows-sysfeatures (Wdk_System_SystemServices,Win32_System_SystemInformation) to the existing dependency, with no new crate. RtlGetVersionis the right call, sinceGetVersionExis manifest-shimmed. The CPUID brand string reads leaves 0x80000002–4 after checking the max extended leaf.- Computing both at
log_crashes_totime, so the crash path only formats a stored string, is the right choice for a crash handler. - Worth knowing: the CPU model and Windows build end up in
crashes.log, which users paste into public issues. Both are low-sensitivity and exactly what reports need, but the README's crash-log section could mention it.
No issues found.
AI-assisted (Claude Code).
…d Windows build Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merges Marvisak#188 Marvisak#213 Marvisak#214 Marvisak#219 Marvisak#221 Marvisak#311 Marvisak#324 Marvisak#363 Marvisak#406 Marvisak#454 Marvisak#529 Marvisak#560 Marvisak#708 Marvisak#937 Marvisak#941 Marvisak#963 Marvisak#1111 Marvisak#1159 Marvisak#1304 Marvisak#1306 onto main (ffe310e), each head unchanged, no conflicts. One change of mine: the long-format import descriptor code Marvisak#963 adds nests `if size == 0` in an `if let`, which clippy::collapsible_if rejects under -D warnings; it is now one `if let ... && size == 0` (clippy --fix, no change of behaviour). cargo clippy --workspace --all-targets --locked -- -D warnings, with and without --all-features, is clean and cargo test --workspace --locked passes (388 passed, 7 ignored; main has 342 passed, 6 ignored). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Automated triage for the maintainers. Merge candidate. This adds a CI: no check runs on the head commit. Generated by Claude Code |
…hild of a node is a miss
…grams and ray-tracing builder (Marvisak#854, Marvisak#993, Marvisak#994), with Marvisak#911, Marvisak#213 and Marvisak#464
… box The node test took a child whose pointer is "none" (0xffffffff) for a hit whenever the ray entered its box, in the reference (bvh.rs) and in the emitted DXIL. Its result dword was "none" either way, but sorted it came with a finite distance and could stand before a child that is there; a walk that stops at the first "none" then leaves that child out. Both now test the pointer too (one compare and one and per child). What the console returns for such a child is not documented; the title cannot rely on a "none" standing first, so this agrees with it wherever it can matter. The card tests compare the emitted code with the reference as before. Port of fxceless/victory-fork Marvisak#213 (Pablo-Barros; reproducer Bennet0k, Marvisak#173). Not taken: Marvisak#464 (boxes with min > max as misses), which assumes what the hardware does with such boxes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
What's wrong
Two facts about the host decide whether many crashes are bugs at all, and a crash report contains neither:
clwbbefore Ice Lake,clzero,monitorx, SSE4a…). The loader emulates the ones it knows. Whether an0xc000001dis a known case, an unknown instruction or something else depends entirely on the CPU.Neither is in the console output or in
crashes.log. So every report needs a follow-up question, or reporters type their specs by hand, and some guess wrong (#103 guessed at the instruction without knowing it depended on the CPU generation).What the fix does
In
crash.rs:log_crashes_to, at title start), the loader reads two values once:cpuidleaves0x80000002–0x80000004;RtlGetVersion.GetVersionExwould return whatever the executable's manifest declares instead.log_crash) now end with one more line,host: <CPU>, Windows <major.minor.build>. It comes just before the title's last debug output, which those reports already end with.At crash time nothing is queried: the line was formatted at startup. First-chance reports don't change.
victory-loadergets two morewindows-sysfeatures forRtlGetVersionand its structure:Wdk_System_SystemServicesandWin32_System_SystemInformation. It already usesWdk_System_Threading.How it behaves after the fix
The same line goes to
crashes.log, so a pasted report or log file says by itself what machine it came from.Tests
The new test
the_host_line_names_the_cpu_and_windowschecks that the line has the formhost: <non-empty CPU name>, Windows <a>.<b>.<c>with a major version of 10 or more.I ran
cargo test --workspaceon GitHub'swindows-latestwith Rust 1.98.1 fromrust-toolchain.toml:victory-loaderhas 19 passed, the other crates have 0 failed. On that runner the new test's line ishost: AMD EPYC 9V74 80-Core Processor, Windows 10.0.26100.mainthe report ends with the stack:--test-threads=1. With 4 threads, the shader crate's GPU tests sometimes crash on that runner (STATUS_ACCESS_VIOLATION), on unmodifiedmainas well.Not tested: a crash in the title.
Related: #7, #84, #102, #103, #106. It touches different lines of
crash.rsthan #198 and #204 and merges cleanly with both.