XGameRuntime: report save-container deletion failures #2797

Closed
CryingLaughing wants to merge 1 commit from upstream-pr/2807 into main
CryingLaughing commented 2026-11-26 14:05:43 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by CryingLaughing on 2026-11-26T14:05:43Z.


XGameSave returned success when the host filesystem failed to delete a container. The synchronous call and asynchronous result now return the filesystem error. Deleting a container that is already absent still succeeds.

What is in it

  • In crates/xcl/src/hle/xgameruntime/gamesave.rs, propagate errors from remove_dir_all through both deletion paths under the save-mutation lock.
  • Add a synthetic test that holds a save blob open, checks both results and the blob bytes, and retries after closing the handle.

Tested

  • Revision f0ec300d6005eb174b8c6832db08472aead8b78d on b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7. Its tree 74eb4cd6fd5320831d0eb9261fb1aa0b3df53818 matches the tested overlay. Windows 11 25H2 build 26200.9974, Intel Core i5-13600K, RTX 4080 driver 621.01, Rust 1.100.0 x64 MSVC, and DXC 1.8.2502.11. Debug build and test profiles.
  • The focused delete_container_reports_sharing_failure_and_can_retry test failed on the parent (0 passed, 1 failed) because both deletion paths reported 0x00000000. On the fixed tree it passed 1/1 with 0x80070020 (ERROR_SHARING_VIOLATION) in both paths, intact blob bytes, successful retry after closing the handle, and successful deletion of an already-absent container.
  • cargo build --workspace --locked -j 4 passed. cargo test --workspace --locked -j 4 -- --test-threads=4 --show-output reported 1,436 passed, 0 failed, 47 ignored, with 29 explicit skip messages in the pass count across 37 harnesses.

Regression run

Independent retail smoke by Anon64 compared release builds of main and this exact head on an RTX 3060 12 GB (driver 581.80), Core i9-14900KF, and Windows 11 build 26200. The 60-second runs used the same title. The head retained 101.1% of the baseline frames and used 104.0% of its peak commit, with zero crashes or device removals. The run did not establish whether the title reached the changed code.

main:

xcl-smoke v1
commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7
gpu: NVIDIA GeForce RTX 3060
title: 21222967
seconds: 60
exit: 0x0
frames shown: 1461 (PresentX 1462)
presents per 2 s (last 3): 10 1 1
device removals: 0
crashes: 0
peak commit: 23855 MB

PR:

xcl-smoke v1
commit: f0ec300d6005eb174b8c6832db08472aead8b78d
gpu: NVIDIA GeForce RTX 3060
title: 21222967
seconds: 60
exit: 0x0
frames shown: 1477 (PresentX 1477)
presents per 2 s (last 3): 9 0 6
device removals: 0
crashes: 0
peak commit: 24808 MB

Not tested

  • Cloud-backed save behavior. The focused test covers the synthetic local filesystem case.
<!-- greyfinch-sync:ivall/xcl:issue:5511475099 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2807). Originally posted by [CryingLaughing](https://github.com/CryingLaughing) on 2026-11-26T14:05:43Z. --- XGameSave returned success when the host filesystem failed to delete a container. The synchronous call and asynchronous result now return the filesystem error. Deleting a container that is already absent still succeeds. **What is in it** - In `crates/xcl/src/hle/xgameruntime/gamesave.rs`, propagate errors from `remove_dir_all` through both deletion paths under the save-mutation lock. - Add a synthetic test that holds a save blob open, checks both results and the blob bytes, and retries after closing the handle. **Tested** - Revision `f0ec300d6005eb174b8c6832db08472aead8b78d` on `b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7`. Its tree `74eb4cd6fd5320831d0eb9261fb1aa0b3df53818` matches the tested overlay. Windows 11 25H2 build 26200.9974, Intel Core i5-13600K, RTX 4080 driver 621.01, Rust 1.100.0 x64 MSVC, and DXC 1.8.2502.11. Debug build and test profiles. - The focused `delete_container_reports_sharing_failure_and_can_retry` test failed on the parent (0 passed, 1 failed) because both deletion paths reported `0x00000000`. On the fixed tree it passed 1/1 with `0x80070020` (`ERROR_SHARING_VIOLATION`) in both paths, intact blob bytes, successful retry after closing the handle, and successful deletion of an already-absent container. - `cargo build --workspace --locked -j 4` passed. `cargo test --workspace --locked -j 4 -- --test-threads=4 --show-output` reported **1,436 passed, 0 failed, 47 ignored**, with 29 explicit skip messages in the pass count across 37 harnesses. **Regression run** [Independent retail smoke by Anon64](https://github.com/xcl-dev/xcl/pull/2807#issuecomment-7195247567) compared release builds of main and this exact head on an RTX 3060 12 GB (driver 581.80), Core i9-14900KF, and Windows 11 build 26200. The 60-second runs used the same title. The head retained 101.1% of the baseline frames and used 104.0% of its peak commit, with zero crashes or device removals. The run did not establish whether the title reached the changed code. main: ``` xcl-smoke v1 commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7 gpu: NVIDIA GeForce RTX 3060 title: 21222967 seconds: 60 exit: 0x0 frames shown: 1461 (PresentX 1462) presents per 2 s (last 3): 10 1 1 device removals: 0 crashes: 0 peak commit: 23855 MB ``` PR: ``` xcl-smoke v1 commit: f0ec300d6005eb174b8c6832db08472aead8b78d gpu: NVIDIA GeForce RTX 3060 title: 21222967 seconds: 60 exit: 0x0 frames shown: 1477 (PresentX 1477) presents per 2 s (last 3): 9 0 6 device removals: 0 crashes: 0 peak commit: 24808 MB ``` **Not tested** - Cloud-backed save behavior. The focused test covers the synthetic local filesystem case.
Anon64 commented 2026-11-26 15:03:46 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Anon64 on 2026-11-26T14:44:10Z.


Regression run of f0ec300 on a newer retail title: no device removal, no crash, frames and commit within the limits.

Setup: RTX 3060 12 GB (NVIDIA 581.80), i9-14900KF, Windows 11 26200, release builds of main b49be18 (this PR's base) and of this PR's exact head, scripts/smoke.ps1 -Game <title> for 60 s with XCL_NETWORK=0 and A pressed every 4 s from 20 s. Main ran before and after a batch of 11 PRs and peaked at 23,855 and 23,844 MB, so the baseline held steady over the batch.

main:

xcl-smoke v1
commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7
gpu: NVIDIA GeForce RTX 3060
title: 21222967
seconds: 60
exit: 0x0
frames shown: 1461 (PresentX 1462)
presents per 2 s (last 3): 10 1 1
device removals: 0
crashes: 0
peak commit: 23855 MB

this PR:

xcl-smoke v1
commit: f0ec300d6005eb174b8c6832db08472aead8b78d
gpu: NVIDIA GeForce RTX 3060
title: 21222967
seconds: 60
exit: 0x0
frames shown: 1477 (PresentX 1477)
presents per 2 s (last 3): 9 0 6
device removals: 0
crashes: 0
peak commit: 24808 MB

101 % of main's frames, 103 % of its peak commit. One run each.

Not tested: the suite on this head; whether the title reaches the code this PR changes in its first 60 s; AMD.

AI use: Claude Code (Claude Opus 5.5) ran these runs on this machine and wrote this report.

<!-- greyfinch-sync:ivall/xcl:comment:7195247567 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2807#issuecomment-7195247567). Originally posted by [Anon64](https://github.com/Anon64) on 2026-11-26T14:44:10Z. --- **Regression run of `f0ec300` on a newer retail title: no device removal, no crash, frames and commit within the limits.** **Setup:** RTX 3060 12 GB (NVIDIA 581.80), i9-14900KF, Windows 11 26200, release builds of main `b49be18` (this PR's base) and of this PR's exact head, `scripts/smoke.ps1 -Game <title>` for 60 s with `XCL_NETWORK=0` and A pressed every 4 s from 20 s. Main ran before and after a batch of 11 PRs and peaked at 23,855 and 23,844 MB, so the baseline held steady over the batch. main: ``` xcl-smoke v1 commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7 gpu: NVIDIA GeForce RTX 3060 title: 21222967 seconds: 60 exit: 0x0 frames shown: 1461 (PresentX 1462) presents per 2 s (last 3): 10 1 1 device removals: 0 crashes: 0 peak commit: 23855 MB ``` this PR: ``` xcl-smoke v1 commit: f0ec300d6005eb174b8c6832db08472aead8b78d gpu: NVIDIA GeForce RTX 3060 title: 21222967 seconds: 60 exit: 0x0 frames shown: 1477 (PresentX 1477) presents per 2 s (last 3): 9 0 6 device removals: 0 crashes: 0 peak commit: 24808 MB ``` 101 % of main's frames, 103 % of its peak commit. One run each. **Not tested:** the suite on this head; whether the title reaches the code this PR changes in its first 60 s; AMD. AI use: Claude Code (Claude Opus 5.5) ran these runs on this machine and wrote this report.

Pull request closed

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!2797
No description provided.