World: GPU hangs / TDR on RTX 4070 — garbage indirect-dispatch arguments and null descriptors (DRED + GPU timing measurements) #898
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#898
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?
@nicogunvis-boop on GitHub · 2026-11-24 13:46 UTC · original
Setup
ffe310e(main, 2026-11-24), diagnostics build (--profile diag --features diagnostics)Symptom
host GPU device removed ... (0x887A0006). WithVICTORY_D3D12_DEBUG=1the debug layer reportsDXGI_ERROR_DEVICE_HUNG ... TDR. Before the removal, single host lists take 2.3–5.3 s (slow host list ms=2304 / 2872 / 3381 / 5331), above the 2 s Windows TDR.Measurements
All runs with
VICTORY_D3D12_DEBUG=1 VICTORY_D3D12_DRED=1 VICTORY_GPU_TIMING=1.1. Indirect dispatches whose argument block is never written
slow list commandtotals per pipeline for one run (default settings):indirect kind 2 max 1 at 0xdc799b440 [compute 8bbcbda6008eaa37]indirect kind 2 max 1 at 0xdc799b660 [compute 87df99711607dd60]indirect kind 2 max 1 at 0xdc799b640 [compute 776d835da5ffa646]indirect kind 2 max 1 at 0xdc799b600 [compute 84eafa50504bc9ef]indirect kind 2 max 1 at 0xdc799b400 [compute c7feccae4e01e454]Each of these single-record dispatches takes 100–270 ms. All read their arguments from the same small block (
0xdc799b400..0xdc799b660), and their outputsu4/u5are mostly null descriptors ([heap 330472: null],[heap 330576: null]). Also in the family:8a7b68076089f7a8,915ed81ea580a276,bc6ca78d5425c179.Skipping two of them only moved the time onto the others in the same block. Skipping all eight (
VICTORY_SKIP_PIPELINES) removed every slow list above ~50 ms.Lowering the clamp in
indirect.rsdid not help:GROUPS1<<20 → 1<<14 andBUDGET1<<27 → 1<<25 still left8bbcbda6008eaa37at ~100 ms per dispatch (3,986 ms over 40). The cost is per thread, not in the group count. That points to the shader running against null descriptors / uninitialised data rather than to an oversized dispatch.2. Mesh draws with null descriptors (slow, then a real hang)
mesh 1/mesh 3draws took 100–300 ms each, about 2.2 s per list (for examplemesh 04b9be3756e8f41c / pixel 1af4a50c7fb40c97,mesh a26422c01dcf5612 / pixel 6a3a8d3fe52b4eab,mesh c5ffa556ab926155 / pixel c4a269f4eeba3cac).VICTORY_SHADER_LOOP_LIMIT=4096brought this down to ~0.26 s total, so these are loops that run to the limit.a list stopped at command 287 of 404 (op 42), which is a DispatchMesh with no marker. The list heldmesh c962201cddbdd7dd / pixel e5e9af2bbd2c006awithu8/u9null.c962201cddbdd7dd, the next run hung earlier (1 min 40) the same way:a list stopped at command 346 of 375 (op 42). That list heldmesh 51ff151f75cd5759 / pixel 7fe75645c406cac6, also withu8 = [heap 327680: null].DispatchMesh commands carry no marker (
command 287 (op 42): no marker), so the hanging draw itself cannot be named from DRED today. A marker per mesh dispatch would let users narrow it down.3. Other observations
ResourceBarrier: Before state (UNORDERED_ACCESS) ... does not match with the current resource state (VERTEX_AND_CONSTANT_BUFFER) (assumed at first use)ontitle buffer 0x16870000+0xae00000.--console series-s: the title stays on a black screen at 11 draws/frame and never progresses.Summary / suggestions
0xdc799b4xxindirect-argument block is never filled with valid data in the world, so the whole compute family runs on garbage arguments against null outputs. Its producer is probably among the compute shaders that "do not translate" or whose host pipeline is refused.[heap N: null]slots) can loop until the loop limit or hang the GPU. Skipping a draw whose bound descriptors are null, or binding a safe zero resource instead, may avoid the TDRs.Best combination found so far (about 3 min in the world, no slow lists):
Full logs are available on request. They are kept local because they contain title addresses.
@MichaelSmithAI on GitHub · 2026-11-24 13:51 UTC · original
On
ffe310ethe direct mesh path already records a marker immediately before DispatchMesh. A command explicitly printed withno markermeans the formatter could not associate it with a preceding marker. Knowing which other pipelines appeared on that list is insufficient to name the shader at command 287 or 346.There is also a separate truncation case. When more than twelve commands fall between barriers, the report can omit the progress command altogether. A follow-up to #669 keeps the excerpt near the breadcrumb counter. A synthetic 40-entry history now prints the known marker for mesh command 29 under Wine. An explicitly unmarked command still prints as such.
The eight-pipeline skip result narrows the slow-list workload. The per-command timings span consecutive marker timestamps, so setup for the next command, including its argument clamp, can contribute to the preceding interval. Likewise,
uN [heap …: null]comes from interpreting a user-data value as a heap index. It can describe a literal or the original table when a draw bound a freshly copied table. To distinguish these cases in a completed frame, the useful evidence is the shader’s actual bound table and slot, together with the indirect argument values and the last write covering that record.@BastienRodz on GitHub · 2026-11-24 13:52 UTC · original
The null slots (
u4/u5[heap N: null],u8 = [heap 327680: null]) are what #568 changes. Onmain, any host slot without a title view is a null Texture2D SRV, whatever the shader reads or writes there (a UAV, a raw or structured buffer); a null descriptor of the wrong kind is undefined behaviour in D3D12. With #568, slots the shader annotates get a null of the matching kind, so reads return zero and writes are dropped (dynamically indexed slots keep the old null). Whether that ends the slow loops and the TDR is unknown; nobody has tried it on NVIDIA yet.Branch: https://github.com/BastienRodz/VIctory/tree/gpu/typed-null-descriptors (
22e6676, rebased onmainffe310e). Most useful runs: default settings, then your "best combination" withoutVICTORY_SKIP_PIPELINES. Report whether theslow list commandtotals for the0xdc799b4xxfamily and the mesh draws change.On
DispatchMeshmarkers: diagnostics builds already set a marker right before eachDispatchMesh(crates/victory-gpu/src/draw.rs:598,note_opwith"mesh {x}"), as for dispatches and draws. Sono markeronop 42means the report's matching failed, not that the marker is missing; it pairs the k-thSetMarkerin the breadcrumb history with the k-th note. Could you paste the fullcommands a..b between its barriers:part of that device-removed line (title addresses removed if you like)? Then we can see whether the other commands got their text and fix the matching.@nicogunvis-boop on GitHub · 2026-11-24 14:03 UTC · original
Tested #568 (
22e6676, branchgpu/typed-null-descriptors) on Windows 11 / RTX 4070, diagnostics build,VICTORY_D3D12_DEBUG=1 VICTORY_D3D12_DRED=1 VICTORY_GPU_TIMING=1. My localindirect.rsclamp change was reverted first.Run A, default settings (2 min 13 s, then device removed):
0xdc799b4xxfamily: 10,422 ms total inslow list command.8bbcbda6008eaa37alone: 44 dispatches, mean 183 ms each (onmainffe310e: 16 dispatches, mean 147 ms).main: 63 ms).Run B,
VICTORY_SHADER_LOOP_LIMIT=4096, noVICTORY_SKIP_PIPELINES(1 min 20 s, then device removed):0xdc799b4xxfamily: 1,451 ms total;8bbcbda6008eaa378 dispatches, mean ~79 ms.So on NVIDIA #568 does not visibly change the cost of the
0xdc799b4xxfamily: the per-dispatch time is the same or higher. It does not stop the removal either. In both runs the device was removed without a list over ~0.7 s beforehand. The stop is a hang, not a long list:Same in A and B: the 3rd command of a mesh-only list hangs. Every command in the range still prints
no marker, including op 46 and op 14.As for the full
between its barriersexcerpts from my earlier runs onmain(stopped at 287/404 and 346/375): every command in the range there wasno markertoo:run 1 (stopped at 287/404):
a list stopped at command 287 of 404 (op 42), commands 284..358 between its barriers:;
command 285 (op 42): no marker;
command 287 (op 42): no marker;
command 289 (op 42): no marker;
command 291 (op 42): no marker;
command 293 (op 42): no marker;
command 295 (op 42): no marker;
command 297 (op 42): no marker;
command 299 (op 42): no marker;
command 301 (op 42): no marker;
command 303 (op 42): no marker;
command 305 (op 42): no marker;
command 307 (op 42): no marker;
a list stopped at command 0 of 3 (op 46)
run 2 (stopped at 346/375):
a list stopped at command 346 of 375 (op 42), commands 337..353 between its barriers:;
command 338 (op 42): no marker;
command 340 (op 42): no marker;
command 342 (op 42): no marker;
command 344 (op 42): no marker;
command 346 (op 42): no marker;
command 348 (op 42): no marker;
command 350 (op 42): no marker;
command 352 (op 42): no marker;
a list stopped at command 0 of 3 (op 46)
Happy to run another build, for example one with the marker-matching fix from iurysf/VIctory#1, so the hung mesh draw gets named.
@Marvisak on GitHub · 2026-11-25 06:56 UTC · original · edited 2026-11-25 15:46 UTC
Automated triage for the maintainers.
This is the NVIDIA world hang tracked in #71. This thread holds the per-command measurements for it.
Commits on
mainsince these runs that may change the result:9cc37c5("lists wait on memory values; queues hold work until its waits hold"):Wait32/64BitValueXwere ignored before, so compute lists on the title's compute queues could run before the lists that write their inputs. The "arguments never written, or written late" reading of the0xdc799b4xxfamily and the timing sensitivity reported on the RTX 4090 both fit that.315cea1("barriers start from the states resources are in"): fixes the debug-layer state mismatch in observation 3 (the title's GPU heap bound as a vertex buffer while in UNORDERED_ACCESS, around the indirect clamp's transitions).@nicogunvis-boop, could you rerun on current
main(da82e44or later) with the sameVICTORY_D3D12_DEBUG=1 VICTORY_D3D12_DRED=1 VICTORY_GPU_TIMING=1, with no skip list? Please also add the driver version and Windows build of the RTX 4070. That run would show what is left.On the comments since the last triage:
NaNvalues quoted there are in a 384-byte constant buffer (Cbv s1+112), not in the indirect argument block, so they do not show what the dispatch arguments held. The argument values and the last write to that record would settle it.mainlacks and was not bisected.Generated by Claude Code
@fiestorra on GitHub · 2026-11-25 12:06 UTC · original
Same shape on an RTX 4090, and DRED names the dispatch: indirect kind 2, max 1, in the list that stopped at command 53 of 64
Adding evidence rather than a new issue, because this is what I ran into and it matches this report closely.
Setup: RTX 4090, driver
32.0.16.2124, Windows 10.0.26300, package 1.0.2.1, Series X,--profile diag, session with the debug layer, empty cache. Build is today'smain(940d32f) plus five open pull requests that are what let the run get this far: the format-115 target stand-in (#2332), the texture ladder (#1630), the typed-UAV format rule (#1832), the sampler-heap fallback (#1778) and the scripted-keys fix (#2114).What is different from
main: onmainthe run dies earlier, withDXGI_ERROR_INVALID_CALLfrom aCreateRenderTargetViewofB4G4R4A4_UNORM(that is #1952). With #2332 applied that call is gone —no host texturegoes from 1 to 0 and the layer reports no error on that view — and what is left is this issue's failure:0x887A0004/0x887A0006after a submission of 12–20 lists, with one list taking 5,250 ms.What DRED says, and it is the part I have not seen in this thread yet:
So the list that stops is stopped at an indirect dispatch,
kind 2, max 1, of compute programf607780aa8e502d0, with the argument block at0xd9358fe80. The other lists in the same submission are the small ones (2 commands each,2/2); several larger ones read0/17,0/423,0/36— never started. Between command 52 and 54, the two barriers the report brackets it with are where the ordering is supposed to be established.Two things that follow, and one correction of my own:
slow list commandlines" and concluded the slowness was not inside a list. It was inside a list — the lines are behindVICTORY_GPU_TIMING=1and I was not setting it. The next run here is withVICTORY_D3D12_DEBUG=1 VICTORY_D3D12_DRED=1 VICTORY_GPU_TIMING=1, as in this report, and it should give the per-command milliseconds around command 53.If it helps whoever is on this: the three numbers I would chase are the writer of
0xd9358fe80+0x10, the barrier between commands 52 and 54, and whether themax 1clamp is applied to an argument block that the same submission has not finished writing. I have not written a fix, and I am not claiming one: this is the measurement that says which list and which command, and it agrees with the ones in this report.No game data is involved: a shader hash, an address, a command index and debug-layer text.
Written with an AI assistant.
@fiestorra on GitHub · 2026-11-25 12:15 UTC · original
VICTORY_GPU_TIMING=1names the slowness: one dispatch at 3,095 ms, everything else at 0.0 msFollowing my own note in this thread — that I had not set
VICTORY_GPU_TIMING, which is whyslow list commandnever appeared — here is the same scenario with it on. The report changes shape: it is not a list that is slow, it is one dispatch inside it.3,095.1 ms for one
16x16x16dispatch of compute00167d58cc5a78d7, and 0.0 ms for the next one. The difference of three orders of magnitude between two dispatches of the same shape is the whole story: this is not a slow submission and not a TDR budget problem — a translated compute program takes three seconds to do a job that its neighbours do in microseconds.That also reorders my earlier reading of this issue. The numbers here — "single host lists take 2.3–5.3 s" — are consistent with "one pathological dispatch per list", not with "many commands that are each slow". If that holds for the other measurements in this thread, the work is to find the loop.
What I know about this one and what I would look at:
16x16x16groups and takes 3,095 ms: if each thread's work were proportional to the console's, this should be microseconds. A loop that does not terminate early, or one whose bound is read from a value our translation computes wrongly, is the first thing I would look for;u4=0xa66900and a placed heap resource — worth checking that the count or limit the loop uses is not one of those constants;The next measurement I would take is the shader itself: dump its DXIL (
VICTORY_EMIT_DIRor the shader cache) and look for the loop that the console program has but the host one runs unbounded. If someone is already on this program, say so and I will take another; otherwise I will start there, because a 3-second dispatch is a bug with a name and a file.No game data is involved: a shader hash, timings, a group count and log text.
Written with an AI assistant.
@fiestorra on GitHub · 2026-11-25 12:17 UTC · original
How to get to that shader's DXIL without the title:
size=7132is the console container, and the cache entries are readableTwo things I verified while trying to look at
00167d58cc5a78d7, in case they save the next person the hunt.1.
size=in the pipeline log is the console container's length, not the emitted DXIL's:so the shader that takes 3,095 ms is a compute container of 7,132 bytes — enough to find it in the pack by size alone, without guessing from the hash.
2. A shader cache entry is trivially unpacked, and the DXIL inside can be disassembled with the Windows SDK's
dxc:From the run's cache folder (
…\shaders\<translator key>\xx\<entry>), that givesdxc -dumpbin <entry>.dxiland a readable listing — the three entries I tried came out as compute shaders of 7,088–7,160 bytes, so the pipeline works; none was the 7,132-byte one, which is the one to pull.Why I am writing this rather than the answer: I ran out of run-time before finding the entry, and I would rather hand over the exact mechanism than a half-finished guess. The step that follows is mechanical: scan the pack for the 7,132-byte container,
victory translate --disasmit (or translate it and read the cache entry as above), and look for the loop whose bound our translation gets wrong — the one thing that explains 3,095 ms for a16x16x16dispatch while its neighbour takes 0.0 ms.If whoever owns the indirect-dispatch work in this thread wants it, I will take that shader next: it is one program, it has a size, a hash and a measurement, and that is the most actionable thing I have seen in this issue all day.
No game data is involved: a container length, a hash, a file layout and log text.
Written with an AI assistant.
@fiestorra on GitHub · 2026-11-25 12:19 UTC · original
A negative result worth writing down: the 7,132-byte search is ambiguous, so size alone will not find it
I said the next step was mechanical — find the container of 7,132 bytes and disassemble it. I did it, and it does not work: two containers measure 7,132 in that listing, and both are mesh/vertex programs, not the compute shader that takes 3,095 ms:
Two reasons the size is not the discriminator I thought it was:
shader-info --verbose, which includes whatever padding or alignment sits between entries. So it is an upper bound that happens to agree with the loggedsizefor some entries and not others;What would work, and what I would do next: take the length from the pack's own index (the RPF entry's declared size) rather than from offsets, and filter on stage compute at the same time — both are in
shader-info's reach but not in the--verboseline I parsed. The cache route also stands (VSH1header →dxc -dumpbin), and it avoids the ambiguity entirely once the entry is the right one, because the DXIL in it is the shader that runs.I am recording the failure because the temptation is to keep the "7,132 bytes" heuristic in a comment and have the next person spend an hour confirming that it matches two mesh shaders and none of the compute ones.
No game data is involved: container lengths, names and offsets.
Written with an AI assistant.
@fiestorra on GitHub · 2026-11-25 12:20 UTC · original
The logged hash is
blake3(container)[..16]— that is the way to find the container, not its sizeOne line of code settles the identification:
00167d58cc5a78d7is the first 16 hex digits of the BLAKE3 of the container's bytes, not a size, not a name. So the container can be found deterministically: hash every container the pack holds and compare the prefix. That is mechanical and cheap — 26,503 containers of a few kilobytes each is a couple of hundred megabytes of BLAKE3, seconds of work — and it does not depend on the pack's index, on the offsets, or on a size that two different programs share.Two things that follow from it, and that I had wrong earlier in this thread:
first bindiscontainer.len(), so two programs of equal size are indistinguishable by it — which is exactly what I ran into with the twoMS_VS_TransformTransmissionentries;00167d58…— I checked, and it does not. The cache is still the shortest route to the DXIL once the entry is identified by its container, not the other way round.So the ordered plan for whoever picks this up (or for me next):
00167d58cc5a78d7;victory translate --disasmthat one container, or read its cache entry asVSH1+dxc -dumpbinas I described;16x16x16dispatch while its neighbour takes 0.0 ms.I would rather hand over this than another heuristic: three of my last attempts at identifying this shader were size-based and the third only worked by luck of a listing. The hash is what the runtime itself logs; use the hash.
No game data is involved: a hash, a host log line and source excerpts.
Written with an AI assistant.
@fiestorra on GitHub · 2026-11-25 12:24 UTC · original
Found it by its hash: the 3,095 ms dispatch is
WindNew:CS_CopyLatestWindFieldForRenderingWithSmooth_c7e8e0cb_WrappedThe hash route worked, first try, no size heuristics:
One container in the whole pack hashes to that prefix, and its length is exactly the
size=7132the pipeline log printed. The method was: read each container the pack holds the way the runtime does (sources()then the length at0x18of the header, which is whattranslate --cacheuses), hash it with BLAKE3, and compare — 26,503 containers, a few seconds.This also settles the earlier confusion:
shader-info --verbosereported 7,242 as the distance to the next offset for@0xf8ee011, but the container's own length is 7,132 — the offset delta includes padding, which is why the size search matched two mesh shaders and missed this one.What the name says, and why it fits: a wind-field copy with smoothing. That is a program whose work is proportional to a grid, so it is exactly the kind that takes microseconds when the loop bound is right and "forever" when the translation computes it wrong — 3,095 ms for a
16x16x16dispatch, while the dispatch next to it in the same list takes 0.0 ms. And a wind field is updated every frame, which is why the failure lands once the title starts running the world: the same shader that is idle in the menus becomes the 3-second one in play.What I have not done: read its DXIL. My first attempt to pull the container out by offset from the pack produced bytes that do not parse, so
sources()is not reading the pack at raw offsets — there is an indirection I have not chased. The route that will work is the one I described earlier:translate --cachethat container (it is the warm-up path that just hashed it), then read theVSH1entry anddxc -dumpbinit.The next measurement is inside that shader: the loop whose bound is wrong. Three numbers to look at first — the grid dimensions in the dispatch (
16x16x16groups), the buffer domain the copy reads, and whether the smoothing kernel's bound comes from a constant or from memory. If someone is already inWindNew, say it here; otherwise this is the program I will be reading.No game data is involved: a hash prefix, a container length, a name and timings.
Written with an AI assistant.
@chazi123 on GitHub · 2026-11-25 13:23 UTC · original
Adding a Windows 10 data point and one detail the dump in the opening post does not contain. I think that detail changes where to look for the producer.
Same family, different card and OS
Windows 10 19045, RTX 3060 Laptop 12 GB (driver 32.0.16.1714), retail 1.0.2.1, Series X, on the sibling fork
victory-amd(D3D12, dynamic slots not doubled). Three runs ended in0x887A0006after 2m57s / 4m21s / 57m42s, withTdrDelayandTdrDdiDelayalready at 60 s — so a hang, as you found, not a long frame.The
device removedline is 20,469 characters and names two indirect compute dispatches of the shape you describe:cabb87599722e59a2561af9577c47289Both
indirect kind 2 max 1, both reading from one small argument block, both with null outputs.The detail: the argument block is not empty, it is NaN
The opening post says the block is never filled with valid data. In my dump it was filled — with NaN:
The 384-byte constant buffer's first two dwords are
NaNand the rest are denormal garbage (3.6e-34,2.24e-43). If a translated loop takes its bound or its iteration count from those floats,NaNcompares false against everything, so the exit test never fires.That matches the standalone measurement in ivall/xcl#1452, where the same dispatch was run outside the title: a normal loop count cannot produce the removal, while a count that "never comes" is removed at about 31 s.
It also gives the hunt a different direction: not "nobody filled the block", but "something computed a 0/0 or an inf-inf and stored it". That points at the producer that is running — a divide by a count not yet set this frame, or a subtraction of two equal infinities — rather than at the compute programs that fail to translate. Those two populations are not the same set.
What skipping bought, honestly
VICTORY_SKIP_DISPATCH=cabb87599722e59a,2561af9577c47289gets 8+ minutes and frame 1844, past the previous crash at ~1405, with no removal for the rest of the run. Your conclusion that dropping one or two only moves the cost onto the rest of the family is right, and I am not claiming this as a fix: on this card those two happen to sit on the path that matters, and I have no evidence about the others.One negative result that now makes sense
Your
#568test on the 4070 (typed nulls neither change the cost nor stop the removal) fits a NaN reading: a correctly typed null returns zero, and a zero does not terminate a loop bounded by NaN. So #568 was aimed at the right symptom but the wrong operand.Why this may be invisible to other Windows 10 reporters
On Win10 the in-box runtime reports
mesh=falseand the title dies 2–4 s after boot with0xC0000005 read 0x68, well before this is reachable. Loading Agility 620 as the runtime makeshost mesh shader support mesh=trueand the world then gets far enough to hit this family. Anyone on Win10 without an Agility-enabled build will never see it, which may explain why the Win10 reports here stop earlier with a different error.If it helps: a per-dispatch marker on indirect dispatches would have named these directly; the two hashes only came out because
VICTORY_GPU_TIMINGprinted them for the whole submission.Log excerpts: https://github.com/chazi123/xcl-chazi/tree/main/victory-amd-win10-nvidia —
logs/evidence.txt, sections 2 and 3.@SantannaCarlos on GitHub · 2026-11-25 13:55 UTC · original
A data point from the fxceless/victory-fork main on an RTX 4070: all 13 programs named in this thread run, with no device loss.
Setup:
9376fd6and0b0074e, alone and with fork PRs #834, #799 or #854 on top.The 13 hashes from this thread:
8bbcbda6008eaa37,87df99711607dd60,776d835da5ffa646,84eafa50504bc9ef,c7feccae4e01e454,8a7b68076089f7a8,915ed81ea580a276,bc6ca78d5425c179,c962201cddbdd7dd,00167d58cc5a78d7,f607780aa8e502d0,cabb87599722e59a,2561af9577c47289.In all 32 runs:
VICTORY_DUMP_TARGETShave a few slow frame lines: those are the dumped frames themselves.)The fork's main carries changes this tree lacks; I have not bisected which one matters.