xmem: since #464, unwatched section-backed pages make ProjectScarlett's start 4–5× slower on an 8 GB RX 6600 #472
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 brcly/TuxBox. Originally posted by 1093i3511 on 2026-11-29T12:55:28Z.
#464 backs XMem physical pages with their section, and its description names the trade-off: those pages have no write watch, so the d3d12 provider digests their textures instead. On an RX 6600 (8 GB, RADV, Mesa 26.3.1, GE-Proton11-14, 32 GB RAM), that cost makes the start of ProjectScarlett 4–5× slower. Measured with warm caches, one run per row. Section 2 is the
TUXBOX_SUBMIT_PROFILE=1comparison @NickStallman asked for on #413, which shows what the write watch is worth on this card. cc @Jerkin421. Since #464, the start is 4–5× slower
Presents per 10 s from launch, covering the Rockstar logo and the scenes after it (4-minute runs):
cb11fafbon75453953, without #464)main6e2c5dabmain6e2c5dabwithTUXBOX_PLACEMENT_WATCH=0main6e2c5dabwith #464 reverted locallymain, the logo animation plays slowly, its audio drops out and doesn't recover, and the scenes after it fall to about 50–60 presents per 10 s.TUXBOX_PLACEMENT_WATCH=0makes no difference onmain. That fits #464's description: section-backed pages have no write watch any more, so the provider digests their textures either way.mainreached the world and ended on the title's watchdog. On this card the runs haven't got as far as the first story mission, where #456 kills the title.TUXBOX_XMEM_PRIVATE_VIEWS=1should bring back the earlier pace here, at the cost of #456. I can measure that if it helps. Would a write watch for section-backed pages be possible, or a way to digest only the textures whose pages a host import holds?2. Where the time goes with and without the write watch (before #464)
Both runs on #462
cb11fafbon75453953, so without #464 and without #455.directplacementplacementplacementoncompute+directplacementstagespublication32.9 s,publish-store16.8 s,scan14.3 s,publish-retile11.1 s,digest6.4 sdigest174.5 s,resolve41.6 s,read34.6 s,publication29.2 s,publish-retile17.8 splacement digestalone takes 174 s of the 311 s world. With it,scananddigesttake about 21 s, and world frames come in 5.5 s instead of 8.9 s. That's roughly 1.5–2× @DrArroway's 6900 XT frame time on #462.directthen spends less time in batches andplacement(15 s against 34 s), and nothing in the profile adds up to the difference. So the time goes somewhere the profile doesn't measure, probably on the game's own threads. I haven't checked that.EXCEPTION_BREAKPOINT, caller+0x2215ECA), with no GPU fault, after 553 s (watch on) and 752 s (watch off).So on this card the watch is a net gain in the world and a cost at the start. Since #464, the title's pages lose it and get the full digest cost instead, from the start onwards.
Separately, #455 didn't stop the host-page fault here. On
main6e2c5dab, the game'svkd3d_queuefaulted at0x8002c2f00000(10 lines shown, 151 suppressed). Thegfx_0.0.0ring reset succeeded, and the watchdog ended the game 30 s later.Imported from brcly/TuxBox. Originally posted by 1093i3511 on 2026-11-29T13:17:34Z.
Follow-up:
TUXBOX_XMEM_PRIVATE_VIEWS=1onmain6e2c5dab, same card, one run, warm caches.The start is back at the pre-#464 pace. Presents per 10 s from launch:
main6e2c5dabmain6e2c5dabwith #464 revertedmain6e2c5dabwithTUXBOX_XMEM_PRIVATE_VIEWS=1It also went further than any run on this card so far. The run stayed in the world for about 350 s: 68 readback windows, 65 presents, mission at F:6793, end at F:6850, so 57 world frames. Earlier runs got 6–35. For the first time, new scenes of the intro rendered, with the opening credits over them.
write fault not promotedline in the log. This run didn't reach the first story mission, though, so it doesn't say whether #456 would come back there.What ended it was the host-page GPU fault, not memory. At 14:12:40, the game's
vkd3d_queuefaulted at host page0x8002c0174000on ring 24 (10 lines shown, 139 suppressed). Thegfx_0.0.0ring reset succeeded, and 30 s later the title's watchdog ended the game:EXCEPTION_ACCESS_VIOLATIONat+0x23CF683(callers+0x2215C35,+0x2215ECA), exit 5 after 1,002 s. Same shape as the earlier faults here (0x8002c2f00000onmain,0x8005174f0000and0x8001dddb0000before #455). So on this card that fault is now the next limit, with #455 merged.So on 8 GB,
TUXBOX_XMEM_PRIVATE_VIEWS=1is currently the better setting for ProjectScarlett, as long as nobody reaches #456's spot with it.Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-11-29T13:21:29Z.
Measured on an RTX 5090 (620.70.10, GE-Proton11-14, warm caches), where the display caps at 60 Hz, so the start can't show a 4–5× drop unless it falls below that. Presents per 10 s from launch:
maind2eb99ed+ others), run 1TUXBOX_XMEM_PRIVATE_VIEWS=1main75453953)So the pace mostly stays at the cap on this card, but the sixth window falls to about 200 in all three runs with #464 and to 522 or more in the others. That's a one-off dip here, not your slowdown. Private views on the 5090 didn't reach the world without an access violation in
XCRDAPI.dll(about 100 s after the story load), which I reported on #464; it didn't appear with #464, so I'd rather keep it.These runs all had a local experiment (#459) that computes wrong values in some mesh programs on NVIDIA, so nothing after the story load from them is evidence, including the endings. The start isn't affected by that as far as I can see.
On the host-page fault: two of my traced runs ended on the same kind, a GPU read of memory that had been unmapped earlier (6.9 s before in one, about 15 s after a clean release in the other). On a 5090 it's an Xid 109 or 13. I can't say it's the same as yours, and the runs carried that experiment; I'm rerunning without it.
Imported from brcly/TuxBox. Originally posted by DrArroway on 2026-11-29T13:28:17Z.
Seeing the exact same trade-off on an RX 6900 XT (
1002:73bf, 16 GB, RADV, Mesa 26.3.1, GE-Proton11-14, 3840x2160, offline):#464section-backedmain(6e2c5dab+ #474 + #475): stayed alive for 17+ min (743D world windows /458 sin-world,0crashes,0GPU faults — confirming#464eliminates the#456late-world crash), but world cadence drops to12–24 s/framebecause every submit checks all section-backed textures (~398ktextures /~34 GiBper 5 s window, vs~2.5 GiBwith private views).TUXBOX_XMEM_PRIVATE_VIEWS=1(with #462 + #474 + #475): world cadence is3.39 s/frame(best window2.75 s/frame), with zero GPU faults orERROR_BUSYup to the known late-world#456point.Two notes from profiling both modes that may help here and on RX 6600:
UNTRACKEDWatch::rearmcalls + 16 MiBPrivateArenaslabs + 4 MiB chunkedPrivateSpanreservations) skips tens of millions of redundantSECTIONrearms on defaultmain(27.2Min the 74-window run), and inTUXBOX_XMEM_PRIVATE_VIEWS=1mode cuts WinePrivateSpanVMAs by 22× (~97,290 → 4,449) andGetWriteWatchruns/scan by 11.5× (4,258 → 369). Reducing ~97k Wine VMAs down to ~4.4k may also help the startup slowdown you saw with the write watch on an 8 GB / smaller CPU budget.CheckPoolin-place digest) cutsplacement digestby ~2× without XMem lock contention (113.2Mmips digested in14.8%of wall time in the 74-window default-mode run). After#474and#475, the next largest CPU cost in#464section-backed mode is the per-textureGuestRunsaccess-hold churn (27.2Macquires inplacement resolve=8.5%wall +27.2Mreleases inunaccounted=18.6%wall).Imported from brcly/TuxBox. Originally posted by 1093i3511 on 2026-11-29T13:38:49Z.
Thanks both. A repeat of the
TUXBOX_XMEM_PRIVATE_VIEWS=1run onmain6e2c5dab, same card, and answers to your points.The repeat run matches the first one.
write fault not promotedRun 2's fault came at 14:30:57, at host pages
0x8002ca6b0000(7 lines) and0x8002ca6b1000(3), with 18 more suppressed. Thecomp_1.3.1andgfx_0.0.0ring resets both succeeded. The game then stopped withEXCEPTION_BREAKPOINTfrom the same main-thread wait as the watchdog (+0x2215ECA).@NickStallman:
XCRDAPI.dllaccess violation didn't show up here. Neither private-views run had an exception withxcrdapiin its backtrace. But neither run got as far past the story load as yours, so it may just not have had the chance.@DrArroway: thanks for #474 and #475. The fewer Wine VMAs and
GetWriteWatchruns sound like what an 8 GB machine with less CPU headroom needs. I'll runmainwith #474 and #475 here, in both modes: the default with #464, andTUXBOX_XMEM_PRIVATE_VIEWS=1. Then I'll report the start pace and the world cadence.Imported from brcly/TuxBox. Originally posted by 1093i3511 on 2026-11-29T14:05:06Z.
@DrArroway, here are #474 and #475 on the RX 6600, as promised above. I ran
main6e2c5dab+ #474 (df2a6a93) + #475 (9f9266ec), merged locally, once in each mode (Lanes 27/27).TUXBOX_XMEM_PRIVATE_VIEWS=1mainwithout #474/#475gfx_0.0.0reset, watchdog (exit 5, 603 s)gfx_0.0.0reset, watchdog (exit 5, 497 s)0x800327390000/…391000and0x80033cf00000/…f01000, the same two-adjacent-pages shape, so they don't say much about the world cadence. With one run per mode, I can't tell whether reaching the fault sooner has anything to do with the two PRs.Imported from brcly/TuxBox. Originally posted by gtb-sbe on 2026-11-29T16:49:44Z.
On an RX 9060 XT (RDNA 4,
1002:7590, RADV, Mesa 26.2.6, GE-Proton11-14, Linux 6.18.60, 32 GB RAM) I see the same slowdown with #464's section backing, and I found a second per-submit cost besides the placement digest: the shadow sync that runs before every submission. It isn't in anysubmit profilestage, so it's easy to miss.My build was
main6e2c5dabwith #441 on top, so without #474 and #475. Neither of them touchesheap/shadow.rsorcommands/submit.rs, so this part is the same on currentmain.What the profile shows
With
TUXBOX_SUBMIT_PROFILE=1, the direct queue spends 1.5-5.0 s of every 5 s window insideExecuteCommandListsat the loading screen, whileplacementtakes only 0.1-0.3 s of it and the host submit under 1 ms. A build before #464 (7d26508plus a few PRs) spent 0.1-1.6 s per 5 s in batches in the same phase.Where the time goes
This card's host profile says
section-import=substituted, so every import of section-backed pages goes through #200's anonymous shadow copy. Since #464 the physical pages are section-backed from the start, so that's most title memory the GPU reads.execute_lockedcallssync_shadow_imports()before every batch, andsync_cpu_writesrunsdiff_copy_chunksover the whole of every live shadow, whether or not the batch uses it.I put a timer around it (a local patch, not meant for merging). One run: about 6 minutes from launch to the world, then 35 minutes in the world:
So on a host that substitutes section imports, #464 turns more and more title memory into shadows, and every submission pays for diffing all of them. That would fit
TUXBOX_PLACEMENT_WATCH=0making no difference on your RX 6600. It would also fitTUXBOX_XMEM_PRIVATE_VIEWS=1bringing the start back, since private views shouldn't need shadows; I haven't checked that. With #474 halving the digest, I'd expect the shadow sync to become a larger share of what's left in the world.Ideas
submit profilestage, so it shows up in the profile.cc @DrArroway (#200) @Jerkin42 (#464)
Imported from brcly/TuxBox. Originally posted by DrArroway on 2026-11-29T17:22:46Z.
@gtb-sbe's RX 9060 XT measurement matches what I see on an RX 6900 XT (
1002:73bf, Mesa RADV, GE-Proton11-14, Ryzen 9 7900X): onsection-import=substitutedhosts, the 4–5× startup and video slowdown after#464comes fromsync_shadow_imports()diffing every live shadow buffer on every batch, outside anysubmit profilestage.On my runs,
Shadowsgrew from 174 MiB (menu) to 742 MiB (video) to 2.17–3.90 GiB (world). In menu and video,sync_shadow_imports()burned ~96% of submission wall time (~4.8 s out of every 5 s window). Even after parallelizingsync_shadow_imports()across 12 workers with single-read 64 KiB guarded digests, scanning those buffers on every batch hits a ~43 GiB/s physical DDR5 read-bandwidth ceiling, capping video at 18.5 FPS.ProjectScarlett measurements (RX 6900 XT,
TUXBOX_SUBMIT_PROFILE=1)#464baseline (main+#474/#475)placement245.5 ms/b)sync_shadow_imports()unprofiledplacement137.3 ms/b,resolve5.08 ms/b)Stage::Shadow+ parallel 64 KiB guarded shadow sync)shadow4.3 ms/b (40.5 GiB/s) menu, 17.4 ms/b (42.6 GiB/s) videoTUXBOX_XMEM_PRIVATE_VIEWS=1hybrid private views +#456fix)0shadows)0#456/ secondary-alias /xcrdapi/0x80004001faultsSplit PRs (all verified with
tuxbox.py checkon both1002:73bfand1002:164e)xmem, d3d12: cache placement backing runs across clean section-backed textures(caches clean placementRunMaps lock-free viaTuxBoxPhysicalMappingStateseqlock and speeds up XMemrearm).d3d12: parallelize shadow page sync with guarded 64 KiB digests and surface Stage::Shadow(addsStage::ShadowtoTUXBOX_SUBMIT_PROFILE=1and replaces2×-read per-pageVirtualQueryshadow diffing with parallel guarded 64 KiB block digests).xmem, xcrdapi, d3d12: fix hybrid private-views aliasing and mixed buffer imports(keepsTUXBOX_XMEM_PRIVATE_VIEWS=1opt-in while fixing the#456paths:xcrdapiTuxBoxAcquirePhysicalAccessrouting, eagerSharedSectionpromotion on a second0x21CPU aperture mapping, transient non-import VEH retry, and per-piece shadow mirroring inimport_scattered_buffer).@1093i3511 @gtb-sbe @NickStallman @Jerkin42 — if you can test PR #501 with
TUXBOX_XMEM_PRIVATE_VIEWS=1past the first story mission (the#456repro point), that will tell us whether it's ready to make hybrid private views the default again.(One unrelated note for debugging: without
#441, both default#464andTUXBOX_XMEM_PRIVATE_VIEWS=1still hit the sameTCPread host-page GPUVM fault around ~94.6% VRAM on RADV — e.g.,0x80032e952000in default mode and0x8002b9f31000/0x800100151000withPRIVATE_VIEWS=1.)Imported from brcly/TuxBox. Originally posted by ReverendOzmund on 2026-11-29T17:27:49Z.
Data point from NVIDIA: RTX 3080 Ti, driver 620.73.04, GE-Proton11-14, current main plus #441. The host profile reports
section-import=aliasedand the log never says game memory is copied, so no shadows are made and this sync costs nothing there. NVIDIA's slowdown since #464 is the placement digest, which #474 targets.So the shadow sync is RADV-only (or wherever section imports are substituted), which makes your first idea, syncing only the shadows a batch's lists import, the bigger win there. I've opened a small PR that times the sync as its own
mirrorstage inTUXBOX_SUBMIT_PROFILE, so it shows up on any host: #507Imported from brcly/TuxBox. Originally posted by ReverendOzmund on 2026-11-29T17:33:05Z.
NVIDIA data point: RTX 3080 Ti, driver 620.73.04, GE-Proton11-14. The host profile reports
section-import=aliasedand the log never says game memory is copied, so NVIDIA makes no shadows and the shadow sync costs nothing there. Our slowdown since #464 is the placement digest. I opened #507 to time the sync before I saw #498, which covers it, so I've closed mine.I'll test #501 with TUXBOX_XMEM_PRIVATE_VIEWS=1 on the 3080 Ti next and post frame times and whether it gets past the first story mission.
Imported from brcly/TuxBox. Originally posted by 1093i3511 on 2026-11-29T17:43:15Z.
@DrArroway, thanks, I'm on it. The RX 6600 (8 GB, RADV,
section-import=substituted) is preparingmainfd636d09with #501 and #389 merged on top (in place of #441, which was closed in favour of #389). Lanes passed 27/27 on it. I'll run it withTUXBOX_XMEM_PRIVATE_VIEWS=1and report whether it gets past the host-page fault and the first story mission. Our host-page faults so far were TCP reads of one to three adjacent pages at0x8001…–0x8005…, which fits your note about running without #441.The shader preparation for this
mainis slow here, so the result may take a while.Imported from brcly/TuxBox. Originally posted by gtb-sbe on 2026-11-29T18:35:41Z.
I ran #501 with
TUXBOX_XMEM_PRIVATE_VIEWS=1on my RX 9060 XT. It made no shadows at all and made the world about 1.5 times faster for the first few minutes. Then, at game time 6:14 in the intro, a secondary-alias promotion failed withERROR_BUSY. The numbers, the log line, and what the old shadow sync was actually finding are in https://github.com/brcly/TuxBox/pull/501#issuecomment-7260594403.Imported from brcly/TuxBox. Originally posted by gtb-sbe on 2026-11-29T19:57:14Z.
I looked into why my default-mode runs kept ending in the intro with the game clock at 3:00 (
Unsignaled CrossQueueBarrierin the crash log), and then tested DrArroway's merged perf PRs against it. RX 9060 XT (RADV, Mesa 26.2.6), GE-Proton11-14, Ryzen 7 5800X, dual-channel DDR4-3600.What the ends were: the title's main-thread heartbeat watchdog (
exe+0x2215A60: 30 one-second checks with an unchanged heartbeat at+0x71B6338), not a deadlock. In both minidumpsrbx = rbp = 0at the crash, which is the heartbeat path (the 300 s thread check enters with 30 in both), and the last heartbeat seen was 29-30 s old. The label waits kept advancing frame by frame until the end. "3:00" is just the intro's starting clock; almost all my crash logs since the 27th show it.Why the heartbeat stalled: the title submits to every queue from one thread, and in the world that thread was inside
ExecuteCommandLists~100 % of the time: placement ~70 % (mostly the in-place digest, ~53 GiB read per frame), shadow sync ~27 %. Frames took 17-24 s, so now and then one main-thread wait passed 30 s. At the crash the thread was inplacement::submit-> texture refresh -> XMemrearm.A/B with the perf PRs: same base as those runs (
6e2c5dab+ #441), same shader cache, plus only #474, #475, #478 (#495 needs it), #495 and #498, and a small sampler for the heartbeat:ExecuteCommandListsSo the PRs get it past the point where it always died here. Thanks, DrArroway.
What's left on this machine:
writeback.rschanged in that path. My guess is contention with the new digest and shadow pools (8 workers each on my 8-core CPU), but I haven't tested that, since there's no override for the pool sizes.That run ended on something new: the title hit an
int3in a lock-free pool allocator (exe+0x63966F) whose free list was empty. I don't know yet which pool it is, or whether slow frames are what fill it.Imported from brcly/TuxBox. Originally posted by 1093i3511 on 2026-11-29T20:01:54Z.
@DrArroway, the #501 runs on the RX 6600 (8 GB, RADV, Mesa 26.3.1,
section-import=substituted):mainfd636d09with #501 and #389 merged on top,TUXBOX_XMEM_PRIVATE_VIEWS=1, GE-Proton11-14. Lanes 27/27. Two runs with the same settings:fbk_stry000_FBK_STRY000_INTRO,Prestream)fault not promoted, then an access violation, exit 5 after 852 s#389 removes the host-page fault here. In all five earlier private-views runs on this card, without #389, the TCP read fault at a host page ended the run after 30–350 s in the world. Neither of these runs had it.
#501 doesn't fully remove #456 on this card. Run 2 ended on the #456 path, still in the intro, so before the first story mission:
The access violation that followed had the backtrace
+0x4DA63F8,+0x12DEB4D,+0x465B53, …,+0x2215ECA. So it was a write through a secondary alias while an import held the span (not the page), with system memory nearly full.Failed to import host memory, hr 0x8007000ecame 59 times in run 2 and 130 times in run 1, which didn't hit the fault. I can run a build with more logging around that path if it helps.I had to leave two compute shaders out (
TUXBOX_SKIP_SHADERS=35af8e6d,e5fbc632). Without that, RADV crashed twice at the same spot during loading, while compiling a compute pipeline:d3f0ccbcb73a7369…andbda9b810e5c81052…, 4.8 and 4.2 MB of DXIL).8ae931bd(requestfeb4cf082da14d24…, 3.4 MB of DXIL), never finishes compiling in RADV. It compiled before #482. Now it was still running after 2,330 s in run 1 and after 815 s in run 2, each time until the run ended. The game doesn't wait for it, but onevkd3d_queuethread spends the whole run on it, and the game process already held 13 GB during loading. That may be part of the memory pressure behind the failed imports above.Next run here: the same settings with
8ae931bdleft out as well (TUXBOX_SKIP_SHADERS=35af8e6d,e5fbc632,8ae931bd), and no other change. If the endless compile adds to the memory pressure, the import failures and thenot promotedpath should become rarer, and the run should get further into the world. I'll report the result.cc @glovepost (#482)
Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-11-29T20:04:20Z.
Corrected. I first wrote here that the driver was still compiling
8ae931bd(requestfeb4cf08…) when our runs ended. That was wrong. dxil-spirv (in vkd3d-proton) overflows the 64 MiB stack of the pipeline thread, the thread dies, and the provider keeps reporting "still running". Every run of ours I checked with that 3,455,520-byte DXIL (19) has exactly one Winevirtual_setup_exception stack overflowline; none of the six older runs I checked without it does. It'sCS_ScreenProbes_ActivateRays.The
-O0helper added in #479 runs-simplifycfg, which leaves five blocks returning to the dispatcher loop's header; dxil-spirv allows one. On builds without #479 the program finished on an RTX 5090 in 174 and 161 s. So neither #482 nor #489 is the cause there; whether your RADV hang is the same I can't tell. @1093i3511, does your Wine log have that line?35af8e6d/e5fbc632crashing insidelibvulkan_radeonlook like a different fault.A one-pass fix is in #535. On main
2d6dc338this program takes the structured form (#489), which converts, so it should compile there as it is.Imported from brcly/TuxBox. Originally posted by DrArroway on 2026-11-29T20:08:49Z.
@1093i3511 Thanks a lot for running those RX 6600 tests — and that
not promotedline is actually the exact confirmation we needed:No custom logging build is needed for this case: that shows the faulting page itself is not held (
page_import_held=false), and promotion is being blocked because a sibling page inside the same 4 MiBPrivateSpanis holding an import / deferred unmap, which preventsdetach_private_slotfrom releasing/re-reserving the span as a whole.The rebased
#501(cbb6a2df) now also logs[email protected](page_imp=...,span_imp=...,span_held=...,def=...)and handleswrite=falseread faults via aPAGE_READONLYmirror. Once#501merges, we can tackle sibling-span blocking onwrite=truein a focused follow-up PR without blocking the#495/#508rebase.@gtb-sbe Thanks as well for the detailed
#474/#475/#495/#498A/B numbers (~21 s->~12 sper frame,14->35 GiB/sdigest rate, clearing the 3:00 watchdog).One quick heads-up on
#495(2d6dc338): we also just caught and fixed a#495check_sequentialstale-cache invalidation bug (Watch::rearmclearingWRITTENbeforewatch_cacheable()checked it) plus a redundant first-upload digest incheck_mips_speculative(which also caused the 4 hardware unit-test failures intuxbox-d3d12). We're running a live check on that fix now before opening a small follow-up PR, and we'll keep your 8-core worker-pool contention note on publicationstorein mind too.Imported from brcly/TuxBox. Originally posted by DrArroway on 2026-11-29T21:44:04Z.
@1093i3511 @gtb-sbe Quick overnight hand-off update:
#550with the#495placement run-cache fix (check_sequentialwatch invalidation + skipping the wasted first-upload digest; verified on RX 6900 XT + AMD Raphael iGPU + live runs).#501(cbb6a2df) +#389+#550(TUXBOX_XMEM_PRIVATE_VIEWS=1, 584.7s,15,653presents,0GPUVM faults,0shadows), the newblocker=log caught why thatwrite=true#456fault still triggers:map_private_contiguous(runtime/xmem/src/physical_pages/private_views.rs) creates a single multi-GiBPrivateSpan(0xf00200000..0x1085e00000= 6.09 GiB) instead of chunking atPRIVATE_SPAN_CHUNK(4 MiB), so one GPU-imported page inside the pool blocks promoting any other unheld page (page_imp=false, span_imp=true).Posted the full hand-off note on
#533so anyone can pick upmap_private_contiguouschunking after#501lands.Imported from brcly/TuxBox. Originally posted by 1093i3511 on 2026-11-29T23:34:32Z.
An update on the start since #464, now with #474, #475, #495 and #498 merged. This is
main39463ea5with #527's two acphal commits reverted (#554), in default mode, so section-backed and without private views. RX 6600, warm caches. Presents per 10 s from launch:main6e2c5dab(with #464, before the perf PRs)main39463ea5, acphal reverted6e2c5dabwithTUXBOX_XMEM_PRIVATE_VIEWS=1, or #464 revertedThe perf PRs roughly triple the start on this card, but it's still clearly below the pre-#464 pace. After the logo came a long slow stretch, about 58–86 presents per 10 s from 11 to 31 minutes. The world was reached after about 35 minutes (mission at F:1685). The title's watchdog ended it after 8 world frames, about 15 s. There was no GPU fault. Peaks: RAM 29.6 of 32 GB, swap 12.1 GB, card GTT 10.7 GB.
So on 8 GB this issue is smaller, but not gone. Next here: #501 with
TUXBOX_XMEM_PRIVATE_VIEWS=1on top of #557, as you asked, @DrArroway.Imported from brcly/TuxBox. Originally posted by Jerkin42 on 2026-11-30T00:09:35Z.
Two results from an RX 9060 XT (
1002:7590, RDNA 4, RADV,section-import=substituted, same card as @gtb-sbe), offline, Series S.1. With private views, the
write=truealias fault ends the run here too. Build: #501 (cbb6a2df) + #389,TUXBOX_XMEM_PRIVATE_VIEWS=1, cold caches.090cf6cemanaged 240–390.The blocking span is 3.88 GiB. This is the same shape as @DrArroway's 6.09 GiB
map_private_contiguousspan.2. On this card, the start is not placement checks. I ran an A/B on
090cf6cein default mode, 5.5 min each, comparingTUXBOX_CHECK_ONCE_PER_FRAME=1+TUXBOX_CHECK_SAMPLED=1(a local branch) against no switches.About 221–226 s of the ~245 s in direct-queue batches went elsewhere, which is the shadow sync from #498 that this build predates. So I'm not opening that branch as a PR.
Imported from brcly/TuxBox. Originally posted by 1093i3511 on 2026-11-30T00:14:04Z.
@DrArroway, for #501's
needs-check: I ranf482572a+ #557 + #501 (cbb6a2df) withTUXBOX_XMEM_PRIVATE_VIEWS=1, twice, on the RX 6600. I left out35af8e6d,e5fbc632and8ae931bd(#535).not promoted/blocker=The start was at the pre-#464 pace again (745, 651, 654, 707, 780 presents per 10 s in run 1). Swap stayed far lower than in my #389 + #501 runs (19–25 GB). Both runs ended on the title's watchdog a few seconds after world entry, still in the intro, so I couldn't get to the first story mission on 8 GB. That needs world frames under the 30 s heartbeat first. So there's no #456 crash in two runs, but they don't show that #456 is fixed.
Imported from brcly/TuxBox. Originally posted by Jerkin42 on 2026-11-30T00:54:47Z.
A follow-up on the 3.88 GiB span, for whoever picks up the
map_private_contiguouschunking (@DrArroway's hand-off). I tried the simple version, and it trades the crash for a GPU fault here.The change:
map()andcopy_page_mappingscallmap_private_contiguousonce per 4 MiBPRIVATE_SPAN_CHUNKinstead of once for the whole range. A unit test checks that a hold in one chunk no longer blocks promoting a page in the next one.Same build as before otherwise: #501
cbb6a2df+ #389 + this,TUXBOX_XMEM_PRIVATE_VIEWS=1, RX 9060 XT. Onlyxmem.dlldiffers from my earlier run.not promotedlines. Both runs reached the earlier run's crash state (about 3,100 placements) in 7 min after the title instead of 16.0x8000fa801000and0x8000c3d33000. Each time the gfx ring was reset and the device was lost.TUXBOX_TRACE_GPU_FAULT=1, all 32 unfinished commands were mesh draws, PScdce1ebe/ MS3ba95711and PS019166fc/ MSb91b86fc.UpdateTileMappings. My guess is a scalar load landing on a page of such a buffer that isn't bound. I haven't confirmed that.So chunking the spans probably needs the importer to keep large ranges in one host allocation, or the fix has to promote a page without detaching its whole span. I'm not opening this as a PR.
Imported from brcly/TuxBox. Originally posted by Jerkin42 on 2026-11-30T02:18:04Z.
One more data point on the
write=truenot promotedcrash, from a logging build: here it isn't only a sibling page pinning a span.Setup: the same #501 + #389 build with
TUXBOX_XMEM_PRIVATE_VIEWS=1, RX 9060 XT. I tried letting the faulting alias take over as the canonical copy (asSlotRole::Upgradedoes), and logged why it refused. It crashed 7 min after the title as before:What the log shows:
PrivateArenapage that the GPU itself holds.blocker=address: a GPU-only alias of the same token. It lies in the 3.88 GiB span whose other pages are imported, but it isn't imported itself.promote_token_to_sectionalready handles a held arena page; it invalidates the imports throughwas_held_arena. It stops only because detaching that GPU-only alias would unmap the whole held span.Why neither of my tries works:
A possible way through: a GPU-only alias in a held span isn't read by the CPU, and
resolve_backingscould resolve aSharedSectionpage through another address that maps the section. Then promotion could leave such an alias in place, mark it stale, and not detach its span. I'm looking at that unless @DrArroway already has the follow-up in hand.Imported from brcly/TuxBox. Originally posted by gtb-sbe on 2026-11-30T02:22:18Z.
@1093i3511, @NickStallman: I found the cause of the
Syscall stack overruninvkCreateComputePipelineson35af8e6dande5fbc632. It's a different fault from8ae931bd's dxil-spirv overflow, as Nick guessed.The cause: Wine runs each Unix call, and so the Vulkan driver's pipeline compile, on a per-thread kernel stack of 1 MiB. TuxBox's 64 MiB compile thread only covers vkd3d-proton's DXIL to SPIR-V step on the PE side. Mesa's SPIR-V front end walks structured control flow recursively (
structured_post_order_traversal()invtn_structured_cfg.c), about 96 bytes per block in a row.e5fbc632is 15,521ifs in sequence (49,875 blocks). Converted with the dxil-spirv CLI and compiled natively on RADV (Mesa 26.2.6), it segfaults on a 1 MiB stack at the same instruction as in the game (the recursive call,+0x71fcd5on my build) and compiles in 4.7 s on 2 MiB. A generated SPIR-V with N sequentialifs fails on 1 MiB from about 11,000.Workaround: Proton reads
WINE_KERNEL_STACK_SIZE(KiB); Valve's Proton 10/11/Experimental and GE-Proton11-14 all have it. WithWINE_KERNEL_STACK_SIZE=16384, all three programs compile on my RX 9060 XT (f482572a+ #557 + #389, private views):35af8e6din 155 s,8ae931bdin 119 s,e5fbc632in 118 s, with no overrun and novirtual_setup_exception stack overflow. So you should be able to dropTUXBOX_SKIP_SHADERS. #564 makes 16 MiB the launcher's default for Proton and adds a Lanes scenario that crashes without it.A repeat with the same settings (the programs now came from the caches) ended on the title's watchdog at the intro start (game time 3:00, 700 s), like yours on the RX 6600. In the last 30 s, the submitting thread was outside
ExecuteCommandListsthe whole time, and eight compute-queue label waits were held that no submitted list writes; they were released after 5 s each. The title's crash log shows anUnsignaled CrossQueueBarrier. I'm tracing which wait the title thread is in, and I'll post that separately.Imported from brcly/TuxBox. Originally posted by Jerkin42 on 2026-11-30T02:53:42Z.
A correction to my last comment: the
write=truealias fault looks like a symptom, not the cause. Please don't spend time on the stale-alias idea on my account.I built a version where promotion leaves a GPU-only alias in a held span alone. It reads through its own section view. Two runs with it (
#501+#389,TUXBOX_XMEM_PRIVATE_VIEWS=1, RX 9060 XT) never needed that path: nonot promotedand no GPU fault. They still died at the same moment, about 6 min after the title, on the grey loading screen. All five runs I have from this build end the same way:+0x2215EA0→+0x2592D69→+0x2593E91, in the routine at+0x4DA6330. That routine translates a pointer through a per-thread table of{base, destination, size}ranges, then writes a header at the result. It ends in one of two ways:+0x4DA63F8, from+0x12E8331. Three runs, and the "not promoted" log appears.int3fires at+0x4DA6315, from+0x12DEB4Dor+0x4E641DD. Two runs.So the title is handing that worker a pointer its table doesn't know, or one that leads into an alias. That fits wrong data from somewhere earlier more than an xmem promotion problem. 1093i3511's run of
mainf482572a+ #557 + #501 got past this point, so I'll try currentmainnext.Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-11-30T03:53:59Z.
An NVIDIA data point for the private views, in the world: RTX 5090 (
10de:2b85, 620.70.10, GE-Proton11-14, Ubuntu), an integration build off482572awith our open PRs (#566 included, which gets past the crash that stopped us earlier), warm, offline, one run each:TUXBOX_XMEM_PRIVATE_VIEWS=1Correction (15:25 local): I first listed a "flush" row of 2858 ms against 90 ms as if it were the title flushing its cache. It isn't: in these runs that profile step counts the title's Unmap of one texture, on other threads than the presenting one (80a to 83b: as many units as calls, and no flush caller line at all), so it says nothing about the frame. I've taken it out.
So on this card hashing nearly disappears, and what's left is mostly copying GPU-written textures back (and 0.5 to 1.0 s of GPU memory waits per frame). The frames in the two windows aren't the same scene or length, so read it as the size of the effect, not a precise ratio.
It ended 554 s in, under a minute into the world, in the
write=truealias fault others have:secondary alias 0x8fdc20000 fault not promoted (err=170, write=true, …)with a held-span blocker (span_held=true), then an access violation in the title (exit code 5). One earlier read-only alias fault in the same run was mirrored without trouble. No GPU fault, no Xid. The default-mode runs of this build lasted 1 and 19 minutes in the world and ended in a GPU loss instead.Imported from brcly/TuxBox. Originally posted by Jerkin42 on 2026-11-30T05:04:17Z.
@NickStallman, data on the shader MMU fault after the story loads, from RX 9060 XT (
1002:7590, RADV). It's the same kind as your Xid 13 in default mode, I think.Build:
mainf482572a+ #557 + #389 + #566 + #564. Default mode (no private views). All 13 inline ray-query programs left out (TUXBOX_SKIP_SHADERS), becausefb8e97e0faulted reading an unmapped host page otherwise. Reaches the "PROLOGUE" card, then faults 9–11 min after the title, every run:0x800041600000PERMISSION_FAULTS 0x3,MAPPING_ERROR 0VS 8b6223a0/PS 0a3fd624,MS e13e607e/PS 9ca310f60x8000fb21b000MS 84798173,MS 4db9a4030x8000bda37000MS b91b86fc/PS 019166fc×27,MS 3ba95711/PS cdce1ebe0x800041600000VS 8b6223a0/PS 0a3fd624×26VS 8b6223a0at0x800041600000) looks like a scalar read running off the end of a buffer into the next region. TheMS b91b86fc/MS 3ba95711pair also faulted this morning on the older #501 base.placement/descriptors.rs(local env override) still faulted.TUXBOX_PLACEMENT_WATCH=0still faulted, at the same address.VKD3D_CONFIG=fault(RADV hasVK_EXT_device_faultandVK_EXT_device_address_binding_report) printed nothing beyond the device loss.gfx_0.0.0ring reset succeeded).Next here: logging the root and table GPU addresses that
VS 8b6223a0is given, to name the buffer at0x800041600000. If you've already got the resource from your Xid 13 trace, I'll stop and try yours instead.Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-11-30T05:19:28Z.
@Jerkin42 thank you, that's very useful: it looks like the same fault. I don't have the resource, so please don't stop; your next step is the right one.
Where we overlap (corrected; my first version counted lines from other parts of the log). Among the unfinished draws each trace printed, in 83a (48 of 84 printed):
MS 8479817314,4db9a4036,3ba957114. In 84b (33 printed):4db9a40312, and none of your other ones.b91b86fc,e13e607eandVS 8b6223a0aren't in either trace's printed draws. Your client being the scalar data cache and ours "SM warp, MMU fault" doesn't say more than that.What we know about the addresses (details in my comment on #232):
0xdcf6068000, inside a range vkd3d had bound to an image and unbound 846 s before. 84b read0x1030b5000, which is in no allocation vkd3d knows. No import or placement we logged lies between 4 GiB and about 0x123e70000, and 27 of the 65 fault pages in our older logs are in that band; three of them repeat exactly across runs. That points to a fixed base plus a repeatable offset, like your0x800041600000twice.de01af6f/566c096c(vkd3d hashes) index the resource heap with a 27-bit value from title data, through an unchecked index-map load.Trying now: draft #572 gives index-map entries without a slot a null view instead of slot 0. No evidence it's the cause. If you can, the test that would help most is whether your SQC read is from a table/heap descriptor or a root one for
VS 8b6223a0: if it's a descriptor-heap buffer, its size and the offset would name the missing bound; if it's a root SRV, #389's reach and clip for that draw.TUXBOX_CHECK_STALE_IMAGES=1(#567) is log-only and off by default if you want to add it.Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-11-30T05:28:52Z.
@Jerkin42 one more thing to check before you log the resource; it could save you a run. This is read from code at
f482572aand not tested, so please treat it as a question.On
main, a mesh draw with a reflected table (mesh_table::reflected,index_map: None) appears to be run without the "no paged descriptor layout" skip the other path has. If the pixel stage or mesh stage indexes the resource heap directly, it would then use the title's heap index as a visible slot, which under descriptor paging names something else. Your build (f482572a+ #557 + #389 + #566 + #564) doesn't have #390, which gives those pipelines the index map; ours does. From your lists,PS cdce1ebeandPS 019166fcread the heap through 60 and 28 places with the raw index in the translation we have recorded;MS de01af6fandMS 8ca15b1etake their first heap index from a constant (& 1023).Three log lines would settle most of it, without a run:
skipped draw/no paged descriptor layoutlines around mesh pipelines, and whether any name the programs you listedindex mapanddescriptor arenalines (whether heaps are paged at all on your card)root CBV … has no mapped 64 KiB window(a different candidate: on AMD a root CBV is a raw address)If you can also run #390 (our rebased copy is
d3d12/mesh-index-map-bitmap, de1a16f0 onf482572a; MathiewMay's commit kept) on top of your build: if the same SQC fault on the same draws remains, this isn't it. @Kayotic1337 ran it on an RX 9070 XT and still had crashes in the first cutscene, so I don't expect it to be the whole story. It doesn't explain our own losses: those builds have #390.Imported from brcly/TuxBox. Originally posted by ReverendOzmund on 2026-11-30T06:04:17Z.
NVIDIA data point for #501: RTX 3080 Ti, driver 620.73.04, GE-Proton11-14, main
f482572a+ #557 + #501 with TUXBOX_XMEM_PRIVATE_VIEWS=1, WINE_KERNEL_STACK_SIZE=16384, Nick's lost-GPU recorder (hold and fault only).@gtb-sbe the stalled labels at the end look like the held compute-queue label waits you're tracing. Here they came right after the card ran out of room, so memory pressure may be one way into that state.
Imported from brcly/TuxBox. Originally posted by Jerkin42 on 2026-11-30T06:47:19Z.
@NickStallman I ran #390 (your
d3d12/mesh-index-map-bitmap, the three commits picked onto my build:f482572a+ #557 + #389 + #566 + #564). RX 9060 XT, RADV, default mode (no private views), the 13 inline ray shaders skipped. One run, so treat it as a single data point.It got further. Every earlier run on this build hit the SQC fault 9–11 min after the title, during the PROLOGUE mesh draws (
VS 8b6223a0/PS 0a3fd624,MS b91b86fc/PS 019166fc,MS 3ba95711/PS cdce1ebe). With #390 none of those faulted and the run reached the world (28,133 draws per frame). The time is longer only because #390's requests compiled cold.Then the same kind of fault, about 90 s into the world: SQC (data),
PERMISSION_FAULTS 0x3,MAPPING_ERROR 0, page0x800093900000; the ring reset succeeded. Of the 15 unfinished commands, the draws were:9b9409d04db9a403238af1d144638b1a564084c7144764f560f67616f562a532MS 4db9a403is the one that's in both of your traces (83a and 84b).Your three log lines, from the runs before #390:
skipped draw … no paged descriptor layout: 3 lines in one run (#256, #2048, #4096, guest caller0x4e33f98), none in the other; nothing naming the programs above.bound paged resource descriptor index map at graphics root slot 2(and the compute index map and stride table).root CBV … has no mapped 64 KiB window: 0.With #390, 7 mesh pixel stages logged
has no translation on its root and cannot read the resource index map(7b27692b,1b24cb42,6b2de15f,861d25b4,f8510ed6,06cba455,faa0615e). None of them is among the faulting draws.Next I'll add #572, with #567 logging, on top of this. The cache is warm now, so that run should reach the world in minutes.
Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-11-30T06:49:42Z.
@Jerkin42 thank you, this is the most useful run anyone has had on it. You've split it: #390 took away the faults in the PROLOGUE draws (
VS 8b6223a0,MS b91b86fc,MS 3ba95711), and what's left isMS 4db9a403/PS 9b9409d0, the pair in both of our gap-type losses on an RTX 5090 (14 and 13 of the unfinished draws in 87a and 84b). In the other kind of loss of ours (83a, 86a, former texture ranges) it's 6 draws or so.Two things about that pair that may help you look (read from the translated HLSL of the recorded requests, vkd3d hashes
de01af6f/566c096c):num_records = 0xffffffff), as far as I can see. It also takes one heap index from a root constant (& 1023) and one from a 27-bit table value; the pixel stage takes 6 heap indices from table values.root CBV … has no mapped 64 KiB windowis 0 for you, so it isn't that.If you can log them for that pair at the fault: the root SRV's GPU address and reach, the root constants (c0 & 0x3ff picks the heap view), and whether the faulting page falls in that SRV's range + offset or in a heap view. On NVIDIA the fault pages sit in an unmapped gap at 4 GiB and repeat across runs (
0x10de2f000,0x10be2f000,0x1030b5000, 32 MiB apart in one case). Please keep #572 as a control: 86a with it still lost the GPU, so it isn't the fix.Imported from brcly/TuxBox. Originally posted by ReverendOzmund on 2026-11-30T08:14:29Z.
@DrArroway I put together a small opt-in experiment for the section-page digest: TUXBOX_SECTION_GUARD=1 makes the CPU views of a watched section-backed page read-only at rearm and catches the first store in a vectored handler (its own lock, never the pool lock), so clean section pages skip the digest. Holds and mapping changes drop the guards first. About 150 lines in xmem, off by default.
I'm testing it on the RTX 3080 Ti now and will post the placement numbers. Since this is inside your XMem claim: would you rather I open it as a PR for you to review, hand it to you to fold into #550, or drop it if it clashes with what you're doing?
Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-11-30T08:21:41Z.
@ReverendOzmund in case you haven't seen it: @NathansDomainSolutions has #573 open, which from its description does much the same thing (CPU views of a watched section page made read-only at rearm, first store caught in a vectored handler with its own lock, pages dropped on map, unmap, alias or hold, off by default,
TUXBOX_XMEM_SECTION_WATCH=1). I haven't compared the code, and yours may differ where it matters, so this is only so the two of you and @DrArroway can see both. We have #573 in a build and plan an on/off comparison on an RTX 5090 tonight; I'll post the numbers there. Your 3080 Ti figures beside them would help a lot.Imported from brcly/TuxBox. Originally posted by ReverendOzmund on 2026-11-30T08:24:01Z.
Thanks Nick, I hadn't seen #573. It's the same approach and further along (tests, release for kernel writers), so I'll drop mine and test #573 on the RTX 3080 Ti instead: on/off with TUXBOX_XMEM_SECTION_WATCH, plus #390. I'll post placement time per 5 s window and frame times beside your 5090 numbers.
Imported from brcly/TuxBox. Originally posted by Jerkin42 on 2026-11-30T08:43:05Z.
@NickStallman I think I've found the SQC fault: translated shaders don't bounds-check the guest heap index before reading the index map. Details and a test that stops it below.
What the fault addresses are. I ran with
RADV_DEBUG=bo_history(Mesa 26.1.8), which logs every buffer RADV allocates or frees with its GPU VA. In the game it's written to the game's own/tmp, so it has to be copied out through/proc/<pid>/root/tmp/radv_bo_history.logwhile the game runs.0x800080a77000, was never inside any allocation. The log covers the whole process, ending 45 ms before the fault.0x800041600000and0x8000fb21b000. RADV never allocated anything in0x8000_xxxxxxxxabove0x800039449000.0x800000a00000: 1,000,064 descriptors of 32 bytes. Read as an index into it, every fault page is index 34M–131M, i.e. somewhere in the 4 GiB a 32-bit descriptor offset can reach, and far past the heap.That's an index nobody bounded. It may also explain your fault pages sitting at a fixed base plus a repeatable offset.
Where it comes from. The translator emits:
tb_heap_mapis a root SRV, so there is no size to clamp against. Word 0 is only a flag (count != 0), so a guest index at or past the map'scountreads whatever memory follows the map, and that word becomes the heap index.Test (one run, a diagnostic, not the fix).
TUXBOX_INDEX_MAP_PAD=1pads the map to 2^27 entries, all the null view, so the existing translations (no recompile) read the null view for any index up to 2^27.f482572a+ #557 + #389 + #566 + #564 + #390 + #572), RX 9060 XT, RADV.The fix I'm testing next, which I'll open as a PR if the run holds:
count, which is still nonzero when paged, so existing translations keep working.uint n = tb_heap_map.Load(0); return n == 0u ? i : tb_heap_map.Load(4u+min(i, n)*4u);The identity path (
n == 0, no paging) still uses the raw index. On NVIDIA that might be your remaining case, if any of your runs are unpaged.Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-11-30T08:50:07Z.
@Jerkin42 this is a very good lead, and it matches something in our notes that we never finished. After an earlier loss (84b, RTX 5090) we wrote down that the pair in both of our gap losses (
MS 4db9a403/PS 9b9409d0) indexes the resource heap with a 27-bit title value through an unbounded map load, and inferred "bad resource-heap descriptor". We then tested only indices inside the map without a slot (#572's null view) and not an index past its end, so our "unmapped index ruled out" did not cover yours. I readindex_map.rsone5d2e913and it agrees with you: the buffer holds exactly1 + countwords, word 0 is onlycount != 0, andtb_heap_indexdoes not clamp.What I can and can't say about NVIDIA:
I'd like to run your diagnostic on the 5090 as well: pad the map to 2^27 entries with the null view and look for gap faults (three losses so far, so we need a longer clean run than yours to say anything). I'll use your branch if you push one, otherwise I'll write the padding from your description. The fix is yours, and I'm not building one.
Imported from brcly/TuxBox. Originally posted by Jerkin42 on 2026-11-30T09:19:09Z.
@NickStallman thanks. Two branches on my fork, both on
e5d2e913:diag/index-map-pad(4348e7ff) is the diagnostic. WithTUXBOX_INDEX_MAP_PAD=1, the map is sized for every 27-bit guest index, and it logsindex map padded to …when the map is made. Existing translations work unchanged, with no recompile.Resident::newwritesarena.limitinto every entry up to the padded size.fix/heap-index-clamp(61580565) is the fix:count, and one extra word after the last index holds what an unwritten index reads.tb_heap_indexclamps withmin(i, n).On your other family (an address in a texture destroyed minutes earlier, 86a with #572's null view): agreed, that one doesn't look like this.
Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-11-30T09:20:53Z.
@Jerkin42 both branches fetched and read, and they do what you describe. For the 5090 test we have the padding in our own build from your description (2^27 entries, filled with #572's null view), off by default, with a control run without it and a third run that skips seven pixel programs. Those seven belong to mesh pipelines whose root has no translation, so they read raw guest indices and never go through the map. They start after tonight's current run and a build. With clamping in the translator everything recompiles, so I'd test the padding first and
fix/heap-index-clampafterwards, and will post both, whichever way they go.Two things worth knowing from our side, for your PR:
VK_NV_raw_access_chainsdisabled) was lost after 13.7 min in the world, untraced, so it doesn't tell the two families apart.mesh pipeline pixel stage … cannot read the resource index map, so they go around the map, and so does the identity path, as you noted. Clamping doesn't reach them. (I first wrote "on main too"; that line comes with #390, and I haven't looked at plain main.)Imported from brcly/TuxBox. Originally posted by ReverendOzmund on 2026-11-30T10:24:05Z.
@Jerkin42 @NickStallman I'll run fix/heap-index-clamp on the RTX 3080 Ti, merged with #572 (the clamp word holds #572's null view), #390 and #573. My remaining loss is Xid 13 MMU faults in VS 281b4977 / PS 96e8aaaa, a vertex/pixel pair that reads through the map, so if that's a wild index the clamp should stop it. Will report either way.
Imported from brcly/TuxBox. Originally posted by Jerkin42 on 2026-11-30T10:25:56Z.
fix/heap-index-clampheld on the RX 9060 XT.@NickStallman on the seven pixel stages that go around the map (and the identity path): agreed, the clamp doesn't reach them. None of the seven were among the unfinished draws in any of my traces. I'll say so in the PR.
Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-11-30T11:12:41Z.
@Jerkin42 first paired result on the RTX 5090 (
10de:2b85, 620.70.10, GE-Proton11-14, main8ece312fwith #390, #572 and other PRs, one build, 45-minute limit each, driver cache warm, world in about 10 minutes):ReadInvalid 0x103044000, "no candidate VA entries"PS 9b9409d0 MS 4db9a403is 23 of the draws our fault trace lists as unfinished, and the pairde01af6f/566c096cis in the breadcrumbs. That's the fourth traced gap loss with it.0x1c0f60000, 4.75 MiB, in the control. So a wild load from the map doesn't reach a fault 3 GiB below it; it's the index that load returns (or a raw index) that does, as you described.Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-11-30T11:32:26Z.
A third run in this set, on the same build as 91a and 91b (RTX 5090, no padding): the control, plus the seven pixel programs that go around the map left out (
TUXBOX_SKIP_SHADERS).ReadInvalid 0xdae994a000. vkd3d-proton: a freedVkImagerange, 0xb0000 long, last unbound 228 s earlier, "very likely use-after-free". The fault is in its last 64 KiB tile, as in our two earlier losses of that kind.#567names one stale image at this loss, a texture destroyed 31 s before. It isn't the one in the fault range.Imported from brcly/TuxBox. Originally posted by Jerkin42 on 2026-11-30T12:10:31Z.
A warm-cache world A/B of #573 (with #574) on the RX 9060 XT (
1002:7590, RADV,section-import=substituted), for @NathansDomainSolutions and @NickStallman.Build:
e5d2e913+ #390, #572, #567 and the heap-index clamp, then #573 (throughf73b79c3) and #574 picked on top. Warm cache,TUXBOX_XMEM_SECTION_WATCH=1, parallel publication at its default. Two switches in one build and one run each, so read the numbers with that in mind.1. Without a fix it never reached the world. Four guest batches were rejected with
0x800703e6(ERROR_NOACCESS), thenPresentX failed planes=2 HRESULT=0x800703e6, and the title crashed.Write64BitValueBottomOfPipeX). The same build without the watch had no rejections.heap::backing::write_host_sliceis aWriteProcessMemorywith noTuxBoxPrepareKernelWritebefore it. That write fails on a page the watch has made read-only.writeback::write_mappedhas the same gap. It prepares only on its fallback path, aftertry_write_xmem_byteshas already gone throughwrite_host_slice.prepare_kernel_writeintobacking.rsand called it at the top ofwrite_host_slice. With that, the second run reached the world with 0 rejections.2. In the world it was slower here. Frames per second, by 90 s window after reaching the world:
Placement profile over the last minute, per call:
section=373688/89131 MiBstill goes by the section reason, against about 5.8k pages watched as written or unwritten. On this card nearly every section page seems to have a GPU alias or an import hold, so it falls back.I didn't separate #573 from #574 in these runs. If someone with an NVIDIA card sees section pages actually watched, that would show whether this is RADV-specific.
Imported from brcly/TuxBox. Originally posted by ReverendOzmund on 2026-11-30T12:16:14Z.
@Jerkin42 NVIDIA side for #573 (RTX 3080 Ti, 620.73.04, default mode, TUXBOX_XMEM_SECTION_WATCH=1; f482572a-era main + #572, #566, #563, #567, #564, #390, #573 and the heap-index clamp, without #574). One 90-minute cold run that stayed on the loading screen, so no world numbers yet.
Section pages are watched here: across the run the placement profile counted unwritten=182,457 and section=1,373 (under 1% falling back), written=7, noted=15, held=0. No 0x800703e6 rejections and no PresentX failure, but loading may never have reached write_host_slice. This host imports sections directly (section-import=aliased), which may be why pages aren't left with GPU aliases or holds as on RADV.
Placement still reached 2.6–3.2 s in the busiest 5 s windows, so the digest isn't all of it. I don't have a same-build run without #573 yet; I'll pair one once I'm in the world.
Imported from brcly/TuxBox. Originally posted by gtb-sbe on 2026-11-30T12:48:19Z.
@ReverendOzmund yes, it looks like the same state. Your
stalled label 0x518fa78 >= 0x2c272on a type 2 queue is the same label as in my run 44d (0x518fa78 >= 0x1dad, RX 9060 XT,f482572a+ #557 + #389, private views), which ended on the title's watchdog at game time 3:00 with thetexture_readbackfence stalled as well. My run wasn't short of memory at the end (no failed allocations after start-up, 8.8 GiB available at the lowest), so memory pressure may be one way in but probably isn't needed. I've claimed the watchdog end on #533 and will post here what the stall turns out to be.Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-11-30T13:00:33Z.
@Jerkin42 an update that weakens what I posted last night. The repeat control (no padding, same build, same caches) survived its full 45 minutes, 35.6 of them in the world. So far on this build (RTX 5090), in minutes in the world:
Nothing here separates the arms yet: losses come at very different times, and one of three no-padding runs died early. I don't have evidence on NVIDIA that the padding prevents the loss, only one pair that went the right way. Three more runs are queued overnight (padding twice, control once more), then your clamp. I'll post the counts either way.
Imported from brcly/TuxBox. Originally posted by gtb-sbe on 2026-11-30T13:42:11Z.
@ReverendOzmund a correction to my answer above: on my card the stalled labels weren't the cause. A direct batch was refused (
inline ray scene or geometry changed after recording, rejecting submission), and after that the direct queue drops everything, so the lists that write those labels never run. That's the crash #566 fixes (merged this morning). Your build (f482572a+ #557 + #501) doesn't have it either, so it's worth checking whether your log has that line before the stalled labels.Imported from brcly/TuxBox. Originally posted by ReverendOzmund on 2026-11-30T14:40:19Z.
@gtb-sbe checked: run35 has it. "inline ray scene or geometry changed after recording, rejecting submission" and "direct queue rejected a guest command-list batch (0x80070057); its later batches are dropped" come about 1,200 lines before the first stalled label. That run didn't have #566; my two later runs with #566 have no rejection line at all. So that ending was the #566 crash here too, and the failed allocations just before it are probably a side issue, not the cause.
Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-11-30T15:07:08Z.
@Jerkin42 the overnight repeats are in (RTX 5090, one build, minutes in the world, 45-minute cap):
0x10de2f000, exactly the address of our 87a loss on an older build the day before (an older one, 0x10be2f000, is 32 MiB lower). With the map at a different place each time, a repeat like that points to a fixed title value rather than a random stale pointer.Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-11-30T18:02:22Z.
@Jerkin42 your clamp on the RTX 5090 (
fix/heap-index-clamp61580565 on mainba7680e5with our other PRs, the word an out-of-range index reads set to #572's null view;10de:2b85, 620.70.10, GE-Proton11-14):check --no-gpu13 of 13 passes; the device tests didn't run), and nothing on AMD.If the PR goes up I'll run the full checks on both cards at its head.
Imported from brcly/TuxBox. Originally posted by 1093i3511 on 2026-11-30T18:21:40Z.
@Jerkin42 @NickStallman, an RDNA 2 data point for the index-map padding. On an RX 6600 it does not stop the fault that ends my runs, which looks like a different family from the SQC one.
Setup: RX 6600 (8 GB,
1002:73ff, RADV / Mesa 26.3.1, GE-Proton11-14), host profilesection-import=substituted descriptor-bytes=64/16. Build:main87298944+diag/index-map-pad(4348e7ff), warm caches. Every run used Series S (ConsoleMode=96,Conole Type: Lockhart) withTUXBOX_XMEM_PRIVATE_VIEWS=1, launched back to back, alternating the padding.TUXBOX_INDEX_MAP_PAD0x8001e94f5000–0x8001e94ff000,0x8001e91fd000,0x8001e6ff40000x8001e99fc000,0x8001e99fd0000x8001e93f70000x8001e55dc0000x8002344b0000–0x8002344b20000x8001e7ffc000,0x8001e8df8000,0x8001e8dfd000,0x8001e91fa000–0x8001e91ff000index map padded to 134217728 entries.What every run has in common:
vkd3d_queueon ring 24. The client is TCP, not SQC, withPERMISSION_FAULTS 0x3andMAPPING_ERROR 0, so these are vector memory reads, not scalar descriptor loads.0x8001e5…–0x8001e9…, often the last pages just below a 2 MiB boundary (…e94ff000,…e99fd000,…e91ff000,…e7ffc000). Run 5's waiting at the account picker moved them to0x800234….e5d2e913without the padding, two earlier runs (Series S and packaged) faulted at0x8001e9df5000–0x8001e9dfd000and0x8001ed9fd000.So on this card it's 3 of 3 runs with the padding and 3 of 3 without, plus those 2 earlier runs. It looks like a read just past the end of an allocation, or in the last pages of something freed, so closer to @NickStallman's other family. Memory isn't exhausted at the time: requested VRAM is 5.7–6.0 GB, card GTT 7.8–8.6 GB and RAM 24.5–26 GB of 32. On an older base, #389 (title memory mapped past root SRVs and UAVs) removed this fault on this card in 3 of 3 runs.
Series S against packaged, on
e5d2e913with the same settings otherwise:Series S takes clear memory pressure off an 8 GB card. It doesn't change the ending.
Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-11-30T19:41:47Z.
A note on the setup behind our overnight runs on this issue (RTX 5090, 91a to 94b): they used a diagnostic build of vkd3d-proton, the commit GE-Proton11-14 ships (cae8353e) with tracing on and a timestamp patch, not the DLLs Proton installs. That affects timing, not which address faulted, but I should have said so. The next runs use GE-Proton11-15 and its own vkd3d-proton.
Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-11-30T22:41:07Z.
Corrected: I told @Jerkin42 and @ReverendOzmund to keep #572 out of their builds because of a descriptor stride bug. The bug is real but only for small paged heaps (it fails 8 Lanes suites); ProjectScarlett's heap is larger than 1,000,000 and takes the exact path, so your game results with #572 are not affected by it. Details: https://github.com/brcly/TuxBox/pull/572. The clamp alone passes all of plain main's checks on an RTX 5090.
Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-11-30T22:46:40Z.
@Jerkin42
fix/heap-index-clamp(61580565) on main40a69c3f(cherry-picked, no conflicts: da64064a), fullpython tuxbox.py check, GE-Proton11-15, without any of our other branches:10de:2b85, 620.70.10): 205 pass, 0 fail. Plain40a69c3f: 205, 0.1002:13c0, RADV): 204 pass, 0 fail. Plain40a69c3f: 204, 0.Our earlier 8 failures are not from the clamp; we think they come from our draft #572 in the same build, and the probe that isolates it is running.
Evidence: TuxBox check of da64064a21c6, no uncommitted changes, GPU 10de:2b85: 17 passed, 0 failed, 0 not run
Evidence: TuxBox check of da64064a21c6, no uncommitted changes, GPU 1002:13c0: 17 passed, 0 failed, 0 not run
Imported from brcly/TuxBox. Originally posted by 1093i3511 on 2026-12-01T07:19:45Z.
TUXBOX_XMEM_SECTION_WATCH=1(#573) withTUXBOX_CHECK_ONCE_PER_FRAME=1(#590) on the 8 GB RX 6600 (1002:73ff, RADV,section-import=substituted), main717a74c4, GE-Proton11-15, Series S. One run per setting. Presents per 10 s for the first six windows, from thepresented N frames in 10slines:TUXBOX_XMEM_PRIVATE_VIEWS=16e2c5dabthe default start went from about 170 to about 350 per 10 s, so the perf PRs roughly doubled it, but private views are faster again.GCVM_L2_PROTECTION_FAULT_STATUS 0x00641041,PERMISSION_FAULTS 4,RW 1) at0x8001cc8f5000and0x8001cb0e5000. There were also reads (0x00601031) at five more pages, all at offset 0x5000 in their 64 KiB block (0x8001c4f55000–0x8001ca7e5000). The ring was a compute one (comp_1.0.1). Its reset succeeded and the title's watchdog ended the game. In the runs I've reported so far, every fault was a read. One run doesn't tell whether the write comes from the opt-ins; I can repeat it with each one alone.Imported from brcly/TuxBox. Originally posted by brcly on 2026-12-01T15:14:22Z.
@1093i3511 thanks, that settles one question: on the RX 6600 neither the section watch nor once-per-frame checks change the start, and private views stay about 1.7x faster.
Note that
TUXBOX_CHECK_ONCE_PER_FRAMEis on by default sincee40d8052(on a 16 GB NVIDIA card it cut the digest of section-backed textures from about 1.2 s to 0.2 s per 5 s in the world, which is where it mattered there). Read residency and lazy publication became defaults at the same time, so the next comparison should be on current main.On the write fault: yes please, one run with each opt-in alone would tell whether it comes from one of them. It's the first write fault in your series, so it's worth pinning down.
Imported from brcly/TuxBox. Originally posted by 1093i3511 on 2026-12-02T20:58:53Z.
@brcly, the run with each opt-in alone that you asked for. RX 6600 (8 GB, RADV / Mesa 26.3.1, GE-Proton11-15,
section-import=substituted), Series S (--graphics-profile series-s), one run each, warm caches. Build:6d4f1cd7+ #647 (0bde5bb3), because current main stops at the start menu on this card (#533 issuecomment-7354129812).TUXBOX_XMEM_SECTION_WATCH=1 TUXBOX_CHECK_ONCE_PER_FRAME=0TUXBOX_XMEM_PRIVATE_VIEWS=1717a74c4) does not come back with section watch alone. One run, so it doesn't rule it out.memory ledger: card 7187/7195 MiBand7348/7356 MiB), on the title's abort path.With
TUXBOX_FRAME_LOG, most of the run after the intro starts was in slow frames (76–86 %). Their time is in the presenting thread's submits (46–65 %, placement 0.3–0.9 s per slow frame), while GPU queues wait at title memory waits (465 s with the defaults, 1,611 s with section watch, summed over the slow frames). None of those waits was released by the timeout.