Memory guard: no black screen at 0.2 fps on 32 GB PCs (one compile at a time under the commit floor, refused pipelines made again, no 10 s screen waits) #3474
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3474"
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 nyxctura on 2026-11-29T23:44:12Z.
Fixes #2293. Related: #2520, #3435, #3094, #3107 (the same
0x8007000Epipeline failures and 0.1–0.3 fps stall).What it changes
On a 32 GB PC with a system-managed page file, the title commits 22–27 GB in the world. The memory guard then puts driver compiles off, and pipelines that the driver refuses with
0x8007000Eare recorded as failed for good. Their draws are dropped from then on, and the screen pass waits 10 s every frame for a pipeline that never comes (ms=10000 made=false). The result is a black picture with the HUD at 0.2 fps, about two minutes after loading in, reproduced 4 times, including after a reboot and with every cache deleted.Three commits:
compilemem.rs,memguard.rs,procmem.rs). Below the floor, compiles are let through one by one instead of all being put off, so they keep making progress without stacking their peaks. Theprocmemline now says what holds the host's private memory.pipeline/make.rs,pipeline/refused.rs,pipeline/library.rs). A memory refusal (the guard's put-off or a driver0x8007000E) is retried with back-off instead of being recorded as a permanent failure, and no frame waits 10 s for one: the draw is dropped for that frame only.compilemem.rs,host.rs). The gate measured commit growth during a compile, and that growth included the title's own streaming, so compiles looked several times larger than they were and the gate closed for good.Screenshots
Before, v2026.11.29.01 as released (2 min after loading in):

Before, official v2026.11.29.03 (same PC, lighter settings):

After, v2026.11.29.01 + this PR (same PC):

fps over time, all three runs:

How it was tested
0x8007000Elines, 17 screen waits of 10 s, 0.2 fps in the world (under 1 fps the whole time).0x8007000E, 0 screen waits; 12 compiles put off and made later; played 22.5 minutes, median 13.1 fps, never under 1 fps.70ad17b9…) on the same PC, with lighter settings (Series S, DLSS Ultra Performance, 60 fps cap), never reached the world: 1,1670x8007000Elines and 5 ten-second screen waits, with ~11 GB of RAM free on average. The files this PR touches are unchanged between .01 and .03.main(41adb551): the branch builds and thevictory-gpulib suite passes, apart fromshader_cache::tests::every_switch_of_the_translator_is_in_the_key(VICTORY_SCALAR_SPLITS is not read by the translator any more), which fails the same way onmainwithout this PR.host::card_steps::tests::places_written_after_sending_are_learnedfailed in one run; it fails intermittently without these commits too. It was not played onmain; the play evidence above is on the v2026.11.29.01 base.cargo testpassed for the crates it touches: yes (victory-gpu, see the one unrelated failure above).Checked for overlap
All three PRs at a glance
🤖 Generated with Claude Code
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by ThePerfomance on 2026-11-30T04:18:22Z.
Review: COMMENTED
Thanks for tackling the low-memory stalls, @nyxctura. In my run of
6cb6b38, the exit summary reported 731 deferred pipeline builds and zero permanent failures. The deferred count first appeared in the summary at exit.Could the deferred branch in
refused::failedsetchanged = truewhen it incrementsput_off? That would letsummary(false)report the updated count when the queue drains, which helps when a hung run has to be force-closed. A small test could check that one deferral produces a summary and that a second call without new events stays quiet.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by nyxctura on 2026-11-30T04:35:29Z.
Good catch, thanks for testing. Pushed: the deferred branch now marks the summary changed, so
summary(false)reports put-off makes as they happen instead of only at exit. Added the test you described (one deferral gives a summary line, a second call with nothing new stays quiet); it fails without the change.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by upipibi on 2026-11-30T05:18:58Z.
Test report for #3474 (head
92fa4133), merged onto main41adb551. Synthetic tests only: no title run, no game files, so this does not show the black screen going away in a title.Setup: RTX 3070 8 GB, driver 621.40, 32 GB RAM, Windows 11 (10.0.26100), rustc 1.98.1.
The ten new tests (
compilemem,pipeline::make,pipeline::refused,pipeline::library,procmem): 10 passed, 0 failed, 3/3 runs. They are logic tests and make no device.Negative controls, one line changed each:
compilemem.rsnever lets the single compile through under the commit floor (if false && verdict == Verdict::Commit && self.running.is_empty() && single_fits(..))under_the_commit_floor_one_compile_still_runs_alonecompilemem.rs:612:alone, over the single floor, leftCommit, rightAllowwait_cutinpipeline/make.rsignoresput_offwaits_are_cut_for_pipelines_put_off_for_memorymake.rs:1848:put off: nothing makes it nowa_wait_ends_when_its_pipeline_is_put_offmake.rs:1884:ended with the put-off: 513.0485msSo the tests do pin the two behaviours the description leads with: one compile still runs under the floor, and a wait ends when its pipeline is put off.
cargo test -p victory-gpu --lib --locked, three runs of each tree in turn41adb551Failures by test over the three runs:
shader_cache::tests::every_switch_of_the_translator_is_in_the_keyhost::menu::tests::a_change_is_saved_at_once_however_the_game_was_startedhost::uav_pool::tests::host_list_uav_pool_lifecycle_retire_trim_and_info_queuehost::card_steps::tests::places_written_after_sending_are_learnedwatch::tests::a_late_fault_leaves_the_guard_taken_sinceNone is one of the PR's tests. The first fails on main every time; the next three come and go on both trees. The last one failed once on the PR tree and not in main's three runs here; this PR does not touch
watch.rs, and I have seen otherwatch::tests fail now and then on main today, so I read it as the same kind, but three runs cannot settle that.Not tested: the memory guard in a title on a 32 GB PC with a system-managed page file, which is the case #2293 is about.
Tested with the help of Claude Code (Claude Fable 5.2).
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by nyxctura on 2026-11-30T05:32:38Z.
Thanks for the check, especially breaking it on purpose to see the tests catch it. Looks like everything works as it should.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by andrewpozdnakov7-jpg on 2026-11-30T09:52:47Z.
#3813 now has a matched hardware comparison on an RTX 4070 Ti Super 16 GB with 32 GB system RAM. The reporter used the same settings, cleared the shader cache and preloaded for each run. The build with #3474 reached the scene. Reporter and three logs
I counted the outcomes in the attached play logs.
v2026.11.28.03v2026.11.29.050x8007000eThe patched run still has long frames and logged low system commit. This comparison confirms that the reporter can reach the scene and that the failure counter stayed at zero in that run.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by SergDi on 2026-11-30T10:39:02Z.
I tested the accounting interaction of this PR (
92fa4133) and #2743 (f046d180) on41adb551, using synthetic Windows tests with Rust 1.98.1. This is a local integration experiment, not a failure claim against either PR alone.Integration used this PR's
refused.rsguards, #2743's panel andput_off()getter, and its refusal test. The key behavioral difference is deliberate: this PR puts driver-memory refusals off for retry, while #2743 alone only excludes guard deferrals from failed keys.If the intended UI contract is “both kinds of memory put-off receive the memory explanation”, the combined tree has a reproducible mismatch:
NO MEMORY.DRIVER_REFUSEDincrements butput_off()reads onlyREFUSED. The panel instead saysTHEIR SHADERS CANNOT BE CONVERTED YET/NOTHING ON YOUR SIDE.The contract test below fails for the driver branch. Summing the two counters only in the panel-facing getter makes it pass; separate per-cause counters remain available. This is a proposal for the combined configuration, not a change to the retry policy.
Evidence: #2743 characterization 2/2; this PR's matrix 3/3; combined matrix+contract 3 passed / 1 expected RED; with the getter proposal 4/4 and selected modules 82/82. Tests ran with
--test-threads=1because counters are global. One separate release-mode procmem test failed identically on clean41adb551; it is not attributed to this PR. Strict release/no-deps Clippy had the same 30 diagnostic locations as the base, after accounting for line shifts; not a clean Clippy pass.Two useful accounting distinctions from the matrix/code review:
Seen.put_offcounts events per ask, not unique pipelines. A single pipeline can contribute repeatedly.SECOND, but only sampledso_farmessages expose them; there is no getter/final total. Success after a later back-off has no separate counter.The contract patch applies to that combined tree; the getter proposal applies after it. The policy choice to retry a driver OOM is separate from whether the panel explains a pending retry accurately. No game/OOM-stress run or FPS claim is part of this check.
AI assistance: Claude prepared and ran the synthetic matrix; Codex reviewed the evidence and scope. No game data is included.
contract-test-on-combined.patch — synthetic integration test
put-off-counts-both-causes.patch — local proposal after the contract test
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by andrewpozdnakov7-jpg on 2026-11-30T13:31:27Z.
#3813's latest RTX 5080 report adds an independent
.05reproduction. Series X recorded 1,349 driver OOM failures at 45.6/46.0 GiB of system commit with 3.5 GiB of physical memory free. Series S still recorded 808 failures with only two pipeline workers. The matched RTX 4070 Ti Super run remains the result on this PR.I checked how this PR combines with #3788. A direct cherry-pick conflicted in
pipeline/make.rs. I resolved it in a review branch based on release main41adb551. The branch keeps the four #3474 commits, #3788 and the reviewer's reservation fix with their original Git authors. The combined wait keeps the memory-deferral exit and short budget from #3474, plus the cumulative screen allowance and concurrent reservation from #3788.Native Windows diagnostics tests passed 75/75 across pipeline making, the library, refusal accounting, compile admission, memory guard and process memory. The 36 pipeline-making tests also passed with four test threads. The same synthetic unmade pass with scaled 300/20 ms budgets measured 304, 30 and 30 ms across three frames. The legacy switch produced 314, 312 and 315 ms. The concurrent reservation and early memory-deferral tests passed. Asset policy passed for all seven outgoing source files. The whole-tree check still flags the same unchanged
frame_users.rsfile on release main and the branch.@Damaschni if you can do a matched rerun, the next useful comparison is the exact
92fa4133patch on.05with your same Series X settings and existing Windows commit limit. Please note whether the opening reaches the first playable frame, the driver refusals versus deferred retries, and whether the image is complete.Please preserve the original Git authors when taking the commits. If my conflict resolution is folded into another commit, use
Co-authored-by: andrewpozdnakov7-jpg <[email protected]>.RTX 5080 follow-up. Damaschni's exact-head 92fa4133 rerun recorded zero permanent pipeline failures, zero driver OOM messages, zero 10-second screen waits, and 5,078 deferral events. The first frame with at least 500 draws appeared after 73 seconds, with a median of 0.7 FPS over 32 samples. The diagnostic capture showed credits and loading art while the sampled 3D frames were black. The first controllable frame remains unverified. The system-managed commit limit was 49.75 GiB in this run versus 46.0 GiB in the stock report.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Damaschni on 2026-11-30T14:05:33Z.
@andrewpozdnakov7-jpg, here is the RTX 5080 rerun you asked for. I built the exact
92fa4133head on the.05base (41adb551). Same Series X settings as my original report: 2560×1440 output, DLSS Quality, frame generation off. RTX 5080 16 GB, 32 GB RAM, Windows 11 build 26300, driver 621.14. This release run used the offscreen window and scripted Enter.compile memorysummary. Repeated deferrals of the same pipeline can contribute more than once. There were zero logged 10 s screen waits..05sample was 45.6 / 46.0 GiB, so the observed commit limits differed.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by andrewpozdnakov7-jpg on 2026-12-01T11:23:12Z.
Thanks for rerunning
92fa4133. The play log recorded zero permanent pipeline failures and zero 10-second screen waits. Median FPS was still 0.7, and the sampled 3D frames in the separate diagnostics capture were black. The first playable frame remains unconfirmed.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by trustno1-coder on 2026-12-01T18:52:02Z.
Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.
Pull request closed