WARP also crashes with 0xc0000005 (read 0xffffffffffffffff) after untranslatable compute shaders #141
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Belobug--VIctory-Belobug-AMD#141
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@PostKeysNdDoOne on GitHub · 2026-11-25 16:29 UTC · original
Build: cargo build --profile diag -p victory --features diagnostics
Command: VICTORY_D3D12_WARP=1 VICTORY_D3D12_DEBUG=1 target\diag\victory.exe run game_scarlett_master.exe --execute --console series-x
Symptom: Repeated first-chance exception 0xc0000005 at 0x7ff422d637a1 (read 0xffffffffffffffff) inside d3d10warp.dll+0xdbcae, then host GPU device removed ... 0x887A0005 The GPU device instance has been suspended.
Preceding warnings: Five compute shaders fail translation with an address in an SGPR that is no root parameter is not supported:
3cea4534bbc15632 (0x30), f6e47efa50226beb (0x40), 3b90165a77d95cdf (0x30), 6f6a359d1166bb27 (0x30), 4b5aedc0e96b0770 (0x30).
Diagnosis: Dropped untranslatable compute shaders leave descriptor references unbound; the subsequent draw reads 0xffffffffffffffff. Happens identically on real AMD GPU and on WARP.
Real GPU (same build, without VICTORY_D3D12_WARP): host GPU device removed after 44 lists,
0x887A0006, page fault at 0xdb8045000, view heap 0x105190000+0x4600000 past its end
(slot 1704417920), sampler heap 0x109798000+0x800 past its end (slot 3404246272).
crashes.log
Hardware: Ryzen 7 7700X, Windows 11 build 26300.
@adrianmjim on GitHub · 2026-11-25 18:57 UTC · original
I followed what the host does when a compute shader does not translate (main at
a59f3e5). I could not find a path where the refusal itself leaves a bad pointer or half-bound state behind:create_computestill hands the title a pipeline object. Only the host pipeline is missing (pipeline::host_pipelinereturnsNone).State::dispatch(draw.rs) checks for the host pipeline first and returns ("a dispatch without a host pipeline dropped"). No root signature, pipeline, root views or heaps are set for that dispatch.State::execute_indirectreturns before the argument clamp, and the list only counts the miss.What the refusal does leave behind is title memory that the dropped pass would have written. Later passes read it as it is. So the five refusals can only matter indirectly, through data.
On the log lines:
"read 0xffffffffffffffff" is how Windows reports an access to a non-canonical address. The host's crash report prints it as "outside the address space". So WARP's code followed a wild pointer or a base plus a huge offset. It did not read a literal -1 from a table.
The "view heap ... past its end (slot N)" and "sampler heap ... past its end (slot N)" parts come from
near_heaps. It writes one for every heap, for any fault address. 0xdb8045000 is about 50.7 GiB past both heaps, and no descriptor index the translator emits can get that far:heap_index_at/fetched_indexinemit/lower.rs), so they stay below 2^28. That is at most 4 GiB past the sampler heap start.So this fault was not a descriptor fetch out of either heap, and the slot numbers in those lines do not point at a heap index. In #95 the same two "past its end" lines came with a fault "inside freed" staging at a similar address (0xd7c423000).
One unbounded path in compute shaders: root SRV reads get a bound (
RootType::LIMIT) only in draws and mesh shaders (thethreads.is_none() || mesh.is_some()condition inlower.rs), and root UAVs never get one. A compute shader that indexes a root view with a stale value can read or write up to 4 GiB past the host copy behind it. I have not shown that this happens in your runs. I can't run the title here, so everything above comes from reading the code.What would narrow it down:
VICTORY_D3D12_DRED=1, which for the software adapter lists the last commands each list noted. AddVICTORY_GPU_STEP=1so each noted command waits for the ones before it and the last one listed is the one at fault, andVICTORY_OP_TEXT=1for each command's root values and heap indices.VICTORY_SKIP_PIPELINES=<hash>(diagnostics builds) for the pipeline step 2 names.@PostKeysNdDoOne on GitHub · 2026-11-25 21:10 UTC · original
Skipped the five compute hashes (3cea4534bbc15632, f6e47efa50226beb, 3b90165a77d95cdf, 6f6a359d1166bb27, 4b5aedc0e96b0770) with VICTORY_SKIP_PIPELINES on the real GPU, same performance switches as the stable run.
Result: no crash, no crashes.log. Ran the world at 10,202 draws/frame, 2.6–3.2 fps (climbing as the scene settled), for the full session until I closed it manually. Without the skip, the same scene crashes with op 46 device removal within minutes.
Dropped count with the skip: 184–223/frame (down from 340–470 without it, since the five passes no longer produce refused pipelines). Indirect count 744–1070/frame — the mesh dispatches are still running.
This confirms the refused compute shaders are the trigger, indirectly — consistent with your "title memory the dropped pass would have written" explanation, and with the unbounded root SRV/UAV read in compute where RootType::LIMIT only covers draws and mesh shaders.
If useful, I can skip them one at a time to find which single hash is responsible.
@adrianmjim on GitHub · 2026-11-25 21:15 UTC · original
Thanks, that's a clean test. I can put names to the five. Matched by the same hash the runtime logs (blake3 of the container, first 16 digits), they are all compute kernels of the ray-tracing structure builder,
XboxBvhBuilder.dll, not programs ofshaders.rpf:3cea4534bbc15632InitHeadersf6e47efa50226bebLoadTriangles3b90165a77d95cdfResetCounterValues6f6a359d1166bb27CalculateMortonCodes4b5aedc0e96b0770BitonicPreSortCSThey are refused because
VICTORY_RAYSis off.translate_foronly unspills their user-data table and retries with raw addresses when it is on. With the runtime's owntranslate_forandVICTORY_RAYSunset, all 52 of that DLL's compute kernels fail offline with exactlyan address in an SGPR that is no root parameter. With it set, all 52 translate.What I can't explain yet is why skipping them changes anything. On
main(000ffdd;a59f3e5is the same here), a dispatch whose pipeline is skipped and one whose shader did not translate take the same exit inState::dispatch(draw.rs). Both count the drop and return before anything is recorded: no root signature, no pipeline, no root views.execute_indirectis the same, and both return before the argument clamp. So with these five kernels, the skip should not change what runs on the GPU, and it should not lower the dropped count either, since a skipped dispatch is still counted as dropped.That makes me want to rule out two other explanations before bisecting:
If the difference holds up over several runs, then bisecting one hash at a time would be worth it. In a diagnostics build, the
dropped X/frame without a host pipeline: <why>lines under the frame line would also show, per run, whether those five appear ascompute <hash>or asskipped shader <hash>, and what else is dropped.@PostKeysNdDoOne on GitHub · 2026-11-25 22:35 UTC · original
Thanks for naming them — that's the XboxBvhBuilder.dll kernels, so the refusal is the VICTORY_RAYS policy, not a translator limit. Good to know.
You're right that the skip and refusal should take the same path, and I can't explain the dropped-count difference either. I'll do 2–3 runs each way with the same save and switches and report back. ( Most likely tomorrow Morning). I'll also check whether the dropped X/frame without a host pipeline: lines show those five as skipped shader or compute , and note whether the scene or cache state differed between the two runs I already have.
One thing I can say now: the two runs were the same build (fix-dstorage-guard-race), but I didn't record the save position or cache state for the first one. I'll make sure to control for that in the repeat runs.
@PostKeysNdDoOne on GitHub · 2026-11-25 22:41 UTC · original
The build I tested is 003beef2b915341eba88974de021e3118250cb6c ("Merge memory-gap"), not
a59f3e5. At this commit, draw.rs does not take the same path for skipped vs. refused:Skipped (line 1748–1751): is_skipped → DROPPED++ → note_drop → return. No once! log.
Refused (line 1764–1768): falls through the is_skipped check, hits host_pipeline → None, logs "a dispatch without a host pipeline dropped", DROPPED++, returns.
And in the indirect path (line 2365–2370), the comment says "Skip before the argument clamp can mutate the indirect buffer" — the skip returns false before the clamp. The refused path doesn't have that early return; it falls through to is_builder and the clamp runs, mutating the indirect buffer.
So at this commit, skipped and refused do not take the same exit. That's consistent with the skip changing behavior — and it means the drop-count comparison isn't apples-to-apples unless both paths are traced at 003beef, not
a59f3e5.@adrianmjim on GitHub · 2026-11-25 22:43 UTC · original
Thanks for the commit. I read
crates/victory-gpu/src/draw.rsat003beef, and there too the refused path leaves before the clamp, for these five kernels as for any refused pipeline:execute_indirect(from line 2357):is_builder(..) && !builder_runs()returnsfalseat 2371;host_pipeline(..)→Nonereturnsfalseat 2382.The clamp only comes after that, after
matches_kindandshadow::find_any(the window/bounded code from about 2443). A dispatch whose pipeline has no host pipeline never reaches it.dispatch(from line 1744): skip at 1748, then the builder check at 1754, thenhost_pipeline→Noneat 1763. All three return before anything is recorded. Only the diagnostics differ: the last two also log the dispatch's roots (list_dropped_roots, text only).At this commit the five are builder stages for
of_builder(pipeline.rs:260, compute programs with a spilled user-data table). So unlessVICTORY_BVH_BUILDER=1and every builder pipeline has a host pipeline (builder_runs, pipeline.rs:307), their dispatches leave at the builder check whether or not you skip them. WithVICTORY_BVH_BUILDER=1and one stage missing,builder_runsturns the builder off for the run (builder_off), which also drops them all.So I still don't see a path at
003beefwhere skipping these five changes what the GPU runs. That makes the repeat runs the deciding test. If the difference holds, thedropped X/frame ... : <why>lines would show which reason the five get in each run,skipped shader <hash>ora stage of the ray-tracing structure builder, which is off, and what else differs between the runs. Which value ofVICTORY_BVH_BUILDERthe runs had would help too.@PostKeysNdDoOne on GitHub · 2026-11-25 23:51 UTC · original
<html>@adrianmjim on GitHub · 2026-11-25 23:52 UTC · original
Thanks, that settles it: the skip only changes which check drops the five, and the original "skip clean / no-skip crash" was run-to-run variance. The dropped counts say the same: 173–425 against 1,335–1,750 a frame between your two no-skip runs, with the same switches. So the device removal (op 46) itself is still open, but intermittent and not tied to these kernels. No need for a bigger sample of this comparison.
If it happens again, the full device-removed line from
crashes.logwould be the most useful thing. Before the heap parts it can containinside [...]orinside freed [...]and "the nearest title memory copy below it". With thedropped X/frame ... : <why>lines from the minute before it, that would say which allocation the fault hit and what was running.@PostKeysNdDoOne on GitHub · 2026-11-26 10:13 UTC · original
I'll keep the logs next time it crashes and send the full device-removed line plus the dropped reasons from the minute before.