Card exhaustion and 0x80070057: slot eviction never fires (slots keyed by raw texture pointer, copies looked up by title address) #2778
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?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by MeeloG on 2026-11-29T17:12:59Z.
Related: #1962, #2276, #2075, #2173, #2724
What happens
VICTORY_SLOT_EVICT=1is on and reportsevicting, finds tens of thousands of candidates, and lets none of them go. The card then climbs to the line, the re-upload-when-full path runs tens of thousands of times, and the run ends onE_INVALIDARGfrom a command list that will not close.RTX 5080 16 GB, driver 621.24, Series X,
--res 1080to1440, DLSS balanced, frame generation off, ray tracing on,VICTORY_HEAP_HOOKS=1. 7-minute session, 824 samples ofthe card's own N MB in use of a budget of M MB, all rising:no room, new textures waitin 52 of 79 room reports; 60 MB free in texture blocksa texture already on the card is brought up to date although the card has no room for new ones97,000 times in one runa host command list did not close (0x80070057)The eviction line, identical on every 5-second report at 96.6% of budget:
EVICTINGis yes, 77,520 idle-looking, 24,521 blocked, so ~53,000 should have been taken.SLOT_EVICT[0]stays 0 forever.Root cause
In
crates/victory-gpu/src/resource.rs,fn slot_evict, two pointer keyspaces are mixed up.rawsis keyed by the raw host texture pointer, with the title texture address as its value:descriptor::evictable_slots(&raws, ..)is handed that map and asksHostHeap::slots_showingfor exactly those raw pointers, so the map it returns is keyed the same way:But both use sites look the title address up in that raw-keyed map:
A title texture address is never a key of
slots, soretainemptiescopieson every pass and the loop below runs zero times. Note the second line would panic on a missing key, so fixing only the first makes the eviction reach&slots[&at]and die there; both have to change together.slot_planitself is correct: at 94.8% of budget withhigh=85,low=75,cap=256 MBit asks for 256 MB per sweep. It never gets an address to act on.Fix
A test needs no title: build
rawswith one entry and aslotsmap keyed the wayevictable_slotsreturns it, then assert theretainkeeps the copy. Today it does not.Not built
I did not compile this: the machine has no Rust or MSVC toolchain. The change is read off the code and the counters above. If it is right, the pool should start holding at
SLOT_EVICT_LOW_PERCENTinstead of climbing to the line.Notes
VICTORY_SLOT_EVICT=1used to hang runs on the card's line (upstream patch 07: a lock taken twice by one thread), and the table is dropped beforeslot_evicttakes it. That guard is in place; if it hangs again after this fix, the deadlock is indescriptor::evict_slots/HostHeaplocks.VICTORY_HEAP_HOOKS=1took the submitting thread from 39.2 ms to 8.7 ms per frame on this machine and removed the 590,028-slot descriptor rescan. Worth considering as a default.victory-nvidia-play-20261129-161957-5376.log) and the 96.6% run (victory-nvidia-play-20261129-163703-3076.log) are attached in the next comment.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by github-actions[bot] on 2026-11-29T17:13:06Z.
Please attach both logs from the run that went wrong. Without them we can only guess. Paste
%LOCALAPPDATA%into the address bar of File Explorer to get there.%LOCALAPPDATA%\victory\logs\: the newestvictory-nvidia-play-<date>-<time>-<number>.log(fromvictory.exe) orvictory-nvidia-<date>-<time>.log(from the script launcher). The window shows its path at the start, on the lineLog: ....%LOCALAPPDATA%\VIctory\data\7952987A\crashes.log, and, if there is one from that run, the newestvictory-<date>-<time>-<number>.crash.login%LOCALAPPDATA%\VIctory\data\7952987A\temp\.Also say which GPU, Windows version (10 or 11)
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by MeeloG on 2026-11-29T17:13:27Z.
Both logs are 5.56 MB and 8.72 MB, too large to paste, so the lines the numbers come from are here. I will attach the files themselves in a moment.
The 96.6% run (
victory-nvidia-play-20261129-163703-3076.log)Room, last 5-second report:
Eviction, same report:
Re-upload path,
so_farat the last line: 327,000 (the line is logged every 500). Same slots found changed again, never uploaded, for the whole run, with the card at 94.9% of its line and 60 MB free in texture blocks.Peak
the card's own N MB in use of a budget of M MB: 14,491 MB of 15,009.The crashing run (
victory-nvidia-play-20261129-161957-5376.log)Re-upload
so_farat the last line: 97,000, then:Same signature as #2276. In that run the card went 5.7% -> 96.6% over 824 samples and never came down.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by MeeloG on 2026-11-29T17:18:27Z.
victory-nvidia-play-20261129-161957-5376.log
victory-nvidia-play-20261129-163703-3076.log
issue-2778-evidence.log
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by steven-seagull27 on 2026-11-29T18:05:53Z.
Thanks for the detailed report and logs! Before anyone applies the
raw_ofpatch suggested above, a quick heads-up from checkingorigin/main(55d06914):1. The
raw -> atkey translation is already inevictable_slotsIn
crates/victory-gpu/src/descriptor.rs,by_textureis accumulated by raw host texture pointer at line 2013, but line 2035 already re-keys the returnedHashMapfromrawback to title addressat(since initial commit64d4931b):So
slotsreturned tocrates/victory-gpu/src/resource.rs:3544is already keyed by title texture addressat, matchingcopies.retain(|&(at, ..)| slots.contains_key(&at))(resource.rs:3555) andevict_slots(at, &slots[&at])(resource.rs:3560). Translatingat -> rawwithraw_ofinresource.rswould introduce a keyspace mismatch and preventslot_evictfrom matching any entries.2. What actually explains the
77,520 idle-looking / 0 kept / 24,521 blocked / 0 evictedcountersnot to be takentextures (and 0kept/ 0 evicted): All descriptor-held textures in that pass were shown by bindless/indexed slots (tabled_stamp == 0, sook == false), with none exclusively in table-read slots.VICTORY_SLOT_EVICT=1alone intentionally refuses to evict indexed slots unlessVICTORY_SAMPLED_MARKS=1andVICTORY_SAMPLED_EVICT=1are also enabled (seea410fd0f).77,520 - 24,521) not in anyHostHeap::keptslot: Those have no descriptor slots showing them, solet_go_idle(which runs immediately beforeslot_evict) is supposed to reclaim them. On55d06914,let_go_idlehas a real bug atcrates/victory-gpu/src/resource.rs:3106&3118:idle_sweep_policysetsunmapped_only = falsewhen VRAM is pressured, but those two inner checks still testif host_idle.is_some()instead ofif unmapped_only, skipping every mapped texture whenever host RAM headroom dips belowmin(RAM/4, 16 GiB). That bug is already addressed by open PRs #2591 and #2657 (and the dropped!busy &&guard inslot_evictatresource.rs:3571is tracked in #2173 and #2486).3. Deadlock note
We also audited the lock graph along
slot_evict -> evictable_slots -> evict_slots -> HostHeapon55d06914:TEXTURESis dropped beforeevictable_slots/evict_slots,HostHeap::texture_slot_evicteduses non-blockingself.made.try_lock(index)?, andSHADER_HEAPS.read()is dropped (descriptor.rs:2067) before acquiringEVICTEDorWAITING, so no self-deadlock or lock-order inversion was found there.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Cooperos on 2026-11-29T21:40:06Z.
Repro on 8 GB, Series S profile, no frame generation (v2026.11.29.03) - same end
state: the card runs past its budget,
slot_evictnever lets a texture go, and the runends on the same
0x80070057.Setup: RTX 3070 Ti 8 GB, driver 610.88; Ryzen 7 5700X, 64 GB RAM, Windows 11 26H2
(build 26300.10075). victory.exe from the v2026.11.29.03 release (SHA-256 verified).
Series S profile, scene 1280x720 with DLSS quality, frame generation off (Streamline
reports DLSS-G disabled),
VICTORY_CONTROLS=gamepad, MFG Unlocker loaded, texture room80 % (launcher defaults,
VICTORY_SAMPLED_MARKS=1,VICTORY_SAMPLED_EVICT=0).Timeline: crash 4 min 8 s after start, in gameplay (first Series S run).
Evidence from the play log (
victory-nvidia-play-20261129-212549-3752.log):Room report, last one before the crash - the card's own memory is past the driver's
budget, while texture blocks still have ~1.7 GB free:
the texture queue's room: 7261 MB in use - 1698 MB free in texture blocks
= 6327 MB against a line of 6358 MB (90.0 % of a budget of 7064 MB; 6102 MB after
face headroom, ...): no room, new textures wait
Eviction on every 5-second report - zero textures let go since start, and the state
is "not evicting" (unlike the OP's run, which showed "evicting" at 96.6 %):
textures let go with their slots under pressure (VICTORY_SLOT_EVICT), since the start:
0 textures (0 MB), 0 slots put back to waiting, 0 made again (0 of them within 2 s,
away 0.0 s on average), 0 given up as a draw used them meanwhile; the last look:
not evicting, of 17536 idle-looking textures 0 kept as a table showed them lately
and 17521 not to be taken (a slot shaders pick by index shows them)
The re-upload path climbing while the card sits over budget:
the card's own 7261–7271 MB in use of a budget of 7064 MB
the PC's shared with the card 11189–11195 MB in use
a texture already on the card is brought up to date although the card has no room
for new ones so_far=120500
End state (
crashes.log, process 3752):VIctory: host GPU failure: a host command list did not close
(The parameter is incorrect. (0x80070057)): a command recorded into it was invalid;
a diagnostics build with VICTORY_D3D12_DEBUG=1 names the command
Windows commit was never tight (28.9 GB RAM free, 34.8 GB commit left at the end), so
this is card-side exhaustion, not the commit/page-file case.
One detail for the analysis above: in this run
VICTORY_SAMPLED_EVICT=0(launcherdefault) with
VICTORY_SAMPLED_MARKS=1- per point 1 of the earlier analysis, indexedslots are then refused, which matches the 17,521 "not to be taken" here. This data
point says the exhaustion-and-crash path also happens on a smaller card with frame
generation off and the Series S profile, where the sweep doesn't even start ("not
evicting" at 90 % of the line).
Logs attached: the play log and
crashes.logfor the same run.victory-nvidia-play-20261129-212549-3752.log
crashes.log
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by MeeloG on 2026-11-30T13:41:05Z.
Thanks @steven-seagull27 — you are right and my patch was wrong. I stopped reading evictable_slots at line 2034 and never saw the re-key on the next line:
rust
// descriptor.rs:2035
by_texture.into_iter().filter_map(|(raw, slots)| Some((*raws.get(&raw)?, slots))).collect(),
So the map handed back to resource.rs:3544 is already keyed by the title address, copies.retain(|&(at, ..)| slots.contains_key(&at)) and evict_slots(at, &slots[&at]) are correct as written, and the raw_of translation would have introduced exactly the mismatch I claimed to be fixing. Please ignore the patch in the opening post — I have reverted it locally and there is nothing to apply.
Your two explanations both fit this machine's numbers exactly:
The 24,521 not to be taken. The switch header of the run in question has VICTORY_SAMPLED_MARKS=1 and VICTORY_SAMPLED_EVICT=0 — the launcher default you describe. All descriptor-held textures in that pass were shown by indexed slots (tabled_stamp == 0, ok == false), so VICTORY_SLOT_EVICT=1 alone refuses every one of them, which is the 24,521.
The remaining ~53,000 with no slot showing them. This is the let_go_idle / idle_sweep_policy interaction at resource.rs:3106 and :3118. On this machine both pressures are present at once, which is what makes it fire:
card: 94.9 % of budget (14205 MB used against a line of 14220 MB) → card_pressured true → idle_sweep_policy returns unmapped_only = false
host RAM: 32 GB total, 2-3 GB free during play → host_idle is Some, since the headroom is under min(RAM/4, 16 GiB)
With unmapped_only = false but host_idle.is_some() true, the two inner checks take the strict path and require wholly_unmapped, so every mapped texture is skipped and the sweep reclaims nothing. The result is the line in the opening post: 77,520 idle-looking, 0 evicted, 0 textures (0 MB).
So the 32 GB + 16 GB combination lands on the bug PRs #2591 / #2657 address, while the 8 GB report in #1962 hits the same code from the card side. The dropped !busy && guard (#2173, #2486) is the third one; the deadlock audit you did matches what we see too — nothing in our logs points at a lock problem, only at nothing being taken.
Meanwhile, a data point for #1962. Ran victory.exe preload --all --jobs 6 on this machine to take the compile-time stalls out of the picture:
code:
88558 pipelines known, 1846 made before, 0 bad; 86712 to make, 6 processes
86712 made in 1325 s (3 have no host pipeline, 0 ended their process); ms each: median 1.2, p90 142.0, p99 2067.8, most 35670, sum 7079 s
86,712 pipelines built with exactly one 0x8007000e: a single compute pipeline, lacks="" reason="compute 0x8007000e". Everything else made it, so the card can hold the whole pipeline set; the failure mode is the runtime pool, not precompilation.
Until #2591 / #2657 land I am running with VICTORY_SAMPLED_EVICT=1 to at least let the indexed slots go, and will report whether slot_evict starts letting textures go or the sweep now hangs on the line as the old comment warns.
Sorry for the noise, and thanks for reading it closely enough to catch line 2035.