XGameRuntime: a save read sees all of an update or none of it #2122

Open
dhillonjagdeep650-boop wants to merge 1 commit from upstream-pr/2132 into main
dhillonjagdeep650-boop commented 2026-11-25 05:41:24 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by dhillonjagdeep650-boop on 2026-11-25T05:41:24Z.


XGameSaveReadBlobData and XGameSaveReadBlobDataAsync read a container's blobs without the lock that XGameSaveSubmitUpdate holds while it replaces them one file at a time. A read that runs during an update can return some blobs from before the update and some from after it. It can also make the update fail: while the read has a blob open, MoveFileExW cannot replace that file, and apply returns E_FAIL with part of the update written (the half-applied state of #324, reached without a disk error). Found by reading the code and reproduced with a unit test; not seen in a title.

What is in it

  • crates/xcl/src/hle/xgameruntime/gamesave.rs: read_layout takes SAVE_MUTATION, as apply and delete_container do (one line, plus the lock's comment).
  • Same file, test reads_during_an_update_see_all_of_it_or_none: one thread reads two blobs in a loop while another rewrites both in 30 updates. It counts failed updates, reads whose two blobs come from different updates, and failed reads; all three must be 0.

Rebased on main e1d84b7 as 8be0c36: a18c180 conflicted with main after #2165 (both add a test at the same place in gamesave.rs). Nothing in the fix changed; the test now sits after #2165's.

Tested

  • On 8be0c36 unless said otherwise.
  • NVIDIA GeForce RTX 3080 Ti 12 GB (32-lane waves), driver 617.42 (32.0.16.1742); Ryzen 7 5800X; 48 GB RAM; Windows 11 Pro 26300.9974; rustc 1.98.1 msvc; DXC 1.8.2502.11 (Windows SDK 10.0.26100.0); tests in debug, smoke runs in release.
  • cargo test --locked -p xcl --lib -- gamesave: 12 passed, 0 failed.
  • The new test without the read_layout line (on the rebased tree before main e1d84b7, 81615a0): fails 5 of 5 runs (failed updates / mixed reads / failed reads per run: 21 / 68 / 0, 22 / 17 / 0, 15 / 6 / 0, 9 / 51 / 0, 16 / 47 / 0). With it: passes 5 of 5.
  • cargo build --workspace --locked, then cargo test --workspace --locked --no-fail-fast -- --test-threads=1 (LOCALAPPDATA pointed at an empty folder, no XCL_* variable): 1424 passed, 0 failed, 46 ignored, no driver event in Windows' log. SKIPPED (29 lines): 21 no wave64 cases, 3 per-lane forms refused as unsupported (V_MUL_F16, V_PK_MUL_F16, V_CVT_F16_F32), heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows), pso_measurement_compiles_an_exact_synthetic_record (needs Windows Developer Mode), and the three debug-layer cases (no d3d12SDKLayers.dll).
  • Earlier, on a18c180: @luckyteagirl ran the gamesave tests on AMD (RX 6800M), 11 passed, and the new test 20 of 20 times; @DavidM1911 the lib tests on an RTX 3060 Ti.

Regression run
scripts/smoke.ps1 -Game <retail title> -Seconds 180 with scripted A presses at 16, 20, 24, 28, 32 and 36 s (XCL_PRESS_A_AT) and nothing else, each run with an empty data root and its own copy of the same DXIL cache, nobody at the controller. main first, then this PR, 10 minutes apart:

xcl-smoke v1
commit: e1d84b7d9153f86a97d2ec5d209d196046fc0bea
gpu: NVIDIA GeForce RTX 3080 Ti
title: ab97764d
seconds: 180
exit: 0x0
frames shown: 3436 (PresentX 3436)
presents per 2 s (last 3): 48 50 46
device removals: 0
crashes: 0
peak commit: 16424 MB
xcl-smoke v1
commit: 8be0c3639f1df6e35d489bcf844227067d537f4f
gpu: NVIDIA GeForce RTX 3080 Ti
title: ab97764d
seconds: 180
exit: 0x0
frames shown: 3473 (PresentX 3473)
presents per 2 s (last 3): 43 42 43
device removals: 0
crashes: 0
peak commit: 16035 MB

Both reach the same screen and present to the end. No file was written under gamesave in either run, so these runs do not show that the title reaches the changed code. (A first run of the PR head was discarded: a real controller press at 98 s took it further than main's run.)

The earlier 60 s pair of 6020a33 / a18c180 had uncontrolled input; it is replaced by this pair.

Not tested

  • The change under a title: it is not known that the runs above reach it, so the race is shown only by the unit test.
  • AMD and Intel GPUs on 8be0c36 (AMD only for the gamesave tests on a18c180), wave64 hardware, the test suite in release.
  • The enumeration calls (XGameSaveEnumerateBlobInfo, XGameSaveEnumerateContainerInfo, XGameSaveGetRemainingQuota) still run without the lock. They open no blob, so they cannot block an update, but they can list a container partway through one. Not changed here.
  • Overlap: #543 and #1430 rewrite apply; neither locks read_layout.

AI use

  • Claude Code. Claude Opus 5.5 found the race, wrote the fix and the test, and ran the fail-before / pass-after runs. Claude Fable 5.2 ran the full-suite and smoke runs and wrote this description; Claude Opus 5.5 wrote the corrections of 2026-11-25, rebased it and ran the 180 s pair and the suite on 8be0c36.

🤖 Generated with Claude Code

<!-- greyfinch-sync:ivall/xcl:issue:5485872057 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2132). Originally posted by [dhillonjagdeep650-boop](https://github.com/dhillonjagdeep650-boop) on 2026-11-25T05:41:24Z. --- `XGameSaveReadBlobData` and `XGameSaveReadBlobDataAsync` read a container's blobs without the lock that `XGameSaveSubmitUpdate` holds while it replaces them one file at a time. A read that runs during an update can return some blobs from before the update and some from after it. It can also make the update fail: while the read has a blob open, `MoveFileExW` cannot replace that file, and `apply` returns `E_FAIL` with part of the update written (the half-applied state of #324, reached without a disk error). Found by reading the code and reproduced with a unit test; not seen in a title. **What is in it** - `crates/xcl/src/hle/xgameruntime/gamesave.rs`: `read_layout` takes `SAVE_MUTATION`, as `apply` and `delete_container` do (one line, plus the lock's comment). - Same file, test `reads_during_an_update_see_all_of_it_or_none`: one thread reads two blobs in a loop while another rewrites both in 30 updates. It counts failed updates, reads whose two blobs come from different updates, and failed reads; all three must be 0. **Rebased** on `main` `e1d84b7` as `8be0c36`: `a18c180` conflicted with `main` after #2165 (both add a test at the same place in `gamesave.rs`). Nothing in the fix changed; the test now sits after #2165's. **Tested** - On `8be0c36` unless said otherwise. - NVIDIA GeForce RTX 3080 Ti 12 GB (32-lane waves), driver 617.42 (32.0.16.1742); Ryzen 7 5800X; 48 GB RAM; Windows 11 Pro 26300.9974; rustc 1.98.1 msvc; DXC 1.8.2502.11 (Windows SDK 10.0.26100.0); tests in debug, smoke runs in release. - `cargo test --locked -p xcl --lib -- gamesave`: 12 passed, 0 failed. - The new test without the `read_layout` line (on the rebased tree before `main` `e1d84b7`, `81615a0`): fails 5 of 5 runs (failed updates / mixed reads / failed reads per run: 21 / 68 / 0, 22 / 17 / 0, 15 / 6 / 0, 9 / 51 / 0, 16 / 47 / 0). With it: passes 5 of 5. - `cargo build --workspace --locked`, then `cargo test --workspace --locked --no-fail-fast -- --test-threads=1` (`LOCALAPPDATA` pointed at an empty folder, no `XCL_*` variable): **1424 passed, 0 failed, 46 ignored**, no driver event in Windows' log. SKIPPED (29 lines): 21 `no wave64` cases, 3 per-lane forms refused as unsupported (`V_MUL_F16`, `V_PK_MUL_F16`, `V_CVT_F16_F32`), `heap_window_out_of_memory_falls_back_to_the_switch_form` (no heap windows), `pso_measurement_compiles_an_exact_synthetic_record` (needs Windows Developer Mode), and the three debug-layer cases (no `d3d12SDKLayers.dll`). - Earlier, on `a18c180`: @luckyteagirl ran the gamesave tests on AMD (RX 6800M), 11 passed, and the new test 20 of 20 times; @DavidM1911 the lib tests on an RTX 3060 Ti. **Regression run** `scripts/smoke.ps1 -Game <retail title> -Seconds 180` with scripted A presses at 16, 20, 24, 28, 32 and 36 s (`XCL_PRESS_A_AT`) and nothing else, each run with an empty data root and its own copy of the same DXIL cache, nobody at the controller. `main` first, then this PR, 10 minutes apart: ``` xcl-smoke v1 commit: e1d84b7d9153f86a97d2ec5d209d196046fc0bea gpu: NVIDIA GeForce RTX 3080 Ti title: ab97764d seconds: 180 exit: 0x0 frames shown: 3436 (PresentX 3436) presents per 2 s (last 3): 48 50 46 device removals: 0 crashes: 0 peak commit: 16424 MB ``` ``` xcl-smoke v1 commit: 8be0c3639f1df6e35d489bcf844227067d537f4f gpu: NVIDIA GeForce RTX 3080 Ti title: ab97764d seconds: 180 exit: 0x0 frames shown: 3473 (PresentX 3473) presents per 2 s (last 3): 43 42 43 device removals: 0 crashes: 0 peak commit: 16035 MB ``` Both reach the same screen and present to the end. No file was written under `gamesave` in either run, so these runs do not show that the title reaches the changed code. (A first run of the PR head was discarded: a real controller press at 98 s took it further than `main`'s run.) The earlier 60 s pair of `6020a33` / `a18c180` had uncontrolled input; it is replaced by this pair. **Not tested** - The change under a title: it is not known that the runs above reach it, so the race is shown only by the unit test. - AMD and Intel GPUs on `8be0c36` (AMD only for the gamesave tests on `a18c180`), wave64 hardware, the test suite in release. - The enumeration calls (`XGameSaveEnumerateBlobInfo`, `XGameSaveEnumerateContainerInfo`, `XGameSaveGetRemainingQuota`) still run without the lock. They open no blob, so they cannot block an update, but they can list a container partway through one. Not changed here. - Overlap: #543 and #1430 rewrite `apply`; neither locks `read_layout`. **AI use** - Claude Code. Claude Opus 5.5 found the race, wrote the fix and the test, and ran the fail-before / pass-after runs. Claude Fable 5.2 ran the full-suite and smoke runs and wrote this description; Claude Opus 5.5 wrote the corrections of 2026-11-25, rebased it and ran the 180 s pair and the suite on `8be0c36`. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
luckyteagirl commented 2026-11-25 07:05:31 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-25T06:22:12Z.


Independent native Windows check of exact PR head a18c180ce39a1b407e964e541be7c68a8bf94f50.

Tested

  • Windows 11 build 26200, Ryzen 9 5980HX, Radeon RX 6800M driver 30.0.13002.13003, Rust 1.99.0 MSVC, DXC/DXIL 1.9.2609.5. These are save-file tests; the GPU was not used.
  • cargo test --locked -p xcl --lib -j 2 gamesave -- --test-threads=1 --show-output: 11 passed, 0 failed, 0 ignored, including reads_during_an_update_see_all_of_it_or_none.
  • The concurrent read/update regression was then run in a separate cargo test process 20 times, sequentially, with --test-threads=1: 20/20 runs passed, each reporting 1 passed, 0 failed and no SKIPPED line. The test performs its 30 update/read rounds each time, so this is 600 rounds across the repeated runs.

This checks the race regression and neighboring GameSave tests on this Windows machine. I did not run a pre-fix negative control here, the full workspace suite, or a retail title save operation. The short title startup available on this machine does not reach GameSave calls. No game data was used or uploaded.

AI-assisted testing and report drafting with OpenAI Codex (GPT-6); I checked the exact revision, per-run log, and aggregate counts before posting.

<!-- greyfinch-sync:ivall/xcl:comment:7154719821 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2132#issuecomment-7154719821). Originally posted by [luckyteagirl](https://github.com/luckyteagirl) on 2026-11-25T06:22:12Z. --- Independent native Windows check of exact PR head `a18c180ce39a1b407e964e541be7c68a8bf94f50`. **Tested** - Windows 11 build 26200, Ryzen 9 5980HX, Radeon RX 6800M driver `30.0.13002.13003`, Rust 1.99.0 MSVC, DXC/DXIL 1.9.2609.5. These are save-file tests; the GPU was not used. - `cargo test --locked -p xcl --lib -j 2 gamesave -- --test-threads=1 --show-output`: **11 passed, 0 failed, 0 ignored**, including `reads_during_an_update_see_all_of_it_or_none`. - The concurrent read/update regression was then run in a separate `cargo test` process 20 times, sequentially, with `--test-threads=1`: **20/20 runs passed**, each reporting **1 passed, 0 failed** and no `SKIPPED` line. The test performs its 30 update/read rounds each time, so this is 600 rounds across the repeated runs. This checks the race regression and neighboring GameSave tests on this Windows machine. I did not run a pre-fix negative control here, the full workspace suite, or a retail title save operation. The short title startup available on this machine does not reach GameSave calls. No game data was used or uploaded. AI-assisted testing and report drafting with OpenAI Codex (GPT-6); I checked the exact revision, per-run log, and aggregate counts before posting.
DavidM1911 commented 2026-11-25 07:05:36 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T06:32:39Z.


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!

<!-- greyfinch-sync:ivall/xcl:comment:7154899660 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2132#issuecomment-7154899660). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T06:32:39Z. --- 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!
raylitebull commented 2026-11-25 11:09:21 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by raylitebull on 2026-11-25T10:46:11Z.


Code review on a18c180:

  • Acquiring SAVE_MUTATION inside read_layout (crates/xcl/src/hle/xgameruntime/gamesave.rs) cleanly prevents concurrent apply() updates from producing torn multi-blob reads, verified by reads_during_an_update_see_all_of_it_or_none.
  • Complementary to #2165 (1028ba5), which locks SAVE_MUTATION around each_blob enumeration.
  • Diff audited and CI workflow approved (running).

Remaining before merge: Build and test finishing green plus dual-vendor verification on a18c180.

<!-- greyfinch-sync:ivall/xcl:comment:7160147742 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2132#issuecomment-7160147742). Originally posted by [raylitebull](https://github.com/raylitebull) on 2026-11-25T10:46:11Z. --- Code review on `a18c180`: - Acquiring `SAVE_MUTATION` inside `read_layout` (`crates/xcl/src/hle/xgameruntime/gamesave.rs`) cleanly prevents concurrent `apply()` updates from producing torn multi-blob reads, verified by `reads_during_an_update_see_all_of_it_or_none`. - Complementary to `#2165` (`1028ba5`), which locks `SAVE_MUTATION` around `each_blob` enumeration. - Diff audited and CI workflow approved (running). **Remaining before merge:** `Build and test` finishing green plus dual-vendor verification on `a18c180`.
DavidM1911 commented 2026-11-26 08:04:40 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T07:30:12Z.


Re-verification on RTX 3060 Ti (Windows 11), new head merged with current main:

  • cargo test -p xcl --lib: 1 failure under parallel scheduling; clean on --test-threads=1 rerun (1310 passed, 0 failed, 27 ignored, 94s). Intermittent single-test flake — tracked in #1978.

Thanks!

— Devin

<!-- greyfinch-sync:ivall/xcl:comment:7185526781 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2132#issuecomment-7185526781). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-26T07:30:12Z. --- Re-verification on RTX 3060 Ti (Windows 11), new head merged with current `main`: - `cargo test -p xcl --lib`: 1 failure under parallel scheduling; clean on `--test-threads=1` rerun (**1310 passed, 0 failed, 27 ignored**, 94s). Intermittent single-test flake — tracked in #1978. Thanks! — Devin
Decodere commented 2026-11-27 10:03:41 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Decodere on 2026-11-27T10:03:41Z.


Independent desktop NVIDIA verification of PR #2132 at head 8be0c3639f1df6e35d489bcf844227067d537f4f (1 commit; exact parent & merge-base: e1d84b7d9153f86a97d2ec5d209d196046fc0bea, pre-#2555 ancestor of main).

Environment

  • GPU: NVIDIA GeForce RTX 4060 (8 GB / 7956 MiB reported by D3D12, Wave32-only Ada), driver 32.0.16.2114 (NVIDIA 621.14, WDDM 3.2)
  • CPU / RAM / OS: Intel Core i5-11400F (6C / 12T), 32 GB RAM (31.9 GiB usable), Windows 11 Home 26200 (Developer Mode off)
  • Toolchain: rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC, DXC 1.9.2609.5, --release

Targeted tests & build (8be0c363)

Command Result
cargo test --release -p xcl --lib hle::xgameruntime::gamesave:: -- --nocapture (3 consecutive runs) 12 passed; 0 failed; 0 ignored; 1313 filtered out × 3 (0.82s, 0.68s, 0.81s, 0 skipped; includes the new concurrent Windows 11 NTFS read-vs-update test reads_during_an_update_see_all_of_it_or_none)
cargo test --release -p xcl --lib hle::xgameruntime:: -- --nocapture (3 consecutive runs) 76 passed; 0 failed; 0 ignored; 1249 filtered out × 3 (0.91s, 1.02s, 1.04s; 75 executed + 1 self-skipped no system xgameruntime.dll on thunk_protocol_with_xcl_objects_on_pc_queues because Gaming Services is absent on this host)
cargo build --release -p xcl Clean build (1m 48s, exit 0, 0 new warnings in gamesave.rs)

Paired quiet 60 s retail smoke (title: 29640639)

Exact parent & merge-base (e1d84b7d9153f86a97d2ec5d209d196046fc0bea, cached baseline on the same machine):

xcl-smoke v1
commit: e1d84b7d9153f86a97d2ec5d209d196046fc0bea
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1531 (PresentX 1531)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 13982 MB

PR #2132 (8be0c3639f1df6e35d489bcf844227067d537f4f):

xcl-smoke v1
commit: 8be0c3639f1df6e35d489bcf844227067d537f4f
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1546 (PresentX 1547)
presents per 2 s (last 3): 61 60 60
device removals: 0
crashes: 0
peak commit: 14021 MB

Limits of coverage

  • Serializing read_layout behind SAVE_MUTATION is directly verified on Windows 11 NTFS by the new concurrent reads_during_an_update_see_all_of_it_or_none test (3/3 passes across 30 overlapping multi-blob updates per run) alongside the full gamesave:: (12/12, 0 skipped) and xgameruntime:: (75/76 executed, 1 self-skipped without system xgameruntime.dll) suites.
  • The 60 s retail smoke queries the XGameSave API implementation (QueryApiImpl -> XGameSave: XCL) and runs cleanly to steady 60 Hz with 0 device removals and 0 crashes, though it does not perform concurrent save-update/read races during startup; single-run frame/commit delta vs. the cached parent reflects normal startup variance.

AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).

<!-- greyfinch-sync:ivall/xcl:comment:7215426337 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2132#issuecomment-7215426337). Originally posted by [Decodere](https://github.com/Decodere) on 2026-11-27T10:03:41Z. --- Independent desktop NVIDIA verification of **PR #2132** at head `8be0c3639f1df6e35d489bcf844227067d537f4f` (`1` commit; exact parent & merge-base: `e1d84b7d9153f86a97d2ec5d209d196046fc0bea`, pre-`#2555` ancestor of `main`). ### Environment - **GPU:** NVIDIA GeForce RTX 4060 (8 GB / `7956 MiB` reported by D3D12, Wave32-only Ada), driver `32.0.16.2114` (NVIDIA `621.14`, WDDM 3.2) - **CPU / RAM / OS:** Intel Core i5-11400F (6C / 12T), 32 GB RAM (`31.9 GiB` usable), Windows 11 Home `26200` (Developer Mode off) - **Toolchain:** `rustc 1.100.0 (0ef1bc386 2026-11-09)` MSVC, DXC `1.9.2609.5`, `--release` ### Targeted tests & build (`8be0c363`) | Command | Result | | --- | --- | | `cargo test --release -p xcl --lib hle::xgameruntime::gamesave:: -- --nocapture` (3 consecutive runs) | `12 passed; 0 failed; 0 ignored; 1313 filtered out` × 3 (`0.82s`, `0.68s`, `0.81s`, `0` skipped; includes the new concurrent Windows 11 NTFS read-vs-update test `reads_during_an_update_see_all_of_it_or_none`) | | `cargo test --release -p xcl --lib hle::xgameruntime:: -- --nocapture` (3 consecutive runs) | `76 passed; 0 failed; 0 ignored; 1249 filtered out` × 3 (`0.91s`, `1.02s`, `1.04s`; `75` executed + `1` self-skipped `no system xgameruntime.dll` on `thunk_protocol_with_xcl_objects_on_pc_queues` because Gaming Services is absent on this host) | | `cargo build --release -p xcl` | Clean build (`1m 48s`, exit `0`, `0` new warnings in `gamesave.rs`) | ### Paired quiet 60 s retail smoke (`title: 29640639`) Exact parent & merge-base (`e1d84b7d9153f86a97d2ec5d209d196046fc0bea`, cached baseline on the same machine): ``` xcl-smoke v1 commit: e1d84b7d9153f86a97d2ec5d209d196046fc0bea gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1531 (PresentX 1531) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 13982 MB ``` PR #2132 (`8be0c3639f1df6e35d489bcf844227067d537f4f`): ``` xcl-smoke v1 commit: 8be0c3639f1df6e35d489bcf844227067d537f4f gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1546 (PresentX 1547) presents per 2 s (last 3): 61 60 60 device removals: 0 crashes: 0 peak commit: 14021 MB ``` ### Limits of coverage - Serializing `read_layout` behind `SAVE_MUTATION` is directly verified on Windows 11 NTFS by the new concurrent `reads_during_an_update_see_all_of_it_or_none` test (`3/3` passes across 30 overlapping multi-blob updates per run) alongside the full `gamesave::` (`12/12`, `0` skipped) and `xgameruntime::` (`75/76` executed, `1` self-skipped without system `xgameruntime.dll`) suites. - The 60 s retail smoke queries the `XGameSave` API implementation (`QueryApiImpl -> XGameSave: XCL`) and runs cleanly to steady 60 Hz with `0` device removals and `0` crashes, though it does not perform concurrent save-update/read races during startup; single-run frame/commit delta vs. the cached parent reflects normal startup variance. *AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).*
ClosetPie107 commented 2026-11-27 18:01:04 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by ClosetPie107 on 2026-11-27T18:01:04Z.


Tested on AMD / Linux: 8be0c363 (RX 9070 16 GB, RDNA4, Mesa 26.3.1 RADV; Ryzen 5 9600X, 32 GB; CachyOS; Proton Experimental experimental-11.0-20261112 with vkd3d-proton master ec207194 plus a local patch dropping the lpVtbl checks of command allocators and lists; DXC 1.9.2609.5; Rust 1.96.0, x86_64-pc-windows-gnu debug build, tests run under Wine)

The head as it is (base e1d84b7d), with main f9a0cb80 the same session as the baseline.

Tests (XCL_REQUIRE_GPU=wave64)

  • cargo test -p xcl --lib -- gamesave --test-threads=1: 12 passed, 0 failed, 0 ignored (includes reads_during_an_update_see_all_of_it_or_none).
  • cargo test --workspace --no-fail-fast -- --test-threads=4 with --skip compositor_blends_ui_plane_over_scene_plane --skip failed_restore_stops_before_importing_an_unbacked_window --skip grooming_leaves_a_window_under_1_gib_only_its_hole (the first loses the RADV device here, the other two run out of memory under Wine): lib 1289 passed, 9 failed, 26 ignored; main f9a0cb80 lib the same session: 1323 passed, 9 failed, 27 ignored (--test-threads=1 and two --test-threads=4 runs). All failures are among main's. The other binaries fail the same 3 tests as on main here (e2e, pls_quota, predication_e2e). d3d12_resource_and_sync ended the process, as it does on main here.

Not tested

  • A title's saves
  • A retail title
  • Native Windows, NVIDIA / Intel

AI use

  • Claude Code (Claude Opus 5.5) wrote the test scripts, ran the builds and tests on my machine and wrote this report.
<!-- greyfinch-sync:ivall/xcl:comment:7225029370 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2132#issuecomment-7225029370). Originally posted by [ClosetPie107](https://github.com/ClosetPie107) on 2026-11-27T18:01:04Z. --- **Tested on AMD / Linux: `8be0c363`** (RX 9070 16 GB, RDNA4, Mesa 26.3.1 RADV; Ryzen 5 9600X, 32 GB; CachyOS; Proton Experimental `experimental-11.0-20261112` with vkd3d-proton master `ec207194` plus a local patch dropping the `lpVtbl` checks of command allocators and lists; DXC 1.9.2609.5; Rust 1.96.0, `x86_64-pc-windows-gnu` debug build, tests run under Wine) The head as it is (base `e1d84b7d`), with `main` `f9a0cb80` the same session as the baseline. **Tests** (`XCL_REQUIRE_GPU=wave64`) - `cargo test -p xcl --lib -- gamesave --test-threads=1`: **12 passed, 0 failed**, 0 ignored (includes `reads_during_an_update_see_all_of_it_or_none`). - `cargo test --workspace --no-fail-fast -- --test-threads=4` with `--skip compositor_blends_ui_plane_over_scene_plane --skip failed_restore_stops_before_importing_an_unbacked_window --skip grooming_leaves_a_window_under_1_gib_only_its_hole` (the first loses the RADV device here, the other two run out of memory under Wine): lib 1289 passed, 9 failed, 26 ignored; `main` `f9a0cb80` lib the same session: 1323 passed, 9 failed, 27 ignored (`--test-threads=1` and two `--test-threads=4` runs). All failures are among `main`'s. The other binaries fail the same 3 tests as on `main` here (`e2e`, `pls_quota`, `predication_e2e`). `d3d12_resource_and_sync` ended the process, as it does on `main` here. **Not tested** - A title's saves - A retail title - Native Windows, NVIDIA / Intel **AI use** - Claude Code (Claude Opus 5.5) wrote the test scripts, ran the builds and tests on my machine and wrote this report.
Foniass commented 2026-12-01 07:26:56 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T07:26:56Z.


Triage (#1607) – head 8be0c36

No other open PR locks read_layout. On main, SAVE_MUTATION covers apply, delete_container and each_blob but not reads. #1430 adds the lock to the quota query only. No caller of read_layout holds SAVE_MUTATION, so the new lock cannot deadlock.
No problems found in the diff.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7304068645 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2132#issuecomment-7304068645). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T07:26:56Z. --- **Triage (#1607)** – head 8be0c36 No other open PR locks `read_layout`. On main, `SAVE_MUTATION` covers `apply`, `delete_container` and `each_blob` but not reads. #1430 adds the lock to the quota query only. No caller of `read_layout` holds `SAVE_MUTATION`, so the new lock cannot deadlock. No problems found in the diff. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/2132:upstream-pr/2132'
git switch 'upstream-pr/2132'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/2132'
git switch 'upstream-pr/2132'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/2132'
git switch 'upstream-pr/2132'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/2132'
git switch 'main'
git merge --squash 'upstream-pr/2132'
git switch 'main'
git merge --ff-only 'upstream-pr/2132'
git switch 'main'
git merge 'upstream-pr/2132'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!2122
No description provided.