GPU: the DRED report reads only the breadcrumb history that is there #3268
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!3268
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3268"
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?
@davesousa on GitHub · 2026-11-26 15:10 UTC · original
davesousa:dred-history→main· +113 −10 · 1 files · 1 commits · openWith
VICTORY_D3D12_DRED,Host::removal_datamakes a slice ofBreadcrumbCountops over each unfinished node'spCommandHistoryand walks all of it. On an RTX 3070 Ti (driver 621.40, Windows 11 26200) one removal's report crashed VIctory instead:0xc0000005reading op 15,360 of a node's history, exactly 60 KiB in, where the memory was reserved but not committed. So that removal's report was lost. It was 1 of 3 DRED removals I have, in aVICTORY_GPU_TIMING=1run (#2703 + #2841 on my NVIDIA stack). The other reports on this card read histories of 17,030 to 19,268 ops without trouble, so the history is not capped at 15,360; in that one, the runtime's count ran past the history it had committed.This PR:
read, as the title-memory copies do), page by page, up to the first page that cannot be read;but only its first N commands can be readwhen the history is cut short;Test:
host::breadcrumbs::a_history_shorter_than_its_count_is_read_as_far_as_it_is_theremakes a two-page reservation with only the first page committed, and a count of two pages. With the old read (from_raw_partsover the count) put back, the test process dies with0xc0000005 STATUS_ACCESS_VIOLATION; with this PR it passes.Checks on the RTX 3070 Ti: both clippy commands and
cargo xtask policypass.cargo test --workspace --locked --no-fail-fastgives the same results asmainon this card (twovictory-gpuview-heap-cap failures,dynamic_slots_are_held_until_releasedandlists_share_a_table_and_copies_keep_their_views, and thevictory-shadercrash of #2571), plus the new test passing.Not tested: a real removal with a cut-short history. That needs a GPU fault, and
ID3D12Device5::RemoveDevicewaits until the GPU is idle, so afterwards DRED lists no unfinished nodes (checked on this card). So there is no forced-removal test here.Claimed on #1633. AI-assisted (Claude Code).
🤖 Generated with Claude Code
@Dukestar69 on GitHub · 2026-11-26 15:28 UTC · original · approved these changes
Reviewed the diff and verified locally on Windows 11 x64:
ReadProcessMemory(readable_history) and bounds-checkingdone < history.len()instopped_at/in_flightcleanly prevents access violations whenBreadcrumbCountruns past committed pages.cargo test -p victory-gpu --lib host::breadcrumbs:: -- --test-threads=1: 1 passed, 0 failed (a_history_shorter_than_its_count_is_read_as_far_as_it_is_there).cargo clippy -p victory-gpu --all-targets -- -D warnings: clean.cargo clippy -p victory-gpu --features diagnostics --all-targets -- -D warnings: clean.cargo xtask policy: 191 files ok.Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
@oni-swr on GitHub · 2026-11-26 16:10 UTC · original
WARP verification report (test report only, no code changes)
7cbb83ec63bcca43(control); WARP software adapter forced withVICTORY_WARP=1 VICTORY_D3D12_WARP=1,--features diagnostics, d3d10warp.dll 10.0.26100.9818; dxil.dll 1.8.2502.11 (Windows Kit 10.0.26100.0, viaVICTORY_DXIL).--exact),-j 4, synthetic tests only, no game data. Command:cargo test -p victory-gpu --lib --features diagnostics -j 4 -- --exact <test>.host::breadcrumbs::a_history_shorter_than_its_count_is_read_as_far_as_it_is_there: passes on the PR (1 passed).readable_historyandstopped_atfrom this PR, so I added the test to main with two shims that keep main's behaviour (read the runtime's whole count unchecked, index the history atdone). The test crashes on main withSTATUS_ACCESS_VIOLATION(0xc0000005) reading the uncommitted page, i.e. the fault the PR describes. That is a main-plus-shim control, not unmodified main.victory-gpulib suite: PR 247 passed, 0 failed, 1 ignored; main 246 passed, 0 failed, 1 ignored. No failures on either.AI-assisted: verification by Claude Code (Claude Sonnet 5.5)
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.