DirectStorage: read a physical-page list again when its request runs #1405
No reviewers
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!1405
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1405/head"
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?
@mgrein on GitHub · 2026-11-24 15:39 UTC · original
mgrein:dstorage-page-lists-at-execution→main· +132 −6 · 2 files · 1 commits · merged 2026-11-25 16:29 UTCA retail title keeps its DirectStorage destination page lists in slots of its own table and writes a slot's pages after
EnqueueRequest. At enqueue, a slot can still name the pages of its previous request.execute()wrote to the snapshot taken then, so the data went into pages the title had since reused. #289 rereads only the entries that are0at enqueue (since #509 throughread_own), so it does not catch a stale nonzero entry. The console reads the list when it runs the request; this PR does the same, except for a list on the enqueuing thread's stack.On a new retail game this was more than 16 000 requests per run. The title's own objects got garbage pointers and it crashed about 20 s into world loading, at a different site each run, mostly reads through non-canonical addresses. When the old pages had been freed, the request failed with
E_ACCESS_VIOLATION(0x89240009).What is in it
crates/xcl/src/hle/dstorage.rs,execute: the destination page list is read again when the request runs, withread_ownas at enqueue. It replaces the snapshot when it differs and every page in it is allocated. #289/#509's reread of0entries is unchanged and runs after it.queue_enqueue_requestrecords whether the list lies on the calling thread's stack (GetCurrentThreadStackLimits), and such a list keeps its snapshot. That memory is reused once the call returns, so a page ID written there since can belong to another live allocation.crates/xcl/src/hle/kernelx.rs:physical_pages_live, true when every page of a list is allocated now.a_destination_page_rewritten_after_enqueue: a slot in a heap table names one page at enqueue and another beforeSubmit; the data must land in the second page and leave the first alone. The same list on the test thread's stack, rewritten with the other (live) page, must keep its snapshot. Each case fails without its part of the change.Tested
cargo test --workspace -- --test-threads=4atbb27ed6(rebased ontomain3da2abb): 1112 passed, 0 failed, 46 ignored (20 test binaries). SKIPPED (25): 20 GPU subtests that need wave64 (gpu::recomp::lower/lower_dxilprogram families,gpu_wave32_program_in_wave64_hardware,gpu_geometry_wave32_prefix_count_over_a_mask), 3 wave32 per-lane f16 subtests oflower_dxil::tests(refused: unsupported f16 instructions),heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows),pso_measurement_compiles_an_exact_synthetic_record(Windows Developer Mode is off).main47efa2eplus other open PRs, before the stack check), 400 s scripted world-load runs of a new retail game with the same settings:main+ this PR) with this headbb27ed6: "≥ 16 384" lists taken at execution by 124 s, as with the version before the stack check, so the retail title's lists are not on the enqueuing thread's stack. Their measurement, quoted here, not ours.Regression run
The same title for 100 s on each build,
XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1, warm shader caches.main:
This PR:
Not tested
mainthe title stops before the world load where they happened, with a GPU hang at about 113 s on both builds (DXGI_ERROR_DEVICE_HUNGlater), which is unrelated to this change. The stack check against the retail title rests on the independent run above.Submit): it changes neighbouring lines and would need a rebase whichever lands second.AI use
🤖 Generated with Claude Code
@certified-retart on GitHub · 2026-11-24 17:00 UTC · original
Two notes that connect directly to this PR:
This likely explains the world-load assert in #1164 (
0x80000003atgame+0x4da6315):+0x4da62d0is the resource pointer-fixup chunk lookup (src_base <= ptr < src_base + sizeover the 24-byte{ src_base, dst_base, size }entries atrcx + 0x10, trapping onint3at+0x4da6315when no chunk matches). All three #1164 crash dumps (including a run with #549 merged and 0 DirectStorage failures) show non-pointer bytes in[rsi]inside a valid destination chunk — the exact failure mode of a reused non-zero page-list slot written afterEnqueueRequest.Remaining auto-submit race in
dstorage.rs(DSTORAGE_QUEUE_OPTIONS::AutoSubmitDisabled):crates/xcl/src/hle/dstorage.rs,factory_create_queue1(IDStorageFactoryX2::CreateQueue1, slot 10) already logsu64 @0x18 = 1from the retail title'sDSTORAGE_QUEUE_DESC1and ignores it.dstorage_xs.hspec, offset0x18isDSTORAGE_QUEUE_OPTIONS Options, where bit 0 (0x1) isAutoSubmitDisabled.enqueue/enqueue_numberedstill auto-submit atcapacity / 2, a request enqueued when the queue hits half capacity can reachexecute()before the title returns fromEnqueueRequestto overwrite the stale non-zero slot and callSubmit(). In that window, rereading the list inexecute()still sees the old pages.AutoSubmitDisabledinfactory_create_queue1(skipping thecapacity / 2auto-submit when bit 0 is set) closes that race cleanly for both this PR and #549.Not tested: live retail run on this branch (static analysis of
dstorage.rs, #1164 crash dumps, and GDK docs only).AI use: Antigravity (
gemini-4-neon) analyzed the #1164 crash site, auditeddstorage.rs, and drafted this comment; reviewed before posting.@DavidM1911 on GitHub · 2026-11-24 17:08 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~21 ignored.Thanks!
@oz-stanislav-zhukov on GitHub · 2026-11-24 17:39 UTC · original
Test report on GTA VI 1.0.2.1 (Windows, NVIDIA). With this PR, the title's
0x80000003at+0x4da6315(#1164) did not come back in two runs. On the same tree without it, the same assert came back in the scene. Only three runs, so this is a data point, not proof.Tested at
7f15632cherry-picked ontomain9e3831e(local commit4491b86), together with other open PRs: #751, #688, #1123, #488, #789 (ported by hand), #1195, #1428 (cf6cc59), #1323, plus two localxgCopyFromSubresource fixes. #549 conflicts with this tree, so it is not in it.Hardware: NVIDIA GeForce RTX 5060 Ti 16 GB, driver 621.24, Agility SDK 1.620.2. CPU i7-14700KF, 64 GB RAM, Windows 10 22H2 (19045). Rust 1.88.0, release.
Env for all three runs:
XCL_HEAP_WINDOWS=1 XCL_PSO_WAIT_MS=50 XCL_GPU_CULPRIT=1 XCL_ACTIVITY=1. I also had local diagnostics on (register memory dump at a crash, a thread dump on a commit jump, a cap on concurrent driver compiles); they don't touch DirectStorage.unhandled exception0x80000003at+0x4da6315,rdx=0xaaaaaaaa0xaaaaaaaa, and the destination page around it was filled withaaaaaaaa-high qwords. The resource map itself was a normal one (0x50000000 → 0x8823f0000, size0x1e0000). This matches the stale-page-list explanation in #1164.mainb7aa9f3with the same stack minus this PR and #680 died within the first minutes of the scene. The sites were different each run:+0x4da6315twice, plus+0x50705fc,+0x540abf5and+0x4fdbe43, each reading a garbage pointer (e.g.0xffffffffffffffff,0x7243fff448c00be0). That is the pattern the description names.Not this PR's issue, but it ended both runs: the process commit grows by 5–9 GB per 2 s while the NVIDIA compiler builds big compute pipelines (270–810 KB DXIL in the heap form). It goes from ~32 GB to over 55–70 GB within a minute, and I stopped the runs there. That's tracked in #156 / #1307.
Not tested:
main;scripts/smoke.ps1.AI use: runs, log analysis and this report by Claude Code (Claude Opus 5.5); posted at the request of the person running the tests.
@tylerstraub on GitHub · 2026-11-24 19:16 UTC · original · edited 2026-11-24 19:18 UTC
I independently tested mgrein’s change at
7f15632on Linux with Proton Experimental and an RTX 5090 (NVIDIA 595.99.02). I applied it to my instrumented XCL control (f7c412a, resulting local candidate8787543) so I could observe the destination pages in both runs.The focused test
hle::dstorage::tests::a_destination_page_rewritten_after_enqueuefailed on my control. With the change, all 256 expected bytes reached the replacement page and the original page retained its sentinel. The existing physical-page destination/source and queued remapping tests also passed.On a matched cold-cache story load, 4,934 of 34,610 traced physical-page requests used a destination entry that was already nonzero at enqueue and had changed by execution. This count excludes entries that were zero at enqueue. Both runs opened the same seven story paths, reached loading artwork, then stopped after device removal on a dark screen. The page-selection fix is independently reproducible here. I saw no visible gameplay improvement in this comparison.
I ran the Windows lib-test binary under Proton with the filter
a_destination_page_rewritten_after_enqueue --test-threads=1 --nocapture. I used Codex (GPT-6) to run the comparison and prepare this report.@3L1A5-1 on GitHub · 2026-11-24 20:56 UTC · original
Test report for
7f15632on an 8 GB NVIDIA card with 16 GB RAM in the retail title: #1164's assert (+0x4da6315) did not come back in 3 of 3 runs (it ended 1 of 3 runs without this PR), and the runs went 30–170 s further. They now end on running out of memory or on the watchdog.Tested
XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_PSO_WAIT_MS=50 XCL_PAGE_BUDGET_MB=3072, A pressed byXCL_PRESS_A_AT=40,45,…,120, 600 s runs.main930e8b4+ #1182, #1055, #1102, #759, #1273, #1278, #562, #1288, #1515, #640 (5d6fac8), #929 (b3a969b), revert ofb8b1f49(#1307), plus local logging diagnostics. The A/B is that tree with and without this PR (merged cleanly), 3 runs each, back to back on the same evening.cargo test -p xcl --lib -- a_destination_page_rewritten_after_enqueue: 1 passed.xboxbvhbuilder.dll+0x15078access violation;+0x4da6315(#1164); watchdog+0x23cf683Close→0x8007000e, title int3+0x72ac; watchdog+0x23cf683;Close→0x8007000e,+0x72ac0x8007000eends as this machine's memory limit (in run 1 free RAM was also down to 0.37 GB), not as something this PR breaks, but I haven't shown that.failed) don't drop clearly on this tree: 397 / 28 / 213 without this PR, 1 / 231 / 397 with it. So I can't confirm here the drop @joeypercia measured.Not tested: this PR alone on
main; AMD; Linux.AI use: Claude Code (Claude Opus 5.5) ran the runs, compared the logs and wrote this.
@joeypercia on GitHub · 2026-11-24 20:45 UTC · original · edited 2026-11-24 20:57 UTC
Where the failures that remain with this PR come from, on an RTX 4070 Ti. I added a local log line to every
E_ACCESS_VIOLATIONreturn indstorage.rs(diagnostic only, not proposed).Tested: RTX 4070 Ti (driver 616.56), Ryzen 7 7800X3D, 32 GB RAM, Windows 11 Pro 26200, release, retail 1.0.2.1 from an NVMe SSD,
XCL_HEAP_WINDOWS=1, A scripted withXCL_PRESS_AT. Tree:main9e3831e+ #1288 + #742 + #1464 + #1448 (with #1321) + the diagnostic, then the same plus this PR (7f15632; its conflict with #1464 resolved by doing this PR's reread first and #1464's wait for zero entries after it).0x89240009)write_physical_pagescall ofexecute(destination physical pages)So the reread fixes nearly all of them here. The few left fail at the same physical-page write, all within 0.2 s on
G:\data\ttdb\vfx\ttdb_vfx.ttpf. That fits a list being rewritten at the moment its request runs: the snapshot's pages are already freed, and the current list is not yet entirely live, so neither this PR's reread (all pages live) nor #1464's wait (entries that were 0 at enqueue) applies. That is a reading, not measured: I did not log the page numbers.Not tested: this PR without #1464; more than one run with each tree; AMD.
AI use: Claude Code (Claude Opus 5.5) wrote the diagnostic, ran the title on my machine, and wrote this comment.
Note on comparing counts (re @3L1A5-1's report above): my tree had #1464 as well, and the two fixes cover different entries. #1464 waits for entries that were
0at enqueue, and this PR rereads entries that were nonzero and changed. A tree without #1464 still fails on late-filled0entries, which this PR does not cover. My numbers also come from one run each, counted from the diagnostic's log lines (capped at 64), not from the activity lines'failedsum, so they are not directly comparable with a 3-run total.@jordi-vancuijlenborg-vinci on GitHub · 2026-11-24 21:16 UTC · original · edited 2026-11-24 22:24 UTC
I reproduced the #1164 crash (
0x80000003at+0x4da6315) on Windows 11 with an RTX 3080, onb9b6ea6withXCL_PSO_WAIT_MS=50. I can test this PR on the same setup. Is there a specific revision or scenario you’d like me to cover?Update after testing #1405 alone. Both builds hit
0xc0000005atgame+0x23cf683in the story load. Neither reproduced the earlier #1164 breakpoint. The patched run reread at least 8,192 page lists and recorded zero failed DirectStorage requests in the activity log.Tested
Windows 11 25H2 (26200.9974), i7-9700F, RTX 3080 10 GB, driver 621.01, Rust 1.100.0 MSVC, release. Control
b9b6ea62080cc62fc19e212033372d01c6214e5c. Candidate used the same base with only7f15632548f0127457877798d291868c967c8ca5applied (matching Git patch ID).xcl run <game-folder>on GTA VI 1.0.2.1, Series X, once per build. Both used independent copies of the same save and warm shader cache,XCL_NETWORK=0,XCL_ACTIVITY=1,XCL_PSO_WAIT_MS=50,XCL_PRESS_A_AT=52,65andXCL_RUN_SECONDS=720.+0x23cf683at 356.770 s+0x23cf683at 385.457 sCounts are sums of the recorded two-second activity samples. The two runs processed different numbers of requests. Neither logged a D3D12 device removal. Both processes remained alive after the exception and the launcher stopped them at its 765 s deadline. A preliminary control needed a late manual profile selection and is excluded from the comparison.
cargo test --locked --offline --release -p xcl --lib -- --exact hle::dstorage::tests::a_destination_page_rewritten_after_enqueue --nocapture --test-threads=1on the candidate: 1 passed, 0 failed, 0 ignored, 0 skipped, 862 filtered out.Not tested
The effect on #1164 remains open on this machine. One matched pair, no full test suite or
smoke.ps1run for this comparison.OpenAI Codex (GPT-6.2 Sol High) ran the tests and helped draft this comment.
@jessenic on GitHub · 2026-11-24 23:54 UTC · original
Test report: with this PR (and #1464), the CPU access violations that ended Series S story loads around 90–110 s are gone in 3 of 3 runs, against 6 of 10 runs without them. The same setup and the same warm caches on both sides.
Setup: RTX 5070 Ti 16 GB (driver 610.88), Ryzen 7 9700X, 32 GB, Windows 11 Pro 26300, rustc 1.97.0, release. Retail title, Series S profile (
device_type = "lockhart"), story load with scripted A presses, 400 s per run,XCL_HEAP_WINDOWS=1, all compute pipelines precompiled.Tree: a local integration branch on
b7aa9f3(#1288, #751, #684, #680, #1315/#1316, #1321, #1110, #495, #242, #615, #1697, #1323), plus local diagnostics that do not touch DirectStorage. One of them,XCL_X_DEAD_STOP=1, was on in every run on both sides: it ends a split-wave64 wave's loops after a meet timeout. Of the 10 runs without this PR, 4 had only that, 3 also had #1143 + #1221, and 3 had #1143 + #1221 + #765. The 3 runs with it had all three, plus this PR's7f15632and #1464's3b7d329(headb132ead, plus the same uncommitted diagnostics).0xc0000005in the title orvcruntime140)memcpy. A disassembly of the fault sites (local, offsets only) showed bad values loaded from whole objects of the wrong kind of data, inside the title's physical-page memory. That matches what this PR describes.DirectStorage: 16384 page lists written after their request was enqueuedby 93–97 s. The line is logged at powers of two, so it is at least 16,384 per run.Not tested: #1405 and #1464 separately, so the effect is not split between them; plain
main; AMD; Series X with the PRs; more than 3 runs with them. The local diagnostics (XCL_X_DEAD_STOP, a page-event log, #1323's tracer) are not in any PR.AI use: Claude Code (Claude Opus 5.5) ran the runs on the machine above, analysed the logs and wrote this report.
@CharlyRien on GitHub · 2026-11-25 02:34 UTC · original
Test report on an RTX 3090 with the world running above 1 frame per second: garbage-pointer faults in 8 of 8 runs without this change, 0 of 9 with it. Two things for the PR: it now conflicts with the merged #509, which does not cover this case; and a second fault showed up behind it, in
title_textures.Setup
main9e3831emerged locally with #1288, #1448, #684, #889, #1323, #929, #640, #1326, #1327, #1329, #1791 (by hand) and three allocator-lifetime commits fromwondercrash/xcl(150e635,761ada5,9b70233), plus local diagnostics and a local readback change insparse.rs(one fence per title queue, see #1329). For the last three runs: #509 as merged, then this PR's head7f15632rebased onto it by hand (same lines).XCL_UMA_SHADOW=1 XCL_HEAP_WINDOWS=1 XCL_NETWORK=0 XCL_ACTIVITY=1, warm caches, noXCL_PSO_WAIT_MS, 200 s. With that set the title presents 1.2 – 1.5 world frames per second from about 100 s on, which is what makes the fault systematic here. Local switches: the title's own stall watchdog is neutralised; three compute programs of 4 MB of DXIL or more are not handed to the driver. WindowsTdrDelay30 s.Results
9e3831e)+0x4da6315int3,+0x4ed80c0,+0x54e9d82,+0x4e8b4bein 8 threads, amemcpy, …)More than 16 384 destination lists per run differ from their enqueue-time snapshot, from 21.6 s on.
Evidence for the mechanism (local page-history log of every map / unmap / DirectStorage write per 64 KiB page, dumped at the fault): in a snapshot run the faulting object's page shows
165.5872 map-from-home, then167.1743a 64 KiB DirectStorage write whose list had changed since enqueue, then nothing until the fault at 183.0 s on a pointer loaded from that page (0xaaaaaaaa7c1f83ff). The bytes are streamed asset data, not GPU-written: these pages are in the title's reservation outside the unified-memory windows.About #509 (merged): it makes the late re-read of entries that were
0at enqueue fault-safe. It does not re-read a nonzero entry the title rewrote after enqueue, which is the case here, somainstill has this crash; this PR needs a rebase onto it (the conflict is in the same lines ofexecute).A second fault behind it, not covered by this PR: once the title survives, one run in six died inside XCL in
title_textures::refreshat 159 s, reading in place a page that another title thread had unmapped 2 ms earlier (shown by the same page history).shader::readablesays yes for the whole window. Reading in place only in the coherent window and copying throughReadProcessMemoryelsewhere removed it in the 6 runs since, at the same frame rate. I can post that diff (65 lines) or open an issue if preferred.Not tested: the PR's unit test, #1464, AMD, runs without
XCL_UMA_SHADOW(the DirectStorage and kernelx code has no dependence on it), currentmain.AI use: Claude Code (Claude Fable 5.2 coordinating, Claude Opus 5.5 for the page-history log and the runs) did this and drafted the report.
@maephisto666 on GitHub · 2026-11-25 03:33 UTC · original
Test report: retail 1.0.2.1 on an RTX 5090 (Windows), #1405 at
bb27ed6and at7f15632on a local tree. One failed DirectStorage request per run, the same as a different fix of mine for the same bug. I am dropping mine: this PR covers it. Not amain+ #1405 run.Tested
main4e3515e+ #751, #433, #789, #759 (rebased) and local diagnostics. This PR's diff applies on it without changes, at7f15632and atbb27ed6.cargo test -p xcl --lib --release dstoragewithbb27ed6: 30 passed, 0 failed, 0 ignored. I did not run the whole suite on this tree.XCL_PSO_WAIT_MS=50. One run each.7f15632bb27ed60x89240009, 119–120 s)0x89240009, 122 s)0x89240009, 120 s)SKEDCHECK23_CONSTANT_BUFFER_SIZE failed, thenIllegal Instruction Encodingon many SMs. It is the same with my fix, so it is not caused by this PR. I am looking into it separately.Not tested
main+ #1405 alone, so noxcl-smokepair from me.bb27ed6keeps as snapshotted) or from somewhere else: not examined.AI use: Claude Code (Claude Opus 5.5) applied the patches, ran the builds, tests and runs, read the logs and wrote this report. The numbers come from those runs.
@shortside on GitHub · 2026-11-25 09:42 UTC · original
Test report from macOS (CrossOver, D3DMetal): the garbage-pointer crashes in world loading are gone with this change, 0 of 3 runs against 3 of 6 without it.
Tested
x86_64-pc-windows-msvc.mac7(dbd9d09, onmain930e8b4) with #615 and two branches of mine (see #258). This PR does not apply there (dstorage.rshas moved on), so I ported its change by hand: the reread inexecute,on_callers_stack, thedest_on_stackflag andphysical_pages_live. Not its unit test.XboxBvhBuilder.dll, see #258).Not tested
main; Windows; its unit test; any other title.AI use
@4usphs on GitHub · 2026-11-25 11:52 UTC · original
AMD run on the exact head
bb27ed6(bb27ed6d66), as pushed on its base3da2abb(not merged onto currentmain), on two AMD adapters with native 64-lane waves: RDNA4 and the console's generation, RDNA2.Tested
XCL_TRANSLATED_CACHE=0; adapter picked withXCL_ADAPTER.cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4:gfx1036), driver 32.0.21045.29003: 1111 passed, 1 failed, 46 ignoredSKIPPEDon both: the per-lane-form subcases oflower_dxil::tests::f16_programs_on_the_gpu/f32_programs_on_the_gpu(refused),pso_measurement_compiles_an_exact_synthetic_record(driver cache),heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows). Nono wave64skips.a_destination_page_rewritten_after_enqueueruns and passes on both adapters.fuzz_validate_and_gpu_1seed 722 andfuzz_validate_and_gpu_3seed 1599; iGPUfuzz_validate_and_gpu_1seed 540.cargo test -p xcl --lib gpu::dxil::fuzz_testson the base3da2abbfails the same way on each adapter (same seeds, same values).Not tested
AI use
@xpatfussy69x on GitHub · 2026-11-25 11:57 UTC · original
Test report for head
bb27ed6as pushed (not merged onto currentmain) – NVIDIA, wave32.Tested
.\scripts\test.ps1(cargo build --workspace+cargo test --workspace -- --test-threads=4): 1112 passed, 0 failed, 46 ignoredDIFFERS_ON_1426list, unrelated to this PR)a_destination_page_rewritten_after_enqueueran and passedXCL_SAMPLE_*data set (game-data tests not run)Not tested
mainAI use
@ClosetPie107 on GitHub · 2026-11-25 12:28 UTC · original · edited 2026-11-25 15:05 UTC
Linux / AMD RDNA4 (RADV) test report for head
bb27ed6merged locally ontomain1a0bbe3(clean merge).Environment
experimental-11.0-20261112), vkd3d-proton v3.1 (#257+dxil-spirv53aac418) for unit tests;vkd3d-protonmasterec207194(3.2.0) +dxil-spirv694cc674+ relaxed-vtable patch (-Db_ndebug=true) for the retail A/B below; DXVKv3.1.1-209, DXC1.9.2609.5,x86_64-pc-windows-gnucross-compileTested (debug test binary under Wine,
--test-threads=1 --nocapture)hle::dstorage::tests: 19 passed, 0 failed, 0 ignored, 0 skipped (0.15 s), includinga_destination_page_rewritten_after_enqueueanda_destination_page_filled_in_after_enqueue.Retail title (1.0.2.1) A/B on
main06c9f55+#2306(XCL_TEXTURE_LEVEL_PAGES=1)Same warm PSO/vkd3d cache and flags (
XCL_DIRECT_DXIL=1,XCL_PSO_WAIT_MS=50,XCL_SPLIT_MIDLIST_WAIT=0,XCL_COHERENT_MB=1024,VKD3D_CONFIG=ignore_shared_fence,XCL_PSO_PRELOAD=0,XCL_NETWORK=0), single run each:#1405: crashed at 111 s with0x80000003atgame_scarlett_master.exe+0x4da6315(#1164/#2140), after49,111draws /114,950dispatches.#1405(bb27ed6): no+0x4da6315crash — ran cleanly to 302 s (exit=0, stopped by our 2 GiB host RAM guard), reaching 81,435 draws, 341,544 dispatches, 14,862 chained split-compute dispatches, and world-scene graphics PSOs (#3457–#3470), with 0 crashes and 0 device removals.Not tested: full workspace suite, repeated multi-run statistics for
+0x4da6315, native Windows.AI use: T3 Code / Antigravity (Gemini 4 Neon) merged, built, ran the tests and retail A/B on this machine, and drafted this report.
@ivall on GitHub · 2026-11-25 16:29 UTC · original
Merged into
main(65fc114), no conflicts.main), 46 ignored.physical_pages_liveaskspage_home, which does not know the aliasing form's pages, so withXCL_PAGE_ALIAS=1the new branch never runs. Your test fails there until the check asks the alias table (it passes in my tree that does).AI use: Claude Code (Claude Opus 5.5) ran the tests and wrote this on the maintainer's behalf.
@humsterbumster on GitHub · 2026-11-25 17:02 UTC · original
A Linux/NVIDIA data point for this, alongside #2140.
Box: RTX 5090 32 GB, driver 620.73.04, Wine 11 / Proton 11, vkd3d-proton master
ec20719(3.2.0 + the two-hunk relaxed-vtable change,-Db_ndebug=true), XCLmain3f4495a, retail title 1.0.2.1, cold profile, one A press.Without this PR:
D3D12 device removed: 0x887a0005at 349 s, one log line after1 writes after the GPU so far done although their queue had not got there after 10000 ms (fence at 4741, wanted 4742).With this PR and #684: no device removal in 684 s (run stopped by hand), and 16
DirectStorage: N page lists written after their request was enqueued: the pages named at execution are usedlines in the log.It is not a cure on its own: a third leg carrying this PR plus #541 and #1803 still lost the device at 344 s. But it is the one difference between the 684 s run and the 349 s run on the same machine, and the page-list re-reads it logs are the behaviour the doc comment says the title relies on.
AI-assisted (omp / DeepSeek V4.1 Flash 1017), nv-linux class. No game data attached.
@Dezmonius on GitHub · 2026-11-25 18:38 UTC · original
RTX 5070 verification of #1405
The exact PR head used at least 16,384 execution-time destination page lists during a retail title run. The
0x89240009requests still occurred, and both builds stopped presenting at the same loading illustration.Tested
3da2abb81606df622610e009f0430de99aa9881cand exact PR headbb27ed6d661148177e7aa3b77e88735803d9ac12. Release builds from the unmodified commit snapshots with separate Cargo target directories.cargo test --locked --offline --release -j 4 -p xcl --lib hle::dstorage:: -- --show-output --test-threads=1: parent 30 passed, 0 failed, 0 ignored. PR 31 passed, 0 failed, 0 ignored. The addeda_destination_page_rewritten_after_enqueuepassed. No skips reported by either run.xcl run <retail-title-folder>. Both used the same 420 s internal timer, independent copies of the same starting profile and warm DXIL cache, the same scripted A presses, Direct DXIL, heap windows, sparse coherent heaps (sparse:16), two DXC threads, PSO preload off, DRED enabled and XCL networking disabled.0x0(425.2 s)0x0(425.3 s)The first logged request failure was
0x89240009on both builds. Both ran to the timer without resuming presentation. The last saved frame was a loading illustration on each build. The logs showed no D3D12 device removal, DRED page fault or unhandled CPU exception.Not tested
AI use
OpenAI Codex (GPT-6 family, exact variant unavailable in this session) built the snapshots, ran the tests and title pair, checked the logs and saved frames, and wrote the report.
@ -930,0 +945,4 @@let pages = if !dest_on_stack&& read_own(r.destination as usize, current.as_mut_ptr() as *mut u8, std::mem::size_of_val(pages))&& current[..] != pages[..]&& crate::hle::kernelx::physical_pages_live(¤t)@gut0to on GitHub · 2026-11-24 19:05 UTC · original
This proves only that the replacement page IDs are currently allocated; it does not prove the list is a persistent title table. If a stack-backed list is overwritten after enqueue with the ID of another still-live allocation,
read_ownsucceeds and this check redirects the request from the snapshotted pagep1to unrelated pagep2, potentially corrupting its owner. This conflicts with the stated fallback for overwritten stack arrays. Could the late reread require a positively identified persistent page-table range, and otherwise keep the snapshot? AI-assisted review; I verified this with the existing page-list flow.@ -930,0 +945,4 @@let pages = if !dest_on_stack&& read_own(r.destination as usize, current.as_mut_ptr() as *mut u8, std::mem::size_of_val(pages))&& current[..] != pages[..]&& crate::hle::kernelx::physical_pages_live(¤t)@mgrein on GitHub · 2026-11-25 03:00 UTC · original
You're right: being allocated now does not make the list a persistent table. Fixed in
bb27ed6(squashed, rebased ontomainwith #509):queue_enqueue_requestrecords whether the destination page list lies on the calling thread's stack (GetCurrentThreadStackLimits), and such a list keeps its snapshot at execution.a_destination_page_rewritten_after_enqueuenow has your case – a list on the test thread's stack, rewritten after enqueue with the ID of another live page, keeps its snapshot page and leaves the other alone; it fails without the check.I could not find a way to positively identify a title's persistent table, so this rules out the stack, the case the snapshot fallback was for. A heap array the title frees and reuses before its request runs would still be read late; that limit is now under Not tested.
(AI-assisted: Claude Code with Claude Opus 5.5 wrote the change and this reply; I checked the test fails without it.)
@DavidM1911 on GitHub · 2026-11-26 05:13 UTC · original
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.Thanks!
— Devin
@gut0to on GitHub · 2026-11-24 19:05 UTC · original · reviewed
AI-assisted review; I traced the enqueue snapshot and execution-time reread paths.