Card exhaustion and 0x80070057: slot eviction never fires (slots keyed by raw texture pointer, copies looked up by title address) #2778

Open
opened 2026-11-29 17:16:54 +00:00 by github-bot · 6 comments
Owner

@⁠MeeloG on GitHub · 2026-11-29 17:12 UTC · original

Related: #1962, #2276, #2075, #2173, #2724

What happens

VICTORY_SLOT_EVICT=1 is on and reports evicting, 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 on E_INVALIDARG from 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 of the card's own N MB in use of a budget of M MB, all rising:

5.7% -> 14.6% -> 34.8% -> 89.8% -> 91.0% -> 92.5% -> 93.6% -> 94.9% -> 96.6%   (14489 / 15005 MB)
  • no room, new textures wait in 52 of 79 room reports; 60 MB free in texture blocks
  • a texture already on the card is brought up to date although the card has no room for new ones 97,000 times in one run
  • an earlier run ended with a host command list did not close (0x80070057)

The eviction line, identical on every 5-second report at 96.6% of budget:

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: evicting, of 77520 idle-looking textures 0 kept as a table showed
them lately and 24521 not to be taken (a slot shaders pick by index shows them)

EVICTING is 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.

raws is keyed by the raw host texture pointer, with the title texture address as its value:

raws.insert(windows::core::Interface::as_raw(&host.texture) as usize, at);   // key: raw, value: at

descriptor::evictable_slots(&raws, ..) is handed that map and asks HostHeap::slots_showing for exactly those raw pointers, so the map it returns is keyed the same way:

// crates/victory-gpu/src/descriptor.rs, evictable_slots
let set: HashSet<usize> = raws.keys().copied().collect();                  // raw host texture pointers
for (index, raw, ok, lately, indexed) in host.slots_showing(&set, frame, cutoff) {
    by_texture.entry(raw).or_default().push((at, index, indexed));          // key: raw host texture pointer
}

But both use sites look the title address up in that raw-keyed map:

copies.retain(|&(at, ..)| slots.contains_key(&at));                   // resource.rs:3555
let (reset, busy) = crate::descriptor::evict_slots(at, &slots[&at]);  // resource.rs:3560

A title texture address is never a key of slots, so retain empties copies on 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_plan itself is correct: at 94.8% of budget with high=85, low=75, cap=256 MB it asks for 256 MB per sweep. It never gets an address to act on.

Fix

    // `slots` is keyed by the raw host texture pointer (`raws`'s keys, as
    // `HostHeap::slots_showing` returns them); `copies` holds the title
    // texture's address, which is `raws`'s value side. Translate first.
    let raw_of: std::collections::HashMap<usize, usize> =
        raws.iter().map(|(&raw, &at)| (at, raw)).collect();
    copies.retain(|&(at, ..)| raw_of.get(&at).is_some_and(|raw| slots.contains_key(raw)));
    let (mut n, mut bytes) = (0u64, 0u64);
    for at in oldest_covering(copies, need) {
        // (A slot another thread was making is not waited for, as this
        // holds the table: the texture is in use then, and stays.)
        let (reset, busy) = crate::descriptor::evict_slots(at, &slots[&raw_of[&at]]);
        SLOT_EVICT[2].fetch_add(reset, Relaxed);
        ...

A test needs no title: build raws with one entry and a slots map keyed the way evictable_slots returns it, then assert the retain keeps 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_PERCENT instead of climbing to the line.

Notes

  • The comment above the sweep already warns that a working VICTORY_SLOT_EVICT=1 used to hang runs on the card's line (upstream patch 07: a lock taken twice by one thread), and the table is dropped before slot_evict takes it. That guard is in place; if it hangs again after this fix, the deadlock is in descriptor::evict_slots / HostHeap locks.
  • Separately and positively: VICTORY_HEAP_HOOKS=1 took 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.
  • Logs: the crashing run (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.
**@⁠MeeloG** on GitHub · 2026-11-29 17:12 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/2778) Related: #1962, #2276, #2075, #2173, #2724 ## What happens `VICTORY_SLOT_EVICT=1` is on and reports `evicting`, 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 on `E_INVALIDARG` from 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 of `the card's own N MB in use of a budget of M MB`, all rising: ``` 5.7% -> 14.6% -> 34.8% -> 89.8% -> 91.0% -> 92.5% -> 93.6% -> 94.9% -> 96.6% (14489 / 15005 MB) ``` - `no room, new textures wait` in **52 of 79** room reports; 60 MB free in texture blocks - `a texture already on the card is brought up to date although the card has no room for new ones` **97,000 times** in one run - an earlier run ended with `a host command list did not close (0x80070057)` The eviction line, identical on every 5-second report at 96.6% of budget: ``` 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: evicting, of 77520 idle-looking textures 0 kept as a table showed them lately and 24521 not to be taken (a slot shaders pick by index shows them) ``` `EVICTING` is 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. `raws` is keyed by the **raw host texture pointer**, with the **title texture address** as its value: ```rust raws.insert(windows::core::Interface::as_raw(&host.texture) as usize, at); // key: raw, value: at ``` `descriptor::evictable_slots(&raws, ..)` is handed that map and asks `HostHeap::slots_showing` for exactly those raw pointers, so the map it returns is keyed the same way: ```rust // crates/victory-gpu/src/descriptor.rs, evictable_slots let set: HashSet<usize> = raws.keys().copied().collect(); // raw host texture pointers for (index, raw, ok, lately, indexed) in host.slots_showing(&set, frame, cutoff) { by_texture.entry(raw).or_default().push((at, index, indexed)); // key: raw host texture pointer } ``` But both use sites look the **title address** up in that raw-keyed map: ```rust copies.retain(|&(at, ..)| slots.contains_key(&at)); // resource.rs:3555 let (reset, busy) = crate::descriptor::evict_slots(at, &slots[&at]); // resource.rs:3560 ``` A title texture address is never a key of `slots`, so `retain` empties `copies` on 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_plan` itself is correct: at 94.8% of budget with `high=85`, `low=75`, `cap=256 MB` it asks for 256 MB per sweep. It never gets an address to act on. ## Fix ```rust // `slots` is keyed by the raw host texture pointer (`raws`'s keys, as // `HostHeap::slots_showing` returns them); `copies` holds the title // texture's address, which is `raws`'s value side. Translate first. let raw_of: std::collections::HashMap<usize, usize> = raws.iter().map(|(&raw, &at)| (at, raw)).collect(); copies.retain(|&(at, ..)| raw_of.get(&at).is_some_and(|raw| slots.contains_key(raw))); let (mut n, mut bytes) = (0u64, 0u64); for at in oldest_covering(copies, need) { // (A slot another thread was making is not waited for, as this // holds the table: the texture is in use then, and stays.) let (reset, busy) = crate::descriptor::evict_slots(at, &slots[&raw_of[&at]]); SLOT_EVICT[2].fetch_add(reset, Relaxed); ... ``` A test needs no title: build `raws` with one entry and a `slots` map keyed the way `evictable_slots` returns it, then assert the `retain` keeps 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_PERCENT` instead of climbing to the line. ## Notes - The comment above the sweep already warns that a working `VICTORY_SLOT_EVICT=1` used to hang runs on the card's line (upstream patch 07: a lock taken twice by one thread), and the table is dropped before `slot_evict` takes it. That guard is in place; if it hangs again after this fix, the deadlock is in `descriptor::evict_slots` / `HostHeap` locks. - Separately and positively: `VICTORY_HEAP_HOOKS=1` took 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. - Logs: the crashing run (`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.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 17:16:55 +00:00
Author
Owner

@⁠github-actions[bot] on GitHub · 2026-11-29 17:13 UTC · original

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.

  1. The play log, in %LOCALAPPDATA%\victory\logs\: the newest victory-nvidia-play-<date>-<time>-<number>.log (from victory.exe) or victory-nvidia-<date>-<time>.log (from the script launcher). The window shows its path at the start, on the line Log: ....
  2. The crash log: %LOCALAPPDATA%\VIctory\data\7952987A\crashes.log, and, if there is one from that run, the newest victory-<date>-<time>-<number>.crash.log in %LOCALAPPDATA%\VIctory\data\7952987A\temp\.

Also say which GPU, Windows version (10 or 11)

**@⁠github-actions[bot]** on GitHub · 2026-11-29 17:13 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/2778#issuecomment-7259516650) 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. 1. The play log, in `%LOCALAPPDATA%\victory\logs\`: the newest `victory-nvidia-play-<date>-<time>-<number>.log` (from `victory.exe`) or `victory-nvidia-<date>-<time>.log` (from the script launcher). The window shows its path at the start, on the line `Log: ...`. 2. The crash log: `%LOCALAPPDATA%\VIctory\data\7952987A\crashes.log`, and, if there is one from that run, the newest `victory-<date>-<time>-<number>.crash.log` in `%LOCALAPPDATA%\VIctory\data\7952987A\temp\`. Also say which GPU, Windows version (10 or 11)
Author
Owner

@⁠MeeloG on GitHub · 2026-11-29 17:13 UTC · original

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:

the texture queue's room: 14205 MB in use - 60 MB free in texture blocks + 0 MB kept for card copies
of title buffers + 766 MB kept for render targets = 14911 MB against a line of 14220 MB (94.9 % of a
budget of 14988 MB; 13964 MB after face headroom, 7221 MB in texture copies): no room, new textures wait

Eviction, same report:

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: evicting, of 77520 idle-looking textures 0 kept as a table
showed them lately and 24521 not to be taken (a slot shaders pick by index shows them)

Re-upload path, so_far at 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_far at the last line: 97,000, then:

a host command list did not close (0x80070057): a command recorded into it was invalid;
a diagnostics build with VICTORY_D3D12_DEBUG=1 names the command

Same signature as #2276. In that run the card went 5.7% -> 96.6% over 824 samples and never came down.

**@⁠MeeloG** on GitHub · 2026-11-29 17:13 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/2778#issuecomment-7259521173) 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: ``` the texture queue's room: 14205 MB in use - 60 MB free in texture blocks + 0 MB kept for card copies of title buffers + 766 MB kept for render targets = 14911 MB against a line of 14220 MB (94.9 % of a budget of 14988 MB; 13964 MB after face headroom, 7221 MB in texture copies): no room, new textures wait ``` Eviction, same report: ``` 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: evicting, of 77520 idle-looking textures 0 kept as a table showed them lately and 24521 not to be taken (a slot shaders pick by index shows them) ``` Re-upload path, `so_far` at 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_far` at the last line: **97,000**, then: ``` a host command list did not close (0x80070057): a command recorded into it was invalid; a diagnostics build with VICTORY_D3D12_DEBUG=1 names the command ``` Same signature as #2276. In that run the card went 5.7% -> 96.6% over 824 samples and never came down.
Author
Owner
**@⁠MeeloG** on GitHub · 2026-11-29 17:18 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/2778#issuecomment-7259586932) [victory-nvidia-play-20261129-161957-5376.log](https://github.com/user-attachments/files/35578116/victory-nvidia-play-20261129-161957-5376.log) [victory-nvidia-play-20261129-163703-3076.log](https://github.com/user-attachments/files/35578122/victory-nvidia-play-20261129-163703-3076.log) [issue-2778-evidence.log](https://github.com/user-attachments/files/35578133/issue-2778-evidence.log)
Author
Owner

@⁠steven-seagull27 on GitHub · 2026-11-29 18:05 UTC · original

Thanks for the detailed report and logs! Before anyone applies the raw_of patch suggested above, a quick heads-up from checking origin/main (55d06914):

1. The raw -> at key translation is already in evictable_slots

In crates/victory-gpu/src/descriptor.rs, by_texture is accumulated by raw host texture pointer at line 2013, but line 2035 already re-keys the returned HashMap from raw back to title address at (since initial commit 64d4931b):

// crates/victory-gpu/src/descriptor.rs:2035
by_texture.into_iter().filter_map(|(raw, slots)| Some((*raws.get(&raw)?, slots))).collect()

So slots returned to crates/victory-gpu/src/resource.rs:3544 is already keyed by title texture address at, matching copies.retain(|&(at, ..)| slots.contains_key(&at)) (resource.rs:3555) and evict_slots(at, &slots[&at]) (resource.rs:3560). Translating at -> raw with raw_of in resource.rs would introduce a keyspace mismatch and prevent slot_evict from matching any entries.

2. What actually explains the 77,520 idle-looking / 0 kept / 24,521 blocked / 0 evicted counters

  1. The 24,521 not to be taken textures (and 0 kept / 0 evicted): All descriptor-held textures in that pass were shown by bindless/indexed slots (tabled_stamp == 0, so ok == false), with none exclusively in table-read slots. VICTORY_SLOT_EVICT=1 alone intentionally refuses to evict indexed slots unless VICTORY_SAMPLED_MARKS=1 and VICTORY_SAMPLED_EVICT=1 are also enabled (see a410fd0f).
  2. The remaining ~53,000 idle-looking textures (77,520 - 24,521) not in any HostHeap::kept slot: Those have no descriptor slots showing them, so let_go_idle (which runs immediately before slot_evict) is supposed to reclaim them. On 55d06914, let_go_idle has a real bug at crates/victory-gpu/src/resource.rs:3106 & 3118: idle_sweep_policy sets unmapped_only = false when VRAM is pressured, but those two inner checks still test if host_idle.is_some() instead of if unmapped_only, skipping every mapped texture whenever host RAM headroom dips below min(RAM/4, 16 GiB). That bug is already addressed by open PRs #2591 and #2657 (and the dropped !busy && guard in slot_evict at resource.rs:3571 is tracked in #2173 and #2486).

3. Deadlock note

We also audited the lock graph along slot_evict -> evictable_slots -> evict_slots -> HostHeap on 55d06914: TEXTURES is dropped before evictable_slots/evict_slots, HostHeap::texture_slot_evicted uses non-blocking self.made.try_lock(index)?, and SHADER_HEAPS.read() is dropped (descriptor.rs:2067) before acquiring EVICTED or WAITING, so no self-deadlock or lock-order inversion was found there.

**@⁠steven-seagull27** on GitHub · 2026-11-29 18:05 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/2778#issuecomment-7260209023) Thanks for the detailed report and logs! Before anyone applies the `raw_of` patch suggested above, a quick heads-up from checking `origin/main` (`55d06914`): ### 1. The `raw -> at` key translation is already in `evictable_slots` In `crates/victory-gpu/src/descriptor.rs`, `by_texture` is accumulated by raw host texture pointer at line 2013, **but line 2035 already re-keys the returned `HashMap` from `raw` back to title address `at`** (since initial commit `64d4931b`): ```rust // crates/victory-gpu/src/descriptor.rs:2035 by_texture.into_iter().filter_map(|(raw, slots)| Some((*raws.get(&raw)?, slots))).collect() ``` So `slots` returned to `crates/victory-gpu/src/resource.rs:3544` is already keyed by title texture address `at`, matching `copies.retain(|&(at, ..)| slots.contains_key(&at))` (`resource.rs:3555`) and `evict_slots(at, &slots[&at])` (`resource.rs:3560`). Translating `at -> raw` with `raw_of` in `resource.rs` would introduce a keyspace mismatch and prevent `slot_evict` from matching any entries. ### 2. What actually explains the `77,520 idle-looking / 0 kept / 24,521 blocked / 0 evicted` counters 1. **The 24,521 `not to be taken` textures (and 0 `kept` / 0 evicted):** All descriptor-held textures in that pass were shown by bindless/indexed slots (`tabled_stamp == 0`, so `ok == false`), with none exclusively in table-read slots. `VICTORY_SLOT_EVICT=1` alone intentionally refuses to evict indexed slots unless `VICTORY_SAMPLED_MARKS=1` and `VICTORY_SAMPLED_EVICT=1` are also enabled (see `a410fd0f`). 2. **The remaining ~53,000 idle-looking textures (`77,520 - 24,521`) not in any `HostHeap::kept` slot:** Those have no descriptor slots showing them, so `let_go_idle` (which runs immediately before `slot_evict`) is supposed to reclaim them. On `55d06914`, `let_go_idle` has a real bug at `crates/victory-gpu/src/resource.rs:3106` & `3118`: `idle_sweep_policy` sets `unmapped_only = false` when VRAM is pressured, but those two inner checks still test `if host_idle.is_some()` instead of `if unmapped_only`, skipping every mapped texture whenever host RAM headroom dips below `min(RAM/4, 16 GiB)`. That bug is already addressed by open PRs #2591 and #2657 (and the dropped `!busy &&` guard in `slot_evict` at `resource.rs:3571` is tracked in #2173 and #2486). ### 3. Deadlock note We also audited the lock graph along `slot_evict -> evictable_slots -> evict_slots -> HostHeap` on `55d06914`: `TEXTURES` is dropped before `evictable_slots`/`evict_slots`, `HostHeap::texture_slot_evicted` uses non-blocking `self.made.try_lock(index)?`, and `SHADER_HEAPS.read()` is dropped (`descriptor.rs:2067`) before acquiring `EVICTED` or `WAITING`, so no self-deadlock or lock-order inversion was found there.
Author
Owner

@⁠Cooperos on GitHub · 2026-11-29 21:40 UTC · original

Repro on 8 GB, Series S profile, no frame generation (v2026.11.29.03) - same end
state: the card runs past its budget, slot_evict never lets a texture go, and the run
ends 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 room
80 % (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

  • 79 MB kept for card copies of title buffers + 685 MB kept for render targets
    = 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 (launcher
default) with VICTORY_SAMPLED_MARKS=1 - per point 1 of the earlier analysis, indexed
slots 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.log for the same run.

victory-nvidia-play-20261129-212549-3752.log

crashes.log

**@⁠Cooperos** on GitHub · 2026-11-29 21:40 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/2778#issuecomment-7263056068) **Repro on 8 GB, Series S profile, no frame generation (v2026.11.29.03)** - same end state: the card runs past its budget, `slot_evict` never lets a texture go, and the run ends 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 room 80 % (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 - 79 MB kept for card copies of title buffers + 685 MB kept for render targets = 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` (launcher default) with `VICTORY_SAMPLED_MARKS=1` - per point 1 of the earlier analysis, indexed slots 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.log` for the same run. [victory-nvidia-play-20261129-212549-3752.log](https://github.com/user-attachments/files/35584162/victory-nvidia-play-20261129-212549-3752.log) [crashes.log](https://github.com/user-attachments/files/35584170/crashes.log)
Author
Owner

@⁠MeeloG on GitHub · 2026-11-30 13:41 UTC · original

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:

  1. 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.

  2. 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.

**@⁠MeeloG** on GitHub · 2026-11-30 13:41 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/2778#issuecomment-7280203604) 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: 1. 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. 2. 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.
This discussion has been locked. Commenting is limited to contributors.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA#2778
No description provided.