XGameRuntime: blob_enumeration_sees_one_submitted_update fails on Windows NTFS (DirEntry::metadata cache) #2421
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#2421
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?
@Ritolino on GitHub · 2026-11-25 18:23 UTC · original
hle::xgameruntime::gamesave::tests::blob_enumeration_sees_one_submitted_update (added in #2165) fails on Windows 11 (NTFS), both under .\scripts\test.ps1 (--test-threads=4) and when run standalone:
thread 'hle::xgameruntime::gamesave::tests::blob_enumeration_sees_one_submitted_update' panicked at crates\xcl\src\hle\xgameruntime\gamesave.rs:1184:9: assertion left == right failed: 2 of 31 enumerations mixed submitted updatesRoot cause
Both pply and each_blob hold SAVE_MUTATION, so lobs_of does not run concurrently with MoveFileExW. However, lobs_of (crates\xcl\src\hle\xgameruntime\gamesave.rs:121) reads file sizes via DirEntry::metadata(), which on Windows returns the size cached in the NTFS directory index entry (FindNextFileW), which can lag behind an atomic MoveFileExW replacement across adjacent files.
Using std::fs::metadata(e.path()) (or File::metadata) instead of DirEntry::metadata() should bypass the directory-entry cache, though crates/xcl/src changes require xcl-smoke runs on a real title.
github-bot referenced this issue2026-11-26 05:32:48 +00:00
@oni-swr on GitHub · 2026-11-25 21:10 UTC · original
Claiming this issue: reproducing and fixing the Windows NTFS
DirEntry::metadata()cache race inhle::xgameruntime::gamesave::blobs_of, with regression verification.AI use: Claude Code (Claude Opus 5.5).