NVIDIA: intermittent device removal, GPU reads windows / list scratch the layer gave back (1.5 s to 106 s earlier); keep-freed is off on 32 GB PCs #455

Open
opened 2026-11-27 02:51:06 +00:00 by github-bot · 0 comments
Owner

@⁠JFIREonFIRE on GitHub · 2026-11-27 02:46 UTC · original

Looking for help with an intermittent NVIDIA device removal: the card reads memory the layer gave back, seconds to minutes earlier. Roughly one 4-to-11-minute run in three or four on an RTX 3090 / 32 GB (driver 32.0.16.2101), cool_fox-based tree with port 1 and the switches from #394, VICTORY_D3D12_DRED=light. Breadcrumbs from five of them:

run at fault inside freed that memory was made → given back age at the fault
A 229 s list scratch (4 MiB chunk) 227.06 → 227.69 s 1.5 s
B 392 s list scratch (4 MiB) 388.67 → 389.41 s 3.1 s
C 86 s a window of title memory in CPU-mapped card memory (VICTORY_WINDOWS_BAR_MB) 79.74 → 83.28 s 3.0 s
D 321 s the same kind of window (0x51f000000+0x400000) 72.00 → 214.90 s 106 s
E ~100 s (no breadcrumbs: nvlddmkm event 153)

All page faults, all "2–13 submissions sent ahead", none with black frames before.

What I found so far:

  • cool_fox's notes on VICTORY_KEEP_FREED describe faults of this kind on reads past a view into memory given back, and keep freed memory as the cure. But that keeping is off on PCs with 32 GB or less: ram_idle_ms passes keep_freed() && !residency::limited_host_ram(), the scratch pool uses SPARE_MOST (128 MiB) instead of SPARE_KEPT under the same test, and ram_idle_ms takes the smaller of free RAM and commit headroom, which with a system-managed page file is under 2 GiB, so windows and staging went back 2 s after their last use. The same lines are in a-publier's host.rs.
  • Keeping them longer (≥ 15 s, scratch pool 1 GiB) did not stop it: run D's window had been gone for 106 s. So something keeps the GPU address of a window (and of scratch) after the object is let go, and NVIDIA faults where AMD reads whatever is there.

Question for whoever knows the window and scratch lifetimes: what can hold a window's or a scratch chunk's GPU address without holding the object? Candidates I can think of: a root CBV/SRV address set from a window into a list that is replayed or kept (host lists never reset), indirect argument or count buffers written with such addresses, raw views the title-memory directory (memory.rs) writes per numbered copy, or descriptors we write into the title's heap. A VICTORY_* switch that logs every GPU address handed out from a window or chunk together with its owner would find it; is there one already?

Measured and written with Claude Code (AI). No game files.

**@⁠JFIREonFIRE** on GitHub · 2026-11-27 02:46 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/issues/455) Looking for help with an intermittent NVIDIA device removal: the card reads memory the layer gave back, seconds to minutes earlier. Roughly one 4-to-11-minute run in three or four on an RTX 3090 / 32 GB (driver 32.0.16.2101), cool_fox-based tree with port 1 and the switches from #394, `VICTORY_D3D12_DRED=light`. Breadcrumbs from five of them: | run | at | fault inside freed | that memory was made → given back | age at the fault | |---|---|---|---|---| | A | 229 s | list scratch (4 MiB chunk) | 227.06 → 227.69 s | 1.5 s | | B | 392 s | list scratch (4 MiB) | 388.67 → 389.41 s | 3.1 s | | C | 86 s | a window of title memory in CPU-mapped card memory (`VICTORY_WINDOWS_BAR_MB`) | 79.74 → 83.28 s | 3.0 s | | D | 321 s | the same kind of window (`0x51f000000+0x400000`) | 72.00 → 214.90 s | **106 s** | | E | ~100 s | (no breadcrumbs: nvlddmkm event 153) | | | All page faults, all "2–13 submissions sent ahead", none with black frames before. What I found so far: - cool_fox's notes on `VICTORY_KEEP_FREED` describe faults of this kind on reads past a view into memory given back, and keep freed memory as the cure. But that keeping is off on PCs with 32 GB or less: `ram_idle_ms` passes `keep_freed() && !residency::limited_host_ram()`, the scratch pool uses `SPARE_MOST` (128 MiB) instead of `SPARE_KEPT` under the same test, and `ram_idle_ms` takes the smaller of free RAM and commit headroom, which with a system-managed page file is under 2 GiB, so windows and staging went back 2 s after their last use. The same lines are in `a-publier`'s `host.rs`. - Keeping them longer (≥ 15 s, scratch pool 1 GiB) did not stop it: run D's window had been gone for 106 s. So something keeps the GPU address of a window (and of scratch) after the object is let go, and NVIDIA faults where AMD reads whatever is there. Question for whoever knows the window and scratch lifetimes: what can hold a window's or a scratch chunk's GPU address without holding the object? Candidates I can think of: a root CBV/SRV address set from a window into a list that is replayed or kept (`host lists never reset`), indirect argument or count buffers written with such addresses, raw views the title-memory directory (`memory.rs`) writes per numbered copy, or descriptors we write into the title's heap. A `VICTORY_*` switch that logs every GPU address handed out from a window or chunk together with its owner would find it; is there one already? Measured and written with Claude Code (AI). No game files.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 02:51:06 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.