RX 9070 XT + Ryzen 5 5600X: test notes (VICTORY_GPU_UPLOAD hangs, a DirectStorage read failure, a progression blocker) #211
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/Belobug--VIctory-Belobug-AMD#211
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?
@lorddie on GitHub · 2026-11-25 23:35 UTC · original
Thanks for this fork; on my RX 9070 XT it is the best result so far. Notes from one evening of runs, in case they help. I have only release-build logs, so I have no breadcrumbs for the hangs.
Machine: RX 9070 XT 16 GB (Smart Access Memory on), Ryzen 5 5600X (6 cores), 32 GB RAM, Windows 11 26200, Series X profile,
VICTORY_HAIR=1. Builds:000ffdd4and later4f62c2a5.1.
VICTORY_GPU_UPLOAD=1: smoother, but the device hung twice. With it (gpu_upload=truein the log) the stutter went away: the worst frame went from 579 to 187 ms, and "on the GPU" went from about 21 to 2 ms per frame. But both runs with it on ended in0x887A0006(device hung): one after about 3.5 minutes in the world, one after about 25 minutes during the boat mission. Five runs without it, about 80 minutes in total, had no hang. With it on, the skin and tattoo noise on people also comes back: always without commita208d61dfrom #139, now and then with it. I would keep it off by default.2. DirectStorage: an uncompressed read straight into guarded title memory can fail. On myokex/victory-amd (
070df42), twice at about 4 minutes in:dstorage: request failed: copying options=0x0 ... hr=0x800706f8(ERROR_INVALID_USER_BUFFER), and about 0.25 s later the title stops on its fatal-errorint3at+0x22106e0(called from+0x2219650). It looks like a guard set again while the kernel read is in flight. This fork has the sameinto_destination(... read_into ...)path foroptions == 0. I did not see the failure on this fork, because I patched it first. The patch reads into a buffer of ours and then copies, so the write goes through the guards like the title's own writes (fxceless/victory-fork reads into a separate buffer first in the same case):3. A progression blocker with #139 combined with #56, #61, #62 and #63. On
000ffdd4with those five merged, the pistol in the prison prologue is not drawn, and the "hold LT to aim" step never completes, so the story stops there. Plain000ffdd4and4f62c2a5pass it. I have not isolated which of them causes it.a208d61don its own is fine.4. Action scenes. On
000ffdd4, frames went from 6–7.7 fps to 0.5–2 fps when the action started. "copying back" went from about 15 ms to 120–220 ms per frame, and "preparing" from about 55 ms to 250–330 ms.@adrianmjim on GitHub · 2026-11-26 19:51 UTC · original
Checked point 2 on this fork at
4f62c2a, natively, without the game (RX 7900 XT, Windows 11 26300). The same window exists here, through the fast path ofguard()in watch.rs.into_destination(dstorage.rs:822-828). That callskernel_will_write(dstorage.rs:964), then a synchronousReadFileinto the title's address (read_into, dstorage.rs:925-949).kernel_will_write(watch::writing, watch.rs:709-717) opens the blocks and pins them for 2 s.guard()honours the pin (watch.rs:475). The fast path (watch.rs:429-450) runs when the first block of the checked range is still guarded. It does not look at pins. Any open block in the range goes back toPAGE_READONLYthroughprotect(), including a pinned block that the kernel is still reading into.2bfe95a. The pins came a day later in579a8d9, which changed only the slow path. The fast path also never prunespins(pruning is only at watch.rs:463-466).Local unit test (not pushed): I guarded two blocks of a pagefile view with
guard(). Then I calledwriting()into the second block,guard()again on the same range (this takes the fast path), thenReadFileinto the second block.4f62c2athe second block is read-only again, andReadFilefails with 998 (ERROR_NOACCESS, 0x800703e6). It failed in every run.watch::tests (3 runs, interleaved with base runs).What I could not confirm:
ReadFileinto a read-only view gave 998 in every case I tried: buffered and unbuffered, 64 KiB to 16 MiB, the whole range or only its last 64 KiB read-only.PAGE_GUARDgives 0x80000001, and the guard code in watch.rs does not use it. So I cannot say the myokex failure is this exact race.The same window applies to the title's own
ReadFileandfread, which also callkernel_will_write(files.rs:530, 538).Point 1, from the code only:
VICTORY_GPU_UPLOAD=1also needsGPUUploadHeapSupported(host.rs:402-412). It changes onlyupload_buffer(). That uses the GPU upload heap while VRAM use plus the new buffer stays under 85% of the budget, and otherwise the normal upload heap (host.rs:3423-3456). It has been off by default sincea049b48.From reading only: the
rx9070xtbranch (81ebb7b) does not seem to have this window.into_destinationholds akernel_writingguard across the read (dstorage.rs:1595-1600). While it is held,guard()leaves that range's blocks open (left_alone, watch.rs:1730). There is a test for this case:a_refresh_leaves_open_what_the_kernel_is_writing(watch.rs:2858). I did not build or run that branch.I have the test and the change as a local patch if they are useful.
@lorddie on GitHub · 2026-11-26 20:04 UTC · original
Thanks for digging into this. A data point from tonight: about two hours of play on this card, one hour on avatarmanz/VIctory-7900XTX at
a9400a6dand the rest on Belobug'srx9070xtbranch atcd8dfc06(Series S and Series X, the boat mission included), with no DirectStorage failure in any log (no0x800706f8, no 998). That fits your reading ofrx9070xt. I haven't gone back to4f62c2a, where I saw it, so I can't confirm the fast-path race in play, but if you open a pull request with your test and change, I'll run it there.@adrianmjim on GitHub · 2026-11-26 20:10 UTC · original
@lorddie thanks for the play data. The change already exists as a pull request: #60 (romainhedouin) makes
guard()'s fast path honour the pins, the same way the slow path does, and adds aReadFiletest. I've just run it on Windows (results there):watch::andvictory-gputests pass.So #60 on
4f62c2ais the one to try. #237 is a different approach to the same symptom (it retries a rejected DirectStorage read through a staging buffer), if you want to compare.@adrianmjim on GitHub · 2026-11-26 21:47 UTC · original
On #237, for comparing the two: as measured there (#237), #237 restages a read only on 1784 (
0x800706f8, protection changed while the read is in flight). The race #60 fixes gives 998 (the block already read-only before the read starts), and the #211 reproduction still fails with 998 on #237, 3 of 3. So #237 does not cover this case, and #60 is still the fix for it.@adrianmjim on GitHub · 2026-11-26 22:24 UTC · original
@lorddie an update: #60 is closed. The maintainer's line is now
a-publier/rx9070xt, and that line has no time-based pins: kernel writes are scoped (kernel_writing) and every path that makes a block read-only again checksleft_alone, the fast path included. So the race is only onmain, which fits your two hours onrx9070xtwithout a single 998 or0x800706f8. Unless it shows up again on that line, there is nothing left to test here.