victory doctor: a run's failures, each linked to the issues that report it #2678
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!2678
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2678"
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?
@shawshanker18 on GitHub · 2026-11-25 17:59 UTC · original
shawshanker18:doctor-command→main· +798 −0 · 2 files · 5 commits · openWhat
A
doctorcommand: point it at a run's log and it lists what went wrong, each failure with a link that searches this repository's issues and pull requests for it.victory doctor run.log --draft 1writes an issue for a failure nobody has reported yet. It contains an allowlist only: kind, title (our message text, or a crash's code and module-relative offsets), count, an environment checklist, and the search that came back empty. No log lines, shader hashes or memory values (rule 7 of #1633).victory doctor run.log --jsonprints the same for scripts and agents that triage run reports: number, kind, a stable key, title, count, search terms and URL. The key is the same across runs and builds, so reports can be grouped by it.Why
About 190 of the open issues are run reports, many of them the same few failures. The
+0x23cf683trap, the 1,000,000-slot view heap on NVIDIA, refused wave64 compute and B5G5R5A1 UAVs each have 7 to 18 reports. People paste whole logs because they cannot tell whether what they hit is known. One command that names each failure the way earlier reports did, and links to them, should mean fewer duplicates and more "+1 with my setup" on the issue that already exists.How it reads a run
WARNandERRORlines, grouped by message. The words before the firstkey=valuename the group, andslot,format,stage,dimension,kindanddlltell groups apart. Shader hashes named byhash=or[compute …]are collected per group. Messages expected in every run are left out (currently the loop-limit notice).crashes.log: only the entries written between the log's first timestamp and a minute after its last, from every title folder under the configured data folder (or--crashes <file>).image+<offset>, the form the issues use, which is the same whatever the image's file name.0x887A000x) get their own entries.Checks
crashes.logentries are read, including date arithmetic;cargo test -p victory --bin victory: 16 passed.cargo clippy -p victory --all-targets -- -D warningsandcargo fmt --check: clean.cargo xtask policy: ok.main). The crash at+0x23cf683and the capped view heap come out as above, and a crash from a later run in the samecrashes.logis not attributed to the earlier log.No new dependencies, no game data.
A standalone version for anyone not building from source is at shawshanker18/victory-doctor. It adds live GitHub lookups with NEW / KNOWN / PR / MERGED status, a local web page with filled-in issue forms, and an opt-in shared dataset of run results by GPU and settings.
@cloph-dsp on GitHub · 2026-11-25 18:05 UTC · original
Independent Windows verification of PR #2678 (head
83c52e8), no game data and no source edits. Toolchain: rustc/cargo 1.100.0, Windows MSVC.cargo test --locked -p victory --bin victory -- counted_by_kind_and_ordered_by_severity --test-threads=1->doctor::tests::a_run_s_failures_are_counted_by_kind_and_ordered_by_severitypassed.cargo test --locked -p victory --bin victory -- only_the_run_s_own_crash_entries_are_read --test-threads=1->doctor::tests::only_the_run_s_own_crash_entries_are_readpassed.cargo test --locked -p victory --bin victory -- links_and_drafts_name_no_user --test-threads=1->doctor::tests::links_and_drafts_name_no_userpassed.origin/main13f91ca: each of the three filters reports 0 tests (the tests are new).cargo test --locked -p victory --bin victory -- --test-threads=1-> 13 passed, 0 failed.Only warnings are the pre-existing
fetch_updatedeprecations invictory-gpu/victory-hle, also present on base. The synthetic tests exercise log-line parsing and formatting; no network request or user-name-taking path was needed. No competing PR. AI-assisted (Hy4 flash).@shawshanker18 on GitHub · 2026-11-25 18:18 UTC · original
@DrDarkDK thanks, agreed. Fixed in the latest push:
write at address 0/write, never the address itself);--htmlfills in uses the same draft.--json, and folded sections of the--htmlpage, labelled as not for posting.drafts_carry_no_log_lines_hashes_or_memory_valuesuses a synthetic log with apeekline (victory_gpu::capture: peek frame 0x...: <words>) next to a refused pipeline with a shader hash, plus a crash with a non-null address. It checks that none of the hash, the peeked words, the peek address or the crash address reaches a draft or a filled-in form.cargo test -p victory --bin victory: 16 passed. Clippy-D warningsand fmt clean;cargo xtask policyok.@cloph-dsp thanks for the independent run.
@shawshanker18 on GitHub · 2026-11-25 18:47 UTC · original
@DrDarkDK good catch, thanks. Fixed in the latest push: the form's
title=now comes frompublic_title(f), the same allowlisted title as the draft. The cut note is now based on the body's own length.drafts_carry_no_log_lines_hashes_or_memory_valuesnow:Crash: access violation at image+0x23cf683 (write);16 passed; clippy
-D warnings, fmt andxtask policyclean.@kotekompotek on GitHub · 2026-11-25 18:48 UTC · original
Thoroughly built - this directly attacks the duplicate-run-report problem:
One nit: a WARN/ERROR whose phrase is under 3 words gets no search link (terms empty, shader fallback only). Rare, and better than a noisy link.
The fixture tests cover the exact real-world cases (heap cap, refused pipelines, int3/AV crashes, commit limit). CI green.
@fuzeofficlal on GitHub · 2026-11-25 19:05 UTC · original
Independent Windows 11 verification and code review of
1fa5af2d(on13f91ca):Verification (
rustc 1.98.1MSVC)cargo clippy --locked -p victory --all-targets -- -D warningsand--all-features: 0 warnings.cargo test --locked -p victory: 16 passed (unit, all 6doctor::testspass), 2 passed (tests/census.rs).cargo xtask policy: 185 files ok.Review Notes (2 parsing edge cases found)
public_title, whitelist issue drafts, case-insensitive user-path stripping, HTML/JSON escaping) and synthetic test inputs look clean and policy-compliant.0x887a000match (apps/victory/src/doctor.rs:275-278):"0x887a000"is 9 bytes, solower[at..at + 10]will panic if aWARN/ERRORline mentioningdevice/removed/hungends right after"0x887a000"(truncated crash log) or has a multi-byte UTF-8 character at byteat + 9. Usinglower.get(at..at + 10)(or parsing viahex_at(&lower[at..])with a length check) prevents the panic.apps/victory/src/doctor.rs:548-558):fs::read_to_stringfails (or silently skipscrashes.log) if a crash truncates the log mid-UTF-8 sequence or a title emits non-UTF-8 bytes; reading raw bytes viafs::read+String::from_utf8_lossymakes crash-log inspection resilient to that.@shawshanker18 on GitHub · 2026-11-25 19:22 UTC · original
@fuzeofficlal thanks, both fixed in the latest push. The device code is now taken with
get(at..at + 10)and must end in a hex digit, so a line cut after0x887a000, or a wide character there, is skipped rather than panicking. The log and crashes.log are read as bytes and decoded lossily. New testcut_device_codes_and_invalid_bytes_do_not_paniccovers both. 17 passed; clippy, fmt and policy clean.@fuzeofficlal on GitHub · 2026-11-25 19:55 UTC · original
Re-verified
affbb9d3on Windows 11 (rustc 1.98.1MSVC,13f91ca):cargo xtask policy: 185 files ok.cargo clippy --locked -p victory --all-targets -- -D warnings: 0 warnings.cargo test --locked -p victory: 17 passed (unit, includingcut_device_codes_and_invalid_bytes_do_not_panic), 2 passed (tests/census.rs).Both the truncated/non-ASCII
0x887a000slice (lower.get(at..at + 10)+ hex check) and lossy UTF-8 reading forrun.logandcrashes.logare cleanly fixed. Looks ready to merge!@Marvisak on GitHub · 2026-11-25 23:24 UTC · original · edited 2026-11-26 08:28 UTC
Automated triage for the maintainers.
Still needs the maintainer's decision on scope.
apps/victory/src/doctor.rsis the terminal list with search links,--draft(allowlist: kind, public title, count) and--json. The HTML page and form filling are gone. I found no network access, process spawning or new dependencies. The only URL is GitHub's issue search, built locally for the user to open. Whether VIctory wants issue-triage tooling in the main binary, keyed to the wording of ourtracingmessages and this repository's issue tracker, is the maintainer's call, not a correctness question. It merges cleanly and CIcheckpasses on8cc965b.On your latest reply: the scope question is flagged for the maintainer, and triage can't answer it. For the record, DrDarkDK's approval and the Windows re-runs were on earlier heads (
1fa5af2,affbb9d), before the trim. Only CI has run on8cc965b.Generated by Claude Code
@shawshanker18 on GitHub · 2026-11-25 23:34 UTC · original
Trimmed to the smaller first version suggested in triage. What stays: the terminal list with search links,
--draft(allowlist only) and--json. What's gone:--html, the filled-in issue forms and their tests, about 200 lines. The fuller version lives outside the tree.On keys following the log wording: that's deliberate. A failure is found by the same words people paste into issues, so a reworded message gives a new key, and its search link finds new reports with the new wording. The URL formats are GitHub's documented
/search?type=issues&q=and nothing else.16 passed; clippy
-D warnings, fmt and policy clean.@shawshanker18 on GitHub · 2026-11-26 07:25 UTC · original
This is trimmed to the smaller first version from the triage note: the terminal list with search links,
--draft(allowlist only) and--json, in one file plus a few lines inmain.rs. No new dependencies, and CI is green on8cc965bc. DrDarkDK approved it, and cloph-dsp and fuzeofficlal re-ran the tests and clippy on Windows.@Marvisak, when you have a moment, is this scope acceptable to merge? If you'd rather have something smaller, or a different flag name, I'll change it.
Anyone who has a run log handy:
victory doctor <log>and a reply saying whether the failures it lists match the issues you know of would help this land.@DrDarkDK on GitHub · 2026-11-25 18:08 UTC · original · requested changes
--draftcan include title-derived data while saying “No game data.” It prints shader hashes and surrounding log lines after path redaction. Those lines can include raw title-memory values fromVICTORY_PEEK. The coordination rules also ask contributors to keep title shader hashes out of comments. Coordination rulesCould the paste-ready draft use an allowlist of fields such as failure kind, HRESULT, module-relative offset, and count? Raw excerpts and hashes can stay in local output. A synthetic log with a shader hash and an adjacent peek line would verify that neither reaches the draft.
Static review only.
AI-assisted with Codex.
@DrDarkDK on GitHub · 2026-11-25 18:20 UTC · original · requested changes
Thanks for removing the excerpts and hashes from
--draft. The HTML report now uses the sanitized draft for the issue body, butto_htmlstill builds the GitHub form’stitle=withencode(&f.title). For the non-null write crash in the new test, that sends the raw fault address to GitHub as soon as the link is opened.Could the form use
public_title(f)too? The existing test can check that the decodedtitlequery parameter contains(write)and omits the fault address.Static review only.
AI-assisted with Codex.
@DrDarkDK on GitHub · 2026-11-25 18:53 UTC · original · approved these changes
Thanks for the update. I checked
1fa5af2: the HTML issue form now usespublic_title(f), and the regression decodes the form title to verify that it keeps(write)and omits the fault address. That resolves my remaining concern with the paste-ready output.AI-assisted with Codex.
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.