Second start with a saved pipeline cache hangs the PC: constrained XMemVirtualAlloc search holds the address-space lock while dxgmms2 waits on it #3765
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 victorious-gh on 2026-11-30T06:14:55Z.
I fixed the white screen crash at the start. I narrowed it down to the cached shaders, by swapping the victory cache dir on each startup to fix it. #2737 is the same issue i'm facing. The following is claude's description and fix for the issue. I applied a patch from claude and it worked.
Summary
On the second start with a saved pipeline cache, about 3 s into the game, the game window goes white and stops responding. Soon after, Windows can no longer start new processes. The game process can't be ended, and only a power-off recovers the PC. A manual kernel dump shows a lock chain: the game's constrained
XMemVirtualAllocreservation spends tens of seconds in the kernel's address search while holding the process address-space lock, and the graphics kernel's memory manager (dxgmms2) waits on that lock while holding its own. Placing the reservation at an address we find ourselves fixes it on my PC.Environment
f889bb07. The fix was tested on41adb55, which doesn't changexmem.rsor theXMemVirtualAllocpath.scripts\play-nvidia.ps1 -NoMenu -SeriesS -Dlss quality -Fps 30 -Preload, with no frame generation and no modsTdrLevelis not set (Windows default)Steps to reproduce
-More VICTORY_CACHE_DIR=<new folder>. The game runs normally. Close it with F1 → SAVE AND CLOSE GAME.title pipelines to start early pipelines=N, the hang begins.This reproduces on most second starts, not all. It hung 3 of 3 times with a cache of 2482 early pipelines (157 MB library) and also with 1844. One second start with 1812 early pipelines didn't hang.
What you see
nvlddmkm4101, so TDR never fires.TerminateProcesson the game returns "Access is denied", because the process is already exiting and can't finish.Log
Every hang ends on the same lines:
In runs that don't hang, the next line, about 6 ms later, is the title's 3.9 GB placeholder:
In the hung runs that line never appears, even with
VICTORY_LOG_SYNC=1.Kernel dump (manual 0xE2, about 30 s into the hang)
Threads in
victory.exe:dxgmms2recycle-heap mutex and waits for the address-space lock:Full
!process 0 1f victory.exeoutput available on request.What I think is happening
These parts are inferences, not things the dump proves:
MiFindEmptyAddressRange) gets pathologically slow.dxgmms2lock is shared across processes, so other programs' GPU allocations queue behind it. The dump only showsvictory.exe's threads.Fix (confirmed on my PC)
For constrained reservations in
XMemVirtualAlloc, find the address ourselves instead of using the kernel's search:VirtualQueryEx(a few hundred regions) to find the first free, aligned range that fits.VirtualAlloc2with that explicit base and noMEM_ADDRESS_REQUIREMENTS.MEM_TOP_DOWNrequests stay with the kernel.VICTORY_XMEM_OWN_SEARCH=0restores the current behavior.Tested on
41adb55with the same repro. Two second starts with saved caches got through:In both runs the 3.9 GB placeholder was placed about 22 ms after
title pipelines to start early, at0x1b00000000:Happy to open a PR.
Workaround (without the fix)
Use a new, empty
VICTORY_CACHE_DIRfor each run, or clear the shader cache before starting. This costs a full shader build every time.Related (separate issues if wanted)
EXCEPTION_CONTINUE_SEARCH, which hands crashes to Windows Error Reporting. When new processes can't start,WerFaultcan't start either, so the crashed process stays up.ABOVE_NORMAL, and title threads that ask forTIME_CRITICAL/HIGHESTget it (the cap only applies withVICTORY_STARTUP_PRIORITIES). This makes it harder for the rest of the system to respond when the game is busy.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by victorious-gh on 2026-11-30T06:19:57Z.
The following is the patch provided by claude:
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Smoodie7 on 2026-11-30T06:25:39Z.
@victorious-gh please tell your agent to open a pull request with the following "fix", if you can test it on your machine and provide the logs before/after it would be perfect. Thanks for contributing again.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by victorious-gh on 2026-11-30T06:28:40Z.
I made this account to avoid using my actual gh account. Local setup is all tied to my main account... if someone else can apply it and test it that would be great. :)
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Smoodie7 on 2026-11-30T06:32:04Z.
@victorious-gh Got it. I suppose that @sansj24k is on it. And btw thanks again for your contribution!
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by victorious-gh on 2026-11-30T06:44:58Z.
Yeah my context said it looks better than what it'd had come up w/... so all good :) thanks @sansj24k
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by sansj24k on 2026-11-30T06:46:54Z.
You're welcome twin
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by sdpiter on 2026-11-30T07:48:03Z.
I can confirm this on the same card, and I can add the second half of the symptom: the PC itself becomes unusable, not just the game window.
PC: RTX 4070 Ti 12 GB (driver 32.0.16.2140), Ryzen 7 5700G 8c/16t, 32 GB RAM, Windows 11 26H2 build 26300.9974, desktop 3440x1440 (21:9), HAGS off, VBS on. Series X profile,
--res 1440, DLSS off.Run 1: v2026.11.29.02, launched with no preload
The game starts and renders, then a minute in the window stops responding. What follows matches your report exactly: no new program could be started on the PC, Task Manager could not kill the process (neither End task nor End process tree), and the machine only came back after a power cycle. Nothing was in an error state in the log, it just stopped mid-run (last line 00:46:30Z, 152
shader translated, 9218 MB private).Run 2: v2026.11.29.05, this time with a complete preload first
So the saved pipeline cache was complete and it is still the second start with a saved cache that goes wrong. The window reaches the loading screen (
153 fps 1 draws/frame), then stops presenting. In the log:11.5 minutes with the compile counters frozen at exactly the same numbers, window "Not responding", 8942 MB private / 5158 MB resident, the PC had 16 GB free and 66 GB of commit left, so this is not RAM exhaustion. This time I could close it with Alt+F4 after those 11.5 minutes, but nothing it was doing had progressed at all.
Two things this adds to your dump:
largest_free_mb=6143against a 6236 MB request — thespare_given_back=truepath of .04/.05 does run here, and it still does not fit, so the constrained search is entered anyway. If #3767 places the reservation by walking the window instead, this case is covered too.If a build with #3767 is available to test, I will run it on this PC and report back — the reproduction is reliable here: complete preload, start the game, it hangs within seconds and (on .02) took the whole machine with it.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Smoodie7 on 2026-11-30T07:52:17Z.
@sdpiter you can test it with #3767 since it provides an experimental fix (you can ask your ai agent to set it up for you). If you do, don't forget to leave a comment + your logs under the pull request.