XG CopyFromSubresource: retail title passes one argument more → memcpy AV in copy_from; then null write at game+0x23cf683 at end of loading #662
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl#662
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?
@Arvi23 on GitHub · 2026-11-24 03:03 UTC · original
Title: XG
CopyFromSubresource: retail title passes one argument more → memcpy AV incopy_from; then null write at game+0x23cf683 at end of loadingTitle ID: (
game_scarlett_master.exe)Setup: Windows 10 IoT, RX 9070 XT (16 GB), Ryzen 7 5800X3D, 32 GB RAM, Agility SDK 1.620.2, DXC 1.9.2609, xcl
main@3db536e, reproduced again ondd2ae9a(same stack, now after 77 s instead of 142 s)The title boots, plays its intro, loads at a steady ~30 fps (since the texture-upload PRs of today), with audio, 15k+ draws through translated pipelines (0 skipped). Two separate crashes follow, one after the other.
1.
CopyFromSubresourcegets one argument more thanxg.rsassumes → AV incopy_fromStock
main, every run, when the loading screen is about to finish:The return address resolves (
llvm-symbolizer+ xcl.pdb, earlier build) toxcl::hle::xg::copy_from: the 2D row loop,dst + y * row_pitch.copy_fromloadsrow_pitchfrom the 6th argument as declared, but the title puts a pointer there (e.g. 0x3a3e9000, 0x458b9000: page-aligned low halves), so rows land ~1 GB apart.Logging the raw stack arguments (
copy_from(p, dst, plane, sub, a5, a6, a7, a8)) on two calls:CopyIntoSubresourcematches the declared layout (row pitch 0x100, slice pitch 0x8000for 256 B × 128 rows), so only slot 9 differs.Workaround patch (attached):
copy_fromtakes the arguments raw; if a6 is no plausible row pitch but a7 is, pitches = a7/a8 and src = a6 (when readable), logged. With it, the AV is gone and the copies loglayout shifted by one, src 0x18397db9000, row pitch 0x800, slice pitch 0x40000.2. Null write in the title at the end of loading (with the patch)
dd2ae9a+ patch), independent of memory load (92–97 %, also with 2.4 GB free) and of whether the copies read a5 or a6.dd2ae9a+ patch the title gets further before it: presents stop at 1647 (~56 s, end of the loading screen), then ~70k Opus packets of in-game audio play for ~50 s while large compute PSOs build in the background (806 KB DXIL in 14.8 s, 499 KB in 17.4 s). Right before the crash the present thread logs threeWait64BitValueX timed out after 2000 ms at 0x70417fe58 / fe10 / fee8 (op 7, want 0x673, memory holds Some(0)). 0x673 = 1651, i.e. about the next frame number, so the GPU write that signals the frame never lands. No such timeouts on3db536e. Maybe the new "ExecuteIndirect with a pipeline still being built is skipped" (2d9a9fe) skips work that would have written it?Logs and report.json of the patchless run and of the patched run attached.
Side note: the title's Backtrace crash reporter uploads ~26 MB minidumps to
submit.backtrace.iothrough XCL ({"response":"ok"}in the log); I blocked xcl.exe outbound in the firewall. XCL might want to refuse that host like other layers do.xg-copyfrom-raw-args.patch
xcl.log
report.json
@pickles976 on GitHub · 2026-11-24 03:19 UTC · original
The end-of-loading "
null write at game+0x23cf683" in the title is the title's deliberate self-kill, not a second bug — that instruction is an unconditionalmov dword ptr [0], 0x4d8bd421on the stall-watchdog path (decoded in #534: report call → tagged null-store exit). So only thecopy_fromarg-count AV needs chasing; the null write is what the title does to itself after things stall.@itsd-effex on GitHub · 2026-11-24 03:31 UTC · original
The call site explains a5, and a Linux (Wine) data point.
Call site.
A newer retail game1.0.2.1, the call whose return address is thegame+0x979f5bin the stacks above (image offsets):0x700000000in the table is a literal0plus stale bytes. The same goes for a7's0x13e_prefix.UINTbefore the source,(dst, UINT, UINT, UINT, const void* src, UINT row_pitch, UINT slice_pitch), and a6 is always the source. A fix can read it there unconditionally, without checking which pitch looks plausible (the 7-argument change in #539 does this).Linux, same crash
dd2ae9a+ #273 (BC1), release build, cross-compiled with cargo-xwin.0xc0000005 in ucrtbase.dll+0x171d9 (write at address 0x80a337150),rax=0x45999000 rbx=0x800 r13=0x40000, stackxcl.exe+0x2f0720, game+0x979f5b, game+0x4fb0c2f, game+0x50bb3f0, game+0x979db0, after 1614 presents (~184 s).copy_fromthat skips a destinationdstorage::writablerejects (not a fix), the same two copies as in your table loggedrow pitch 0x45999000(128x128 x 16 B) and0x46145000(32x32 x 8 B), the low halves of a6. There was no AV. The run then went on, with a black screen, and the process exited with code 1 about 15 s later, with no crash line inxcl.log.Not tested: #539 itself. Native Windows.
AI use: Claude Code (Claude Opus 5.5) disassembled the call site, read the logs and drafted this comment. The runs are mine, on the hardware above.
@MonkeyPython on GitHub · 2026-11-24 03:35 UTC · original
NVIDIA corroboration from this host (RTX 3080 Ti, driver 621.01, Windows 11 26300), plain main
dd2ae9a, scripted-input loading runs:The
Wait64BitValueXtimeouts occur here too, at the same addresses. In 1 of 4 runs (xcl-gta-dd2load3), four timeouts at0x70417fe58 / 0x70417fe10 / 0x70417fe68 / 0x70417fee8, allop 7,mask 0xffffffffffffffff,memory holds Some(0),want 0x65b(this issue's run wanted0x673— same fence slots, different progress value), each flanked by long compute-PSO builds (1606 ms / 1262 ms). The other three runs at the same commit have zero such timeouts. So the waits are timing-dependent, not every-run, on NVIDIA.The null-write registers are byte-identical across vendors and drivers. Three of our runs (two on 621.01, one on 621.24, commits a6f5f7a/dd2ae9a) all show
rax=rbx=rbp=0,rcx=0x70024c348,rdx=0x1,r8=0x7074d8c40,r9=0x7074d8e20,r10=0x7074d8ad8,r11=0x7074d8c40,r13=0x146845c28,r14=0x7ff810d9b220atgame+0x23cf683— matching this issue's table and the "deliberate self-kill / tagged null-store" reading: the faulting store's inputs are deterministic, not heap noise.The
copy_fromVCRUNTIME write AV (+0x1cc83) does NOT reproduce on this host — no such line in any of our 8+ retail logs ata6f5f7a/508a0c7/dd2ae9a. (One 4-thread run showed a different VCRUNTIME read AV at+0x1bc5b, n=1; not claimed as the same fault.) So the 7-arg ABI mismatch may be title-version- or timing-dependent, or this host's runs die on the null write before reaching the late-loadingCopyFromSubresourcecalls.On the ExecuteIndirect-skip question: the timeouts above happen on a build that includes
2d9a9fe; withmemory holds Some(0)while multi-second compiles run, "work not written yet" is consistent with what we see, but the 1-of-4 occurrence means we cannot confirm the skip causes it from this host.Not tested: the
copy_fromargument dump (no repro here), RX 9070 XT, Wine/Linux.AI use: Gentle Shell (Pi coding agent), model qwen4-max: ran the title and wrote this report from the logs; a human reviews it before posting. No code changes.
@jimokulou2-ops on GitHub · 2026-11-24 03:48 UTC · original
Same card (RX 9070 XT). I took the end of loading apart step by step with #533 and #267 and found the stall that comes after them. Written by Claude Code (Claude Opus 5.5), which built the trees and read the logs; I drove the pad on my machine.
Setup: Windows 11 Pro 10.0.26300, Ryzen 7 9700X, RX 9070 XT (RDNA4, Adrenalin 26.11.2), Rust 1.100.0, release,
XCL_NETWORK=0. Retail title v1.0.2.1 with a save that has finished first boot (A → intro → loading → world). Runs are local merges ontomain91f9a5e, all with yourxg-copyfrom-raw-args.patch.XCL_THREAD_DUMP_ATwas used during the black screen.+0x23cf683at 106 sa966993)compute pipeline … still building after 3813 ms – proceeding with stand-in, one ExecuteIndirect skipped; still black043d1f7)not built after 4.0 s … goes with its stand-in; still blackXCL_PSO_WAIT_MS=1 XCL_COMPUTE_PSO_WAIT_MS=1What blocks the title's threads
pso_async::resolve_waitat the dump taken during the black screen. One arrives frombind::graphics_bound, the other fromresolve_for_indirect. The graphics side waits without a limit, andresolve_for_indirectkeepsresolve_waitfor graphics pipelines.bind.rs(execute_indirect) and in the tests ofpso_async.rs. I kept #533's skip inexecute_indirectand maderesolve_for_indirectuse #267'sresolve_for_drawfor graphics pipelines.resolve_for_drawinstead. The limit applies per draw, so a frame that meets several pipelines still building waits 4 s for each of them, and the watchdog fires anyway. Only with a near-zero limit does the title stay alive.What comes after: the frame signal is never written. With the 1 ms limits, from 126 s on, the log shows:
That matches what you saw (
want 0x673, memory 0). The value the wait wants is about the frame number. These waits are resolved on the CPU before the list is submitted (wait_all, 2 s). If the write they wait for is in a list submitted after them, or on a queue that is itself held, it never lands. On this card that looks like the second wall after the pipeline stalls.Two more crashes during loading. These came on the save path.
XG CopyFromSubresourcewas never called in these runs, so they are notcopy_from:unhandled exception 0xc0000005 in VCRUNTIME140.dll+0x1a5fb (read at address 0x1df48444000)twice, at 50 s and 56 s, withrcx=0x15c000 rdx=0x1df48440000 r8=0x160000: a 1.4 MB copy that runs into unmapped memory after 16 KB. The stack scan printed nothing. I have a local build that keeps system modules in the scan, but the crash has not come back since.dd2ae9a(before your patch) ended withVCRUNTIME140.dll+0x1b444 (read at …)at the end of loading. That may be yourcopy_fromcase in its read form.Rerun on current
mainf4ce27c, with #690 (pipeline preload) and your patch only. Same black screen; the watchdog comes 20 s later (126 s instead of 106 s). Earlier runs' driver blobs are reused (compute pipelines made from the driver's blob of an earlier run). In the dumps at 105 s and 120 s, four title threads are inpso_async::resolve_for_bind→resolve_wait, which is the unbounded compute wait on bind that #533 changes. So on currentmainthe order is the same: compute binds (#533), then graphics draws (#267, with a limit per draw that is too long here), then theWait64BitValueXsignal.Not tested: #533 / #267 on top of
f4ce27c; a run with the 1 ms limits that keeps going until the waits clear on their own; NVIDIA.@am-cob on GitHub · 2026-11-24 04:14 UTC · original
I traced the three zero-valued
Wait64BitValueXtimeouts on an RTX 4070 Ti SUPER under Proton Experimental and vkd3d-proton. Two offline runs on a local build based oncb868b2found a matchingWrite64BitValueBottomOfPipeXfor every address and value. The three writes belonged to two command lists.In the run with independent fence and memory sampling, the title recorded the writes at 100.758–101.418 s. Both producer lists had closed by 114.153 s. The same submission thread handed XCL the two consumer lists first, on different queues. It spent about six seconds in the three CPU-side waits. They expired at 116.163, 118.172 and 120.174 s, each reading zero while waiting for 1,595.
XCL received the first producer for submission at 120.174 s and the second at 120.180 s. Both reached the same native queue by 120.186 s. By the 120.347 s poll, both private queue fences had passed and all three words in coherent memory read 1,595. In the other run the two native submissions likewise followed the last timeout by 7 and 12 ms.
The guest still ended at
+0x23cf683at 130.954 s, over ten seconds after the values were visible. This gives #708 a concrete ordering case to compare. These runs used the existing wait implementation with diagnostic instrumentation. We haven't tested #708 on this configuration.OpenAI Codex (GPT-6) instrumented the local build, ran the comparisons and analyzed the logs.
@Royalflamejlh on GitHub · 2026-11-24 05:26 UTC · original · edited 2026-11-24 05:27 UTC
Linux / NVIDIA data point for both halves of this issue: #684 removes the
copy_fromAV here, and the stall that follows is title threads waiting inpso_async::resolve_wait(thread dumps below). NoWait64BitValueXtimeouts in any run.Setup: Fedora 44 (kernel 7.2.9), Wine 11.21 Staging (Wayland driver), vkd3d-proton 3.1 with the relaxed-vtable patch from #175 and a local dxil-spirv patch,
VKD3D_CONFIG=ignore_shared_fence. RTX 4070 (12 GB, driver 615.71.09), Ryzen 9 9950X3D, 64 GB RAM. xclmain@f4ce27c, release, cross-compiled tox86_64-pc-windows-gnu(rustc 1.98.0), DXC 1.9.2609.5,XCL_NETWORK=0. Same title as this issue, first boot (no save), one A press at the account screen (~45 s), then loading.copy_from: same AV on stockmain, gone with #684Stock
f4ce27c, 1 run:xcl.exe+0xa78e8is insidexcl::hle::xg::copy_from(nmon this build). Same game frames and the same 0x800 / 0x40000 pitches as the report above; 1886 presents before it.f4ce27c+ the diff of #684 (heade56dbc3, applied withgit apply, uncommitted), 3 runs: no AV, and the PR'sCopyFromSubresource invalid spanwarning was logged 0 times, so the copies went through with the 7-argument layout.All 3 runs with #684 end the same way:
game+0x23cf683(write at 0x0) at 120.6 sRun 2 had
XCL_THREAD_DUMP_AT=97,105,113. Title threads with XCL frames in those dumps (xcl.exe frames named withnm):bind::set_pipeline_state→pso_async::resolve_for_bind→resolve_wait→ the build job run on that thread →real::build_compute→translated_compute_pso→d3d12core.dll(vkd3d-proton) →winevulkan.dll. 1 thread inbind::execute_indirect→resolve_wait→real::build_graphics→translated_graphics_pso→retry_without_rect_gs→d3d12core.dll.set_pipeline_state→resolve_for_bind→resolve_wait→Condvar::wait.resolve_waitas above, 2 inresolve_wait→Condvar::wait.So this matches what @jimokulou2-ops found on the RX 9070 XT: the unbounded compute wait on bind, plus here one graphics wait through
execute_indirect. In run 2, after 88 s, 14 compute pipelines took ≥ 1 s each to create (46 s in total, the longest 10.7 s for 491 544 B of DXIL), so on vkd3d-proton the time goes into pipeline creation itself.Reruns do not shorten it:
the pipelines of N shader sets an earlier run used are built aheadwent 42 → 93 → 273 over the three runs, with the stall at the same place. XCL's driver-blob cache logs0 KBfor every blob here (8 driver blobs kept on disk for the next run (this one: 290 ms, 0 KB)), so nothing is reused from it on vkd3d-proton.Not tested: #533, #267, #708 (the first two do not apply to
f4ce27cwithout conflicts); native Windows; AMD; thecargo testsuite on the #684 tree; a run with a finished save.AI use: Claude Code (Claude Fable 5.2) ran the title on my machine through a scripted virtual XInput pad and
XCL_PRESS_AT, applied #684 locally, read the logs and thread dumps and drafted this comment. I reviewed it before posting.@Royalflamejlh on GitHub · 2026-11-24 06:08 UTC · original
Follow-up to my comment above: with #533 and #267 merged onto
main@beaa245, no title thread waits inpso_async::resolve_waitany more on Linux / RTX 4070, and the title still stops presenting at 104–106 s and is ended by its watchdog atgame+0x23cf683. What holds it now is #267's graphics wait, taken draw after draw.Setup: same machine and title as above (Fedora 44, Wine 11.21 Staging, vkd3d-proton 3.1, RTX 4070, driver 615.71.09), first boot, one A press at the account screen. The pull requests were merged locally in the order shown; #533 and #267 conflict with
mainand with each other, and how I resolved them is under the table. Thread dumps at 97, 105 and 113 s. 1 run per row.e50836b+ #684 + #533 + #2670x887a0005at 123.5 sgame+0x23cf683(write at 0x0) at 131.5 sbeaa245+ #684 + #533 + #267game+0x23cf683(write at 0x0) at 135.6 sMerge choices:
Pendingkeeps bothmain'skey/usedand #533'stimed_out, and lazy pipelines go through #533'senqueue. Inexecute_indirect, where both pull requests replace the sameresolve_wait, a compute pipeline takes #533's per-frame bound and a graphics one #267's 4 s limit. #708 conflicts withbeaa245and is not in the third tree.Pipeline waits are bounded, and one after another they still stall the frame
In the dumps of all three runs, every title thread inside
pso_asyncwas inCondvar::wait_timeout, underresolve_compute(#533) orresolve_for_draw(#267). None was building a pipeline itself.On
beaa245, at 113 s, 5 title threads were inresolve_for_draw(4 throughexecute_indirect, 1 throughdraw_instanced), and 1 was still there at 135 s. The log has 10 waits of 2 s or more (the longest 3.9 s) and 10 waits that reached a limit. After 110.3 s the queue got 6 submits in 28 s:So the limit holds for one draw, and a list that uses many pipelines for the first time still takes longer than the watchdog allows.
Wait64BitValueXOn
e50836bthe thread that submits command lists was inexecute_with_waits→list_x::wait_allin all three dumps and logged 14 timeouts, one every 2 s from 97.4 s until the device was removed:With #708 there were 0 timeouts and no device removal; its gate logged
still waiting on the memory condition after 2 s; leaving the queue blockedonce, at 107.3 s. Onbeaa245(with #795 and #797) there were 0 timeouts, 5 waits were logged asbridged to GPU queue.Wait, and no thread was in a 64-bit wait in any dump.AI use: Claude Code (Claude Fable 5.2) merged the pull requests locally, ran the title through a scripted virtual pad, read the logs and thread dumps and drafted this comment.
mainreaches on Windows; the obstacle is replaced vtables — proposal: proxies #175mainreaches on Windows; the obstacle is replaced vtables — proposal: proxies #175@KricsDavid on GitHub · 2026-11-24 07:51 UTC · original
Cross-queue
Wait64BitValueXcycle: broken on the CPU, the GPU then waits until the device is removed (1.0.2.1, RX 9070 XT)Thanks for #795/#797 — they moved this title a long way. Reporting what the new fence bridge does
on this machine, because the cycle-breaking path is where the run ends now.
Setup: Windows 11 Pro 26300, Ryzen 7 5800X3D, 32 GB, AMD RX 9070 XT (driver 32.0.32029.2010),
DXC 1.9.2609.5, retail title 1.0.2.1, release build, plain
maina1672ef/1ec4c98.Runs local,
XCL_NETWORKuntouched, no DRED unless noted.What works now. With #795 the title gets through its loader and reaches its loading screen at a
steady 30 fps:
console code so far: 52672 draws with translated pipelines (0 skipped …), 5054PresentXcalls in a 180 s run, 881 translated pipelines, no fallback draws. The screen is black,but the renderer runs and the Rockstar service calls start (
no Xbox Live (0x80072EFD)).Where it ends (three builds, same title, same evening):
a1672ef(bridge #795/#797)D3D12.X: Write64 Signal at 0x70417fef8 = 0x695 on q1/ty0 would close a GPU cycle (waiters=[q3(after_w64)]) – signalled on CPU, thenD3D12 device removed: 0x887a0006; DRED:list … 0 of 16 operations doneon four lists of the same queue0x887a0006a few seconds later — the GPU waits on a signal that then never comes6025201+ #866 (late-release)Wait64BitValueX timed out after 2000 ms at 0x70417fe58 (op 7, want 0x8f8, mask 0xffffffffffffffff; memory holds Some(0)), three of them 2 s apart, then the title's stall watchdog (0x00000000c0000005, write at 0, at+0x23cf683)So the two halves are complementary and neither is enough: the bridge keeps the title's threads
moving but its CPU-side cycle break leaves a GPU waiter unsatisfied (DRED: the queue has not
completed a single operation of those lists); without the bridge the same waits block the CPU
submission thread and the title dies on its watchdog.
What this looks like from the title side. The value the waits want is written by the title
itself:
Write64BitValueBottomOfPipeXat exactly those addresses, e.g.0x70417ff68 = [be2, 0](mode 2), 44 writes across four recording threads at 133.1 s, while the wait for
0xbe2at 135.2 sstill reads 0. The producer lists are still being recorded when the consumer list waits (a
thread dump of the same run: a title thread inside
bind::execute_indirect→pso_async::resolve_for_drawwhile its list holds the ring writes), which is the cross-queueordering #708 is about.
Suggestion. The cycle break seems to be the wrong end to resolve it: signalling the fence from
the CPU unblocks the CPU side but cannot make the GPU's
queue.Waitobserve the write that theproducer list would have made. Deferring the wait to the producer's recorded position (the #708
direction: split the list at the wait and gate the continuation on the producer's fence) looks
like the only variant where both sides make progress; a CPU signal only for cycles that cannot
make progress at all, with a warning naming both queues, would then never be needed on this title.
Not the cause (ruled out here):
XErrorReport 0x89240107("XGameRuntime is missing required dependencies …"): the title's ownGaming Services check, printed twice at ~19 s; the run goes on for another 150 s.
XCL_TEXTURE_SKIP_UNCHANGED=0the same black frame appears; the onlydifference is XCL's own detile read faulting on a page the title decommits
(
0xc0000005ingpu::tiling::Chain::detile_level— a separate, local fix,read_committedinstead of a borrowed slice).
blob (
… kept on disk for the next run (this one: 54851 ms, 0 KB)) and is compiled again on thenext run; 1 MB DXIL programs take 25–65 s.
Not tested: other titles, NVIDIA, a build with #795 but not #797, and #708 on top of
1ec4c98.AI use: the text was written by an AI agent (DeepSeek Harness,
deepseek-flash) from the log,the
report.jsonand the thread dumps of my own runs; the runs, the hardware and the localpatches are mine. No game files are attached.
@tylerstraub on GitHub · 2026-11-24 09:26 UTC · original
I ran into another stop after #684 on my Linux 5090. The interesting part was figuring out where the value in the failed relocation lookup came from.
I ran the same prepared profile twice on a locally patched build based on
09940bb87(NVIDIA 595.99.02, Proton Experimental 11). Both runs started with an empty shader cache, a 50 ms pipeline wait and the same 4095 MiB coherent window. The only change for the second run was #684 ate56dbc3. The first run stopped in XG texture readback at 74.5 s. With #684 it started presenting again at 106 s, then stopped in the relocation lookup at 114 s. I still had a spinner on screen, and there was no device removal in the log.Three storage deliveries in that second run covered the eight bytes the title was reading. I decompressed all three source blocks and checked the same spot in each. Only the vehicle texture delivery (
ttdb_vehicles.ttpf) matched all eight bytes the title looked up. One of thelevels.rpfdeliveries to that same address had what looked like a valid resource pointer there.That's one run. I have the address where the vehicle data landed, but I'm missing the page history that would tell me whether it landed on the wrong page or the level loader was still using a page that had been reassigned. Has anyone following this issue traced the physical page ID from enqueue through submit and remapping? I'd be interested to compare notes on that part.
@zmelumian972 on GitHub · 2026-11-24 10:42 UTC · original
Linux / RTX 5090 on
6efdabc: noWait64BitValueXtimeouts any more; the title reaches its first story card, then queue waits released on the CPU slow it to 8 fps and the watchdog ends it at+0x23cf683Setup: CachyOS (kernel 7.3.6), Ryzen 7 9800X3D, RTX 5090 (driver 620.73.04), Wine 11.22, vkd3d-proton 3.1 with a local patch that resolves XCL's extended vtables (#175), DXVK 3.1.1 dxgi/d3d11. XCL cross-built from Linux with cargo-xwin, release, rustc 1.100.0.
Build:
main@6efdabcplus two uncommitted changes: #684's diff (xg.rs,xg_oracle.rs) and a local fallback for Wine, where DWM cloaking fails (the console window is hidden; #794 covers the same thing). Nothing else.Run: game 1.0.2.1,
XCL_PSO_WAIT_MS=1, shader caches warm from earlier runs, menus driven by scripted A presses.0xc0000005 in game+0x23cf683 (write at address 0x0)Frame counter:
1500 frames presented, 28.3 fps, then1800 frames presented, 8.0 fps over the last 300. No device removal.Compared with my earlier run on
09940bb+ #684 + #533 + #267 (same machine, same settings): that run stopped at the same card and the same address, with 2Wait64BitValueX timed out after 2000 msmessages before it. On6efdabcthere are 0 of these. Counts over the whole log:GPU queue.Wait … did not complete within 5000 ms … released on CPU to prevent GPU hang: 43Write64 Signal … would close a GPU cycle (waiters=[q3]) – signalled on CPU: 15Wait64BitValueX … bridged to GPU queue.Wait: 8ExecuteIndirect with a pipeline that is still being built skipped: 4The first released waits:
In these lines the producer queue has submitted the signal (
submitted=0x715), but its GPU work stops at0x713. So its own work is not finishing, rather than the signal never being recorded. With 43 releases of 5 s each the frame rate falls to 8 fps. I read the watchdog at+0x23cf683as the title's reaction to that, the same as in the comments above. On this NVIDIA/Wine setup the CPU-side cycle breaking ends in the watchdog, not in device removal as on the RX 9070 XT above.Not tested: Windows; AMD; a cold shader cache on this build;
mainwithout the two local changes (without #684 the title crashes earlier, incopy_from).AI use: run, log analysis and this report by Claude Code (Claude Opus 5.5); the run is real and the counts come from its log.
@Royalflamejlh on GitHub · 2026-11-24 14:51 UTC · original
Linux / RTX 4060 Ti 16 GB,
main(which has #891) + #684: withXCL_PSO_WAIT_MS=1the title presented until 98–104 s and its watchdog (game+0x23cf683) fired 28–31 s later, in 3 of 3 runs. With 50 ms the watchdog fired at 146.5–162.8 s, in 7 of 7 (126.5–132.5 s at 1 ms). Three corrections to my comments above are at the end.Setup: as in my first comment, except: RTX 4060 Ti 16 GB (driver 615.71.09, Wine's X11 driver), vkd3d-proton v3.1-90-g30b0eb9b,
XCL_PSO_PRELOAD=0, and the title starts from a saved profile (first-run screens done once, no story progress) with one A press at 44.8 s throughXCL_PRESS_AT. All merges clean. At times a second instance of the title ran on the machine's other card.XCL_PSO_WAIT_MS384f7f7+ #68447efa2e+ #68447efa2e+ #684a pipeline still being built after 50 ms … (513 so far), and in the 5 runs with thread dumps the same title thread was inpso_async::resolve_waitin consecutive dumps (100–120 s). At 1 ms there was no gap, and no title thread was inpso_asyncor any D3D12.X call in any dump from 100 s on (3 of 3).Write64 Signal … would close a GPU cycle … – signalled on CPUcame 15, 13 and 16 times at 1 ms, starting in the 2 s before the last present; at 50 ms 0, 0, 4, 10, 12, 0 and 0 times.GPU queue.Wait … did not complete within 5000 mscame 36–45 times at 1 ms (first 2.6–4.7 s after the last present) and 8–43 times at 50 ms, e.g.(waiter=q4/ty2, prod=qSome(3)/tySome(0), recorded=0x86d, submitted=0x86d, completed=0x86b). @zmelumian972's run above has the same messages; there presents went on at 8 fps and a story card showed; here presents stopped, and no dumped frame showed a story card (2 runs dumped every second frame, and neither dumped its very last frames).sparse: the queue has not reached fence value N after 5 s (at N-2)(also in #916) repeated to the end in 4 of the 7 runs at 50 ms, with the title's submit thread insparse::State::upload_dirtyin the 3 of them that have a dump, and in 0 of 3 at 1 ms.XCL_SPLIT_MIDLIST_WAIT=0with the 1 ms limit on47efa2e+ #684 (2 more runs) ended the same way: presents until 96.1 and 100.1 s, watchdog at 124.5 and 129.5 s, no split logged.Left out: 1 run that ended at 61.7 s in the read #751 is for, 2 starts that ended before 5 s (
0x80000003atgame+0x19f4f58, each begun seconds after the run before it ended), and 3 runs made while another job loaded the machine. NVIDIA's kernel driver logged_threadNodeCheckTimeout … 30000 msecsin 4 of the 10 runs (within 20 s of launch, before XCL's clock started, in 3; and 152 s into the one whose watchdog came at 162.8 s) and no Xid.Corrections to my two comments above
0x887a0005) came with an NVIDIA Xid 109 on the 12 GB RTX 4070, and the second row's run had one too. On the 16 GB card the third row's tree met the watchdog in 2 of 2 runs (last presents 92.5 and 90.4 s, watchdog 121.5 and 120.6 s) with no removal; I have not rerun the first two rows' trees.Not tested:
mainwithout #684 past 105 s; the default preload on these commits; native Windows; AMD; thecargo testsuite.AI use: Claude Code (Claude Fable 5.2) merged the pull requests locally, ran the title, read the logs, frames and thread dumps and drafted this comment.
@pickles976 on GitHub · 2026-11-24 17:54 UTC · original
Your table is quietly the most informative post on this board, because run 2 eliminates the community's favorite suspect: a full DXIL precompile — 24,699 programs — and the watchdog still came, at 16 min, with presents never stopping. Three readings, in order of usefulness:
XCL_COHERENT_MB=512result closes my #175 hash-rate hypothesis' A/B from the other side: the ~4.8 GB coherent window making sparse-window updates ~1000× slower (0 fps) is the self-ReadProcessMemory/slow-path cost measured directly — recorded on this thread for the record. The "separate report coming" should note the 512-vs-default delta explicitly; it's the strongest single number supporting the VEH-guarded-reads proposal.Four-runs-one-suspect-each methodology, respected — the end not moving across removals is itself the elimination result this cohort needed.
@Milanesa-chan on GitHub · 2026-11-24 17:47 UTC · original · edited 2026-11-24 18:27 UTC
Edit: corrected. I first wrote that presents never stop before the end. I had read that from the console log, which prints the frame count only every 300 frames and has no timestamps, so a frame rate of ~20 fps in the last count looked like presenting up to the crash. XCL's timestamped log shows that they do stop, about 30 s before the watchdog, as in the reports above (details in my reply below).
Linux / RDNA2 data point on today's
main(b7aa9f3) plus #684: the PR removes thecopy_fromAV here too, and the title then loads for 10–18 minutes at ~20–30 fps. Then presents stop, and about 30 s later its watchdog ends it atgame+0x23cf683. There are noWait64BitValueXtimeouts. Over four runs I removed one suspect at a time, and the end did not change.Setup: Nobara (Fedora 44), Linux 7.3.4, WineHQ wine-staging 11.22, DXVK 3.1.1, Mesa 26.2.6 RADV. AMD RX 6700 XT (RDNA2, 12 GB), Ryzen 5 5600X, 32 GB RAM. xcl cross-built for
x86_64-pc-windows-gnu, release, DXC 1.9.2609.5. Network blocked (separate network namespace) andXCL_NETWORK=0. Retail 1.0.2.1, with a profile that is past the EULA screens, so the title goes straight from its intro to the loading screen.Two local settings:
XCL_COHERENT_MB=512(the learned ~4.8 GB coherent window made sparse-window updates on this setup about 1000× slower, 0 fps; separate report coming), and a local DXC change (a heap per compile thread) that only affects shader compile speed.beaa245+ #684 (e56dbc3)+0x23cf683at 594 s+0x23cf683at ~16 minb7aa9f3+ #6848cad517): 0 refusals, 0 decode failures (run 2: 1,024+ refusals)+0x23cf683at 1,114.6 sxcl-pso-pre-*threads no longer overflow their 64 MB stacks (see below)+0x23cf683at 799.6 sOne run per row. Run 2's time is estimated from its presents (its timestamped log was overwritten).
At the end
Presents run at 11–27 fps until shortly before the end, then stop: in runs 3 and 4 (the ones with a timestamped log) the last 300-frame line is 38 and 43 s before the crash, when at that rate the next one was due within ~15–20 s.
No
Wait64BitValueXtimeout, no device removed, no pipeline left building past a stand-in in any of the four logs.In run 3's exit dump, all 11
xcl-pso-*workers are idle (waiting for work). A dump taken during run 2's loading screen (~12 min in) had no title thread inpso_async::resolve_wait, the 17 DirectStorage queue threads idle with nothing queued, and onexcl-pso-prethread building a compute pipeline.The same two title threads, at the same return addresses, in all four runs:
The registers at the null write have the same low bits as the ones reported above (
rcx=…c348,r8=…8c40,r9=…8e20,r10=…8ad8,r13=0x146845c28), at different upper addresses:So on this machine, none of XCL's own wait or timeout warnings fire before the end, and its pipeline workers are idle. The 10–18 minutes is how long loading takes to reach the point where presents stop. The watchdog then fires about 30 s later.
Also seen
thread 'xcl-pso-pre-N' has overflowed its stack, run 3 for both preload threads (one early, one shortly before the end); run 1 printed the same for an unnamed thread. These threads already have 64 MB stacks. With vkd3d-proton master and dxil-spirv master (run 4) there were none. The same 3.1 build also crashedxcl shaders --precompile --pipelineson a null read inside dxil-spirv's CFG structurizer; master does not. This did not change the watchdog.I can rerun any of these with an
XCL_THREAD_DUMP_ATtime or other env vars, or test a PR on this setup. Logs are kept locally. No game files are attached.AI use: Claude Code (Claude Opus 5.5) built the trees, read the logs and dumps, and drafted this comment. I ran the game, documented the behavior, suggested what to look for and reviewed everything before posting.
@zeeboguy on GitHub · 2026-11-24 18:28 UTC · original
Linux / RTX 5080 (Blackwell), today's
main+ #257 + #775 + #684: on this cardXCL_PSO_WAIT_MS=50turns the+0x23cf683watchdog into an NVIDIA GPU hang (Xid 109) at ~150 s.XCL_HEAP_WINDOWS=1(#680) doesn't change the result.Setup: Arch Linux (kernel 7.2), Hyprland (Wayland, Wine's X11 driver via Xwayland), RTX 5080 16 GB, NVIDIA 615.78.08, 32 GB RAM. GE-Proton11-12's wine called directly, prefix from
scripts/linux/setup-prefix.sh, vkd3d-proton v3.1 +vkd3d-proton-xcl.patchwith #775's dxil-spirv53aac418, DXVK DXGI withhideNvidiaGpu = False, DXC 1.9.2609. xcl cross-built forx86_64-pc-windows-gnu, release, from9e3831e(#680 merged) with #257, #775 and #684 merged on top, all clean. Retail 1.0.2.1, profile past the first-run screens, one A press at ~45 s, caches warm. Every run:XCL_NETWORK=0 XCL_ACTIVITY=1.XCL_HEAP_WINDOWS=1 XCL_PSO_WAIT_MS=500x887a0005device removed at 151.7 s; kernel:NVRM: Xid 109, CTX SWITCH TIMEOUTXCL_PSO_WAIT_MS=500x887a0005at 152.4 s, Xid 109 CTX SWITCH TIMEOUT0xc0000005write at 0x0,game+0x23cf683at 144.5 s (rax=0 rcx=0x70024c348), ~30 s after the last presentIn all three runs the game world stayed black on screen. Audio was audible in run 1 only, although xcl's log shows Opus decoding with no errors in every run (6.6k, 6.8k and 13.4k packets).
Observations:
Wait64BitValueXtimeouts on queue 0 (0x70417fb18, want0x950, memory holds0x94e). Run 2 shows the same pattern, with builds up to 38.5 s.coherent 3998/4095 MB, sparse 7.4 GB, target pages ~9.3 GB of 9.5 GB pools).So on Blackwell under vkd3d-proton, the hang looks like a long-running submission, either a translated compute dispatch or one waiting on a value that never lands, which trips the driver's context-switch timeout before the title's watchdog fires. This card shows the same Xid 109 in an unrelated vkd3d game, so it may be NVIDIA + vkd3d specific rather than XCL's. Happy to run something targeted, e.g. a build with extra logging around the last submissions, or a different
XCL_PSO_WAIT_MS.@pickles976 on GitHub · 2026-11-24 18:30 UTC · original
Public correction to my analysis comment above, same window as the edit: I built point 1 on "presents never stop before the end" and that premise is now retracted — thank you for the timestamped recheck, and the why of the misread (300-frame counts, no timestamps) is exactly the trap that should be in every log-format doc. What the correction does to the model: "two opposite end shapes" is gone — there is ONE shape: presenting → presents stop → ~30 s →
+0x23cf683. That strengthens the watchdog read in one way ("30 s after presents stop" is a heartbeat-timeout shape: the watchdog likely just notices the title's progress stopped, which revives "global stall detector" as adequate — my "times one specific task" wording overshot) and leaves the load-bearing conclusions untouched: latency is still eliminated as primary (run 2 presented 23,400 frames warm-cached and fell at the same instruction — same stop, same 30 s), and the stop itself is still the mystery, now with a duration on its fuse. Which yields the concrete opportunity the edit just created: the 30-second gap is a free, reproducible, post-mortem-live debug window. Nobody has named it yet: watch the frame counter (or XCL's timestamped log), and when it stops advancing, attachgdb -p/py-spy dumpand take every thread's backtrace + wait reason before the watchdog reaps the process. One such capture across two vendors would say what the main thread is blocked on — the thing the whole cohort has been inferring from post-mortems. Sketch for anyone wanting to automate it: poll presents for 2 s of no advance →gcore-lite (thread apply all bt,info threads) × 3 samples 10 s apart → upload. I will run the equivalent on this box against my own static copy to pre-map the likely wait sites in the title so whoever captures first can resolve the symbols instantly. (The #549-class read survives the correction — a main thread blocked on a completion that never fires produces exactly "presents stop, then heartbeat death" — but it is now hypothesis among two again, not forced by end-shape diversity. The stack dump chooses.)@Milanesa-chan on GitHub · 2026-11-24 18:32 UTC · original
@pickles976 thanks for reading it closely. A big correction first: presents do stop before the end on this machine too. I'd written that they never stop. Since that was the strongest point of the comment, I re-checked it, and it was wrong. I had read it from the console log, which prints
frames presentedonly every 300 frames and has no timestamps, so a last count of ~20 fps looked like presenting up to the crash. I hadn't checked it against the timestamps in XCL's own log (xcl.log). I've edited my comment above. Sorry about that.In runs 3 and 4 (the two with timestamped logs), the last
frames presentedline is at 1,076 s and 756 s, at under 20 fps, so the next one was due 15–20 s later and never came. Right after that last line, the same few things show up in all four runs, in about this order:and the watchdog fires about 30 s later (30.5 s and 31.0 s in runs 3 and 4; @Royalflamejlh saw 28–31 s with
XCL_PSO_WAIT_MS=1). Between the last present line and the crash, the log is mostly audio decoding and compute pipeline builds (9 in run 3; 157 in run 4, which was rebuilding its driver pipeline cache after I switched vkd3d-proton). Run 4 also logged its first and onlysplit command list … around mid-list Wait after Write64at 781.6 s, after presents had stopped; run 3 had none. So it ends like the other watchdog reports above, and the 10–18 minutes is just how long loading takes here to get to that point.XCL only logs the first 4 of those SRV warnings per run. In every run the first one shows up during loading (at 334 s and 254 s in runs 3 and 4), and the other three in the burst at the end. I don't know yet if any of this is the cause or just marks the end of loading.
About the 19 precompile errors: XCL only prints the first 10. Those are DXC
validation errors, not refusals, all on mesh shaders whose names end in_Wrapped, and they come from just 3 distinct DXIL outputs. The other 9 aren't in the log. I haven't checked whether any of them is used where the title stops. Every run also has 40mesh pipeline with its MS … in the AS slot – refusedlines, which I think are the minimap mesh pipelines the README already mentions.About the coherent window: that number shows the 4 GB window is much slower here, not why. Per submit it's ~800× (~450 vs ~0.6 ms), but per MB uploaded only ~28×, and it's one run each. So I wouldn't count it as evidence for the
ReadProcessMemory/ VEH idea. More in the separate report.Last thing: before the null write, the crash hook at
+0x23cf620sets a crash-report field, and the title's Breakpad logs it asparameter 'GPU Loc Sig', value: '7333478d'. So the string the hook decodes is just that field's name (it isn't stored in plain text anywhere else in the exe). The value was the same in runs 3 and 4. It's GPU-related going by the name, but I don't know what it means. (The upload after it fails here, since the network is blocked.)AI use: Claude Code (Claude Opus 5.5) re-checked the logs and drafted this reply. I reviewed it before posting.
@pickles976 on GitHub · 2026-11-24 18:32 UTC · original
Three-way convergence, and it starts with the strongest single table on this board. Reading zeeboguy's runs against the corrected end-shape and our source (hash-matched
9e3831e):pso_async.rs:511— "How long a bind waits for a pipeline still being built (XCL_PSO_WAIT_MS; unset or 0: until completion)" — the bind thread parks inside the emulator while the title's fence keeps counting. The arithmetic is now one line: the ~30 s presents-stop→watchdog gap is the title's outstanding-PSO fence expiring while xcl is still waiting (or permanently waiting) for that pipeline: default (wait-until-done) → stop at 114 s, watchdog 30.4 s later, GPU innocent;PSO_WAIT_MS=50→ same bind proceeds after 50 ms with a not-built pipeline → kernel-levelXid 109 CTX SWITCH TIMEOUTinstead of the title's polite gate. Both deaths are the same bind — the knob only chooses who notices first. And this reconciles the precompile-elimination that seemed to contradict it: run 2 precompiled 24,699 programs with 19 refusals — a refused program never completes, so a bind on it waits forever regardless of cache state: the 19 names I asked for are now load-bearing, not just interesting. Prediction to test first on the next Blackwell/AMD cold run: watchdog deaths should land at 30 ± a few seconds after the last present, on every host (bvironn: your 80 s — was the freeze-start timestamped, or only noticed after? If the gap there is 30 s too, one clock rules all vendors). And a design note for the maintainers, marked as mine not the data's: wait-forever as the default converts any never-completing program — refused or slow — into a guaranteed title timeout; a fail-loudly path (after N seconds, log the program identity and surface the refusal before the title's fence fires) would turn every one of these deaths into a named shader. Kill-map line:+0x23cf683= the title's data/PSO-ready gate on its 30 s fence budget.@pickles976 on GitHub · 2026-11-24 18:39 UTC · original
Decode update that re-ranks this thread (full write-up on VIctory#534, hash-matched exe): the instruction every deep run dies at (
+0x23cf683) is inside a function that de-obfuscates the string "GPU Loc Sig" at runtime and gates on a debug parameter by that name reading 1 — so the end-of-run is a named validation failing, not a raw heartbeat timeout, and the reason no one could grep the name anywhere is a 12-byte rolling cipher (verified byte-exact:0x1b5d6844174b453b+0xff65664f, +12..+1). For the theories argued above: the stop→30 s→death clock stands (measured), but its producer is now "signature for this step not renewed", which both never-completing PSOs and read-too-early storage can cause — the7333478dvalue observed in the wild on that parameter name is the signature channel, and the first log line worth having anywhere isGPU Loc Sigwrites (value + time + stack) until a run shows1. The stack-capture proposal gets sharper, not weaker: attach in the gap and sample the thread that owns the signature computation, not just the main thread.@zeeboguy on GitHub · 2026-11-24 19:00 UTC · original
Follow-up: same RTX 5080 / Linux box on
c160d86(#1426 merged) + #257 + #775 + #684,XCL_DIRECT_DXIL=1. The direct backend takes every compute program, the end doesn't move, and the gap is 29.7 s again.Same setup as my comment above. Settings:
XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_DIRECT_DXIL=1 XCL_DIRECT_DXIL_STATS=1, noXCL_PSO_WAIT_MS, caches warm from the earlier runs.9e3831e+0x23cf683at 144.5 sXCL_DIRECT_DXIL=1,c160d86+0x23cf683at 141.7 s (rax=0 rcx=0x70024c348, same as before)CS direct 262 / HLSL fallback 0. No DXC was involved for compute.Wait64BitValueXtimeouts this run, and activity drops to 0 submits.So for @pickles976's prediction: 30.4 s and 29.7 s on this host, with two different shader backends. On NVIDIA/vkd3d the time is spent in the driver's pipeline compile, not in DXC, so a faster translator alone won't move the gate here. I can grep these logs for specific program hashes if you have a list (e.g. the 19 refusals).
@Natakout on GitHub · 2026-11-24 22:10 UTC · original
Minidumps taken during the stall: on warm caches, no title thread is waiting inside xcl
Hardware: RTX 3060 12 GB, driver 621.14, Windows 11. Retail 1.0.2.1, release builds.
XCL_NETWORK=0, A pressed every 4 s from 12 to 120 s, runs of 300-480 s.Method: a watcher reads
xcl.logand, at the third consecutiveactivityline with 0 presents, takes a minidump withcdb -pv -p <pid> -c ".dump /mhtu". It is read offline with~*kplusllvm-symbolizeron xcl.pdb. The in-processXCL_THREAD_DUMP_ATdumper is not usable for this, because it stops unwinding at the title's frames and so misses title threads that are parked inside xcl.Every run below ends in the null write at
+0x23cf683, about 25-40 s after presents stop.47efa2eWaitOnAddress < pso_async::resolve_for_bind < real::cl_set_pipeline_state, waiting for compute PSOs whose driver build took 41-53 s47efa2ec160d86resolve_for_bind: 2 run the build themselves and wait for DXC (compile_cached < console_to_dxil_for < translated_compute_pso_once < build_compute), and 3 wait for those 2c160d86+XCL_HEAP_WINDOWS=1resolve_for_bindc160d86c160d86c160d86c160d86In the four warm runs, at the stall, the title's job threads sit in
WaitForSingleObjectExon their own auto-reset events, which are unsignaled and unnamed. One title thread is running title code. xcl's PSO and DXC workers keep building pipelines nobody is waiting for.xcl-sync-watchdognever logs "did not complete within 5000 ms".The warmer the caches, the earlier the end comes: 421 → 335 → 248 → 257 s. That matches zeeboguy's warm runs above and the opening post of #675 (196 s warm against 487 s cold).
My reading: a bind parked in
resolve_for_bindcan hold the title at the stall point when pipelines are cold. That was the case on47efa2e;25c6f7eand #680 shorten it, and onc160d86it moves to DXC. But it is not needed for the stall: with warm caches the stall happens with nothing parked in xcl. Pipeline building seems to delay reaching the stall point, not cause it.Like Milanesa-chan, I also see
acphal: audio processor command 0x5 / 0x7 first seen2.6-4 s before presents stop, in 7 runs out of 8.Not tested: AMD;
XCL_PSO_WAIT_MSon warm caches; #1428.AI use
Claude (claude-opus-5-5, through Hermes) ran the title runs and debugger sessions on the hardware above over SSH, read the dumps, logs and source, and drafted this comment.
@spicbully-star on GitHub · 2026-11-25 22:07 UTC · original
Confirming on AMD RDNA4 (RX 9070 XT 16 GB, Windows 10, Agility SDK 1.620), with the same retail title.
copy_frommemcpy AV inhle/xg.rshappens every time at the end of loading.a6, thena7/a8) whena6can't be a row pitch, and checks the source and the whole destination before copying anything (all-or-nothing, no partial row copies).68a284aand on6d12f58(current main). In 15+ runs since, there was no AV incopy_from.+0x23cf683(the title's watchdog) only showed up while the title's threads were held more than about 30 s waiting for pipelines. WithXCL_PSO_WAIT_MS=15000it no longer fires. That part is the cold-PSO stall tracked in #2088.So #684 would fix the first half of this issue on AMD too.