GPU page fault (SQC data) and device removed when braking to a stop, 3 times on the same route (RX 9070 XT) #271
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/lobomfz--VIctory-xmem#271
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?
@joaowtrdev on GitHub · 2026-12-02 23:43 UTC · original
Setup
USE_SYSTEM_WINE=1), the repo's patched Mesa and vkd3d-protontools/wake-race.sh 30passes on this Wine (no damage in 30 s)VICTORY_UI_PLANE=3840x2160,VICTORY_CARD_PULL=0,VICTORY_PAGES_SEEN=1, lsfg-vk 2x (on in all three runs)What happens
While driving my usual route, the game freezes for up to a couple of seconds and closes with
device removed: 0x887A0005. It happened 3 times, on 3 builds, each time while braking to a stop: twice a few metres from the player's house on the way back, and once on a hard brake in the city.241c79ea51307797c995cAbout ten other runs on the same route that day ended normally, so it does not happen every time.
Kernel
The same fault each time, from the game's
vkd3d_queuethread:The address differs each time (
0x000080000d304000,0x00008000261b8000,0x00008000269fc000). The client is alwaysSQC (data)withRW: 0x0: a shader's scalar read, such as a descriptor or constant load, from a page that is no longer mapped. Crash 3 showsFAULT_STATUS 0x0060153B.VIctory's summary
All three say nothing of ours was running on the card:
the submitting thread was between submissions (nothing of ours was running on the card), of 0 lists, for 2019.9 msthe submitting thread was preparing a submission (nothing of ours was running on the card), of 3 lists, for 1.1 msthe submitting thread was preparing a submission (nothing of ours was running on the card), of 1 lists, for 37.2 msIn all three, the 96 "things done" listed cover the last 85–113 s, and every one is a texture sweep. They are host copies of textures the title fills,
held by its title texture alone (no list, no slot), plus staging buffers. That is 6.2–9.2 GB of host copies let go in that span, about every 1–2 s. The last sweep was 2–5 s before the fault. This churn may well be normal, so I am not claiming it is the cause. It is the only thing listed, and a scalar read of an unmapped page is what reading something that was let go would look like.Attached: the kernel lines and VIctory's full summary for each crash, with paths removed:
crash-1-241c79e.txt,crash-2-a513077.txt,crash-3-97c995c.txt.What I can test
VKD3D_CONFIG=breadcrumbsrun, which I already tried once, but that run did not crash.crash-3-97c995c.txt
crash-2-a513077.txt
crash-1-241c79e.txt
@DrArroway on GitHub · 2026-12-03 17:22 UTC · original
Reproduced the same
SQC (data)(0xa)PERMISSION_FAULTS: 0x3GPUVM page fault +0x887A0005on RDNA 2 today onmain(4e02e38), so this isn't RDNA 4-only and wasn't fixed bye92fd7a(#239).Setup & settings when it faulted
AMD Radeon RX 6900 XT (1002:73bf)(vram_mb=16368), RADV (repo patched Mesa + vkd3d-proton),GE-Proton11-157.3.7-1-cachyosVICTORY_BENCH=rt(CONSOLE=series-x,3840x2160output,VICTORY_FSR_4K=quality—4.1.2viaFSR4_UPGRADE=1at[2560, 1440]render,VICTORY_BVH_BUILDER=1,VICTORY_PARTS_ONE_CALL=1,VICTORY_KEEP_HOST_BUFFERS=1, default page moving on, no framegen)16:47:13Z→16:50:33Z; ~8.6 min from process start including initial pipeline prep)Kernel (
journalctl -k)Note
thread victory-submithit theSQC (data)permission fault, and the ensuinggfx_0.0.0ring timeout reportedthread page residency:VIctorylog right before the fault (~2 s earlier + last event)Right before
device removed: 0x887A0005, the texture pool was at92%budget andsweeplet go 588 host copies0.6 msbefore the fault:Auto-restarted control session right after (
2560x1440, noVICTORY_FSR_4K)run.shautomatically restarted the game withoutVICTORY_BENCH=rt(now2560x1440native, still withVICTORY_PARTS_ONE_CALL=1,VICTORY_KEEP_HOST_BUFFERS=1, RT on, and default page moving on), and that session ran for 21 minutes (16:50:46→17:11:44UTC) with 0 errors, steady8517 MBRAM /3521 MBVRAM (26.2median /26.5avg FPS across227samples viatools/session-fps.sh), and0.0allocators remade for age.@MJ26gaming on GitHub · 2026-12-04 18:02 UTC · original
Another occurrence of the same signature, this time standing still (no driving), on an RX 9070 XT with the hardware-RT stack.
Setup
setup.shmain0fd7614with LOCKhart07'srt-9-ledger(b0cbfd1) and #459 merged locally; release buildCONSOLE=series-x VICTORY_OUTPUT=1920x1080 VICTORY_FRAME_INTERVAL_MS=0 VICTORY_HW_RT=1 VICTORY_HW_RT_LEAN_BUILDER=1 VICTORY_HW_RT_REUSE=1, windowed, warm cachesTZ=Asia/Tokyo)What happened
~4.7 min in the world, steady ~44 fps before it (last 5 s line: fps=38.4, 4464 draws, gpu_wait 5.8 ms). Game log at the end:
Last memory lines before it:
HW RT loss counters were all 0. VRAM was not near the budget here (3.8 GB of the card free), unlike the 92% case above.
Kernel
Frequency
Once so far. Not reproduced in three later 300 s night runs (same scene, same build plus
VICTORY_REMOVAL_RANGES=1), nor in a 70 min daytime run of the same build plus #452. I'm now running withVICTORY_REMOVAL_RANGES=1so a next occurrence should name the title range behind the faulting card address; I'll add it here if it happens.@joaowtrdev on GitHub · 2026-12-04 19:38 UTC · original
Two more here, on the same RX 9070 XT as the original report. They're the first on my PR build. This time it was while driving normally through the city, not when braking.
Build: main
b2449c4with #354, #364, #376, #382, #385 and #445 merged in (no HW RT stack). Release build, system Wine, the repo's Mesa and vkd3d-proton. 4K output, FSR 4 Performance, RT on (VICTORY_BVH_BUILDERdefault), ML frame generation (mode 4),VICTORY_FRAME_INTERVAL_MSunset (so 30 fps since #400).What happened: about 3.5 min into the world. It was steady at 30 real fps standing, then dropped to 17 to 24 once I started driving. Then the game closed:
Kernel: the same status word as MJ26gaming's (
0x0070153B):Memory just before (9 s earlier):
As in MJ26gaming's case, the card had room (2.4 GB free, nothing moved down for room). The texture sweep had been letting go of about 196 MB of host copies every 3 to 4 s before it.
It repeated on the next run of the same build, about 5.5 min in and again while driving. Same status word
0x0070153B, page0x000080002537d000, 2590 MB of the card free, nothing moved down for room. The devcoredump of that second one is attached (the kernel names thepage residencythread as the one running when the ring timed out).It hadn't happened in my earlier runs on the PR build before this update, and this build is the first with #458 and #459. So I reverted those two (same build otherwise). The first run went about 7 min, 6 of them driving the same kind of route, without a fault, and I closed it myself. Same fps as before (20.4 real while driving).
That's one run, a bit past where the second fault hit, so it's not proof. My first faults (in the report above) were also from before #459 existed. But MJ26gaming had #459 merged locally when theirs happened too. I'll do a longer run on the reverted build, then put back one PR at a time, and add what I find here.
devcoredump-20261204-1622.txt
@joaowtrdev on GitHub · 2026-12-04 20:05 UTC · original
Follow-up: it points at #459 here.
On the same build as above, with #458 put back and only #459 reverted (main
3fe840cplus my PRs,pool.rswithout the tight-alignment commits), I did a 20 min run, 19 min of it driving the same kind of route. It had no fault, and I closed it myself.It's still few runs, and this fault was rare before #459 too (my first reports here predate it). But the description of #459 says the earlier 4 KiB placement was taken out after two device losses on 2026-11-25 without a proven cause. MJ26gaming also had #459 merged when theirs happened. So the tight alignment may raise how often it happens on RDNA 4, where
tier=1makes it active (on NVIDIA/WARP the tier is 0, so it never runs there).The log on the faulting build had
pool: the host's tight alignment tier tier=1. I'm staying on the build without #459, and will report if it faults there. If there's a switch or a diagnostics build that would help pin it, I can run it.@MJ26gaming on GitHub · 2026-12-04 23:44 UTC · original
Another one here, with
VICTORY_REMOVAL_RANGES=1on, and a switch to turn #459 off.The fault. Main
b2449c4plus the HW RT stack and #452 (so with #458 and #459, tight alignment tier 1). RX 9070 XT, RADV, Mesa 26.3.1. 1080p, standing in the city, about 5 min in the world:What the range report rules out. The page is not in title memory on the card: the lowest mirrored title range was
0x8004a0600000. It is also not in any of the 1334 live or 1024 most recently dropped buffers the report lists (upload buffers, HW RT buffers, retired resources). The nearest listed buffer started about 6 GB away. The report says textures and their blocks have no address in it, so a texture or texture block is what's left. That fits #459, which changes how textures are placed.The pages so far. Both of ours,
0x800021c18000and0x800024b28000, and the four reported above (0x80000d304000,0x8000256c1000,0x800027514000,0x80002acad000) are all within the first ~700 MB of the0x8000_0000_0000region.A switch.
VICTORY_TIGHT_ALIGNMENT=0makestight()inpool.rsreport tier 0, so textures are placed at 64 KiB as before #459. It's one commit (7 lines) on current main: https://github.com/MJ26gaming/VIctory-xmem/tree/tight-alignment-switch. The log then sayspool: tight alignment off (VICTORY_TIGHT_ALIGNMENT=0): 64 KiB placement. Here it made no difference to frame rate: 43.2 fps with it off, against 43–44 with it on, in matched 300 s runs.What didn't settle it. #522's
VICTORY_VRAM_FIRST=1moves far more pages: about 1,400 CPU-read demotions and about 3,400 promotions in the 40 s before the fault. With it on, one run faulted the same way (0x0060153B, SQC data, page0x8000001ad000, again low in that region) about 45 s in. That was 1 of 8 runs with it on, though. The six that followed, three with tight alignment off and three with it on, were all clean. So it doesn't reproduce the fault reliably, and I have no on/off evidence beyond yours yet. I'm playing with the switch off and will report if it faults that way.@shaina94 on GitHub · 2026-12-05 06:57 UTC · original
Same
SQC (data)fault, 8 times in one evening on an RX 9070 XT. Here it went away with ray tracing off (VICTORY_BVH_BUILDER=0). Neither page moving, the tight-alignment switch, a longer retire lag, a reboot nor rolling back our changes made a difference.Setup
3fe840cand laterb581f7e(release)VICTORY_PRESET=medium,VICTORY_PAGES=0, 4K output withVICTORY_UI_PLANE=3840x2160, FSR balanced, frame generation on (VICTORY_FIDELITYFX_FRAMEGEN=1, later4),VICTORY_SKIP_BINK=0The fault
The same signature each time, from the game's
vkd3d_queuethread:The status words were
0x0050153B,0x0060153Band0x0070153B. The pages in the reports I saved were0x8000220ad000,0x8000219e5000,0x8000009fd000,0x8000224c9000and0x800010765000, so they too are all in the first ~700 MB of the0x8000_0000_0000region, like the ones above.Runs
"Minutes" is time in the world (frames with over 1000 draws). The game was often in the background while I answered chats, so they aren't play time.
3fe840c3fe840c3fe840cb581f7eb581f7eb581f7e3fe840cb581f7eb581f7eVICTORY_BVH_BUILDER=0The last runs were the "Coming Home" mission (in a bar). It faulted there on every attempt with ray tracing on, and got through it with ray tracing off in run 9. The other runs were mostly driving in the city. Earlier that day, four shorter runs (5 minutes or less in the world with ray tracing on, 8 minutes with it off) had no fault.
So it's 8 faults in 11 runs with ray tracing on, and none in 2 runs with it off. That's not many runs with it off, but it got past the spot that had faulted on every attempt before. It also matches AxolotOfficialYT's RX 7700 XT in #239, which ran 57 min clean with RT off and faulted 15 min after turning it on.
What didn't help
VICTORY_BURY_LAGinhost::bury()and holds objects let go for 1024 submissions instead of 128 (about 4 s at ~250 submissions a second; host lists still reset after 128). It still faulted, so the page probably isn't an object that was let go a few seconds earlier. In run 5, the last sweep before the fault let go of 9 host copies 2.5 s earlier, while that lag still held them.Before each fault
In every report, the last of the 96 things done were texture sweeps letting go of host copies, from 1.1 ms to 5 s before the fault. VRAM was at 88% to 95% of the budget each time. As joaowtrdev wrote, this may well be normal churn.
I have the full logs and the kernel lines for each run, so I can post any of them. I'm playing with ray tracing off for now. If there's a diagnostics build (
VICTORY_D3D12_DEBUG=1) or a switch that narrows down which ray-tracing pass is reading the page, I can run it with ray tracing on.@EdouardSence on GitHub · 2026-12-05 17:37 UTC · original
A narrowing from the addresses, which may rule out the texture / #459 lead.
Every faulting page reported here is in RADV's 32-bit address window. libdrm puts the first 4 GiB of the high VA range (
0x8000_0000_0000as the kernel prints it) in its own manager,vamgr_high_32(amdgpu/amdgpu_vamgr.c,start = high_va_offset; max = start + 4 GiB). RADV asks for that window only for BOs flaggedRADEON_FLAG_32BIT. Everything else goes tovamgr_highabove it (libdrm falls back to the 32-bit window only if the high range cannot place a request). All pages in this thread and #594 (0x8000009fd000…0x80002b335000) are under+0x2c00_0000.What RADV (
fec8830, this repo's Mesa) puts there:PREPROCESS_BUFFERusage (radv_buffer.c:97,:196): vkd3d-proton's descriptor heaps, and its DGC preprocess scratch for ExecuteIndirect (vkd3d/device.c~3409; the scratch goes back to the device on allocator reset,command.c~2981)radv_cmd_buffer.c:1518, 16 KiB first, then doubling)Images are never placed there:
radv_GetImageMemoryRequirements2masks out the 32-bit memory types (radv_device.c:1793). The title-range mirrors (umarena,AMDGPU_VA_RANGE_HIGHwithout 32-bit inpatches/mesa.patch) aren't there either. That fits MJ26gaming's range report finding nothing near the page. It also fitsSQC (data)withRW: 0, which is a scalar load: descriptors, push or root constants, or a DGC-generated stream.Which BOs come and go in that window: 2 min run with
RADV_DEBUG=bo_history(writes/tmp/radv_bo_history.log), RX 9070 XT,main8bf4878, mostly boot and menus:0x8000_2764f000(~630 MB), which matches "all faults within the first ~700 MB"So the likeliest candidate is a use-after-free of a command buffer's upload BO, or of DGC preprocess scratch: memory that RADV or vkd3d frees when a D3D12 allocator or list is reset. That would mean an allocator reset, or a list freed, while something recorded from it is still running. This is a hypothesis; I have not found the site. It doesn't explain the RT-on correlation by itself. It does fit shaina94's run 5: a longer bury lag didn't help, but "host lists still reset after 128".
A test that would settle it, for someone who reproduces with RT on:
RADV_DEBUG=bo_history, then look the fault page up in/tmp/radv_bo_history.log. A range that was created and thendestroyed=1before the fault is a use-after-free, and its size says which kind (16/32 KiB = command buffer upload). It flushes on every BO event, so expect some slowdown and a log that grows by a few MB a minute.#594 is the same signature (
SQC (data),0x60153B, texture sweeps before it).(Checked with Claude Code; run and log on my machine.)
@goldfishdev on GitHub · 2026-12-05 18:57 UTC · original
Thanks for the detailed reports. I added a diagnostic switch in #615:
VICTORY_POOL_TIGHT=0places textures as before #459, at 64 KiB multiples. It did not reproduce here in 22 minutes of RT-on 4K city stress, so it needs a save that faults. Could you run your failing route withVICTORY_POOL_TIGHT=0and say whether theSQC (data)fault still happens? The log should saypool: tight alignment off.