DirectStorage: read memory sources and lazy pages through read_own #2359
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!2359
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2359"
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?
@safesearch77 on GitHub · 2026-11-25 16:30 UTC · original
safesearch77:fix/dstorage-read-own-lazy-source→main· +139 −8 · 1 files · 1 commits · draftdstorage::writableand the routedReadFilehook commit lazy physical pages (kernelx::lazy::ensure) first because kernel calls fail on uncommitted lazy reservations instead of faulting into the vectored handler, butdstorage::read_own(ReadProcessMemory) did not, andexecute()still read virtual memory sources withgpu::shader::readable+ptr::copy_nonoverlapping. As a result, page arrays or memory sources overlapping untouched lazy physical pages and copies above 256 MiB failed withE_ACCESS_VIOLATION(0x89240009), memory sources above 64 KiB walked regions withVirtualQuery, and a memory source decommitted while queued faulted in thexcl-dstorageworker (0xC0000005).What is in it
crates/xcl/src/hle/dstorage.rs:read_ownchecks for overflow (keeping 0-byte rejection unchanged) and commits lazy physical pages withkernelx::lazy::ensurebeforeReadProcessMemory;executereads virtual memory sources throughread_own.crates/xcl/src/hle/dstorage.rs(tests):a_memory_source_and_page_array_in_lazy_pages_commit_instead_of_failing(deterministic red->green test) anda_memory_source_unmapped_under_the_worker_fails_the_request(decommit/commit race stress test modeled on #509).Tested
x86_64, base0829441, head94fae46) withcargo check --offline --target x86_64-pc-windows-gnu --workspace --tests: 0 errors, 0 warnings indstorage.rs.Not tested
cargo test --workspace -- --test-threads=4counts and pairedscripts/smoke.ps1regression runs are attached).ReadProcessMemory, AMD / Intel GPUs, retail titles.AI use
dstorage.rsfix, unit tests, and description; reviewed with Claude Opus 5.5.@FIJI1299 on GitHub · 2026-11-25 17:42 UTC · original
Tested commit
94fae46on Windows:Environment
621.35,wave32)1.8.2502.11(Windows SDK10.0.26100.0)Results
hle::dstoragetests (cargo test -p xcl --lib dstorage): 32 passed, 0 failed..\scripts\test.ps1): 1201 passed, 4 failed, 26 ignored — the 4 failures aregpu::dxil::fuzz_tests::fuzz_validate_and_gpu_0..3(CreateComputePipelineStateE_OUTOFMEMORY0x8007000Eon this NVIDIA driver during the full single-process run).13(no wave64)3(wave32, per-lane form: refused (unsupported V_CVT_F16_F32 / V_MUL_F16 / V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's)))1(cannot disable the driver cache (Windows Developer Mode is required): 0x887A002D)@DavidM1911 on GitHub · 2026-11-25 18:37 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
@SlopTart on GitHub · 2026-11-25 19:06 UTC · original
Tested: current PR head merged onto current
origin/main(clean), Linux (Arch, kernel 7.2.15), Mesa 26.2.5 RADV, Radeon RX 7900 XT (NAVI31), cargo targetx86_64-pc-windows-gnurun under wine-11.0 (Proton), rustc 1.94.0, vkd3d-proton 3.1 with the XCL patch, official MS DXC (binaries 2026-09-29).suite: 144/3 = the three known baseline failures on this lane (
fuzz_validate_and_gpu_2seed 1003,gpu_nonfused_mad_and_mac_prevent_fma_contraction,gpu_depth_buffer_created_for_unordered_access_is_placed). Targeted run of the new memory-source/page-array tests: 2 passed.Not tested: retail titles (no title data on this lane, counts only).
AI use: Hermes agent (local Qwen-class) ran both machines and drafted this; I checked it before posting.
@throny on GitHub · 2026-11-26 02:18 UTC · original
Two contributors checked independently and found that #561 solves the same problem in a different way: #1607, group D115. You may want to compare them with the other author and agree on one, or say in the PR why both are needed.
This is a hint from the community triage in #1607, not a maintainer decision.
AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.