Tests: a failed page move commits nowhere another test can reserve (#1487) #1671
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!1671
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1671"
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?
@Diskuss on GitHub · 2026-11-24 19:06 UTC · original
Diskuss:tests/kernelx-page-move-flake→main· +4 −3 · 1 files · 1 commits · drafthle::kernelx::tests::a_page_whose_move_fails_stays_mapped_where_it_wasfailed once in a parallel run (reported in #1487), withassertion failed: move_away(&mut away, old, at, page, false).is_err().The cause: to get "an address with nothing reserved", the test reserves 64 KiB and releases it again. In a parallel run, another test can reserve that address before
move_awayruns. TheMEM_COMMITthen succeeds,move_awaycopies the page's 64 KiB over the other test's memory, and returnsOk, so the assert fails. The other test's memory is also overwritten, which can make that test fail too.What is in it
crates/xcl/src/hle/kernelx.rs, test module only: the destination is now0xFFFF_8000_0000_0000, a kernel-space address. A commit there always fails, and no thread can reserve it.move_awayitself is unchanged.Tested
cargo test --workspace --no-fail-fast -- --test-threads=4on this head: 858 passed, 0 failed, 42 ignored, the same as mainc160d86. 1 SKIPPED printed (heap_window_out_of_memory_falls_back_to_the_switch_form); 2 debug-layer tests skip silently (no Graphics Tools installed). No device removal.--test-threads=16(the default here), 22 runs: 22 × 809 passed, 0 failed.c160d86, the failure is rare on this machine: 1 of 3 earliercargo test --workspaceruns at default threads (#1487). In today's runs: 0 of 20 with the test alone, 0 of 10 full-lib runs at 16 threads, and 0 of 30 full-lib runs at 32 threads. So the zero above shows that the change breaks nothing, but it does not prove the flake is gone. The cause above is from reading the code.Regression run
scripts/smoke.ps1on the retail title, 60 s, release build,XCL_NETWORK=0, AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0. Blocks copied unchanged:mainon4178e888, this PR on its head commit with no uncommitted changes.#[cfg(test)] mod testsonly, so this run only shows that the build is unaffected; it does not reach the changed test.Not tested
scripts/smoke.ps1on our machine (no game files); the regression run above is Toons29's. NVIDIA and Intel (but see the RTX 3060 Ticargo test -p xcl --libresult from DavidM1911 in the comments).AI use
🤖 Generated with Claude Code
@DavidM1911 on GitHub · 2026-11-24 21:26 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~22 ignored.Thanks!
@Toons29 on GitHub · 2026-11-25 03:35 UTC · original
Regression run of
85a743fdon the retail title, for this PR's Regression run section. Both blocks are fromscripts/smoke.ps1as printed, not edited:mainon4178e888, this PR on its head commit with no uncommitted changes, same title and time.Against the limits in CONTRIBUTING.md: 101 % of
main's frames, 100 % of its peak commit, no crash, no device removal.AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0,
cargo build --release -p xcl, 60 s,XCL_NETWORK=0. This is a regression check only: it does not show whether the run reaches the code this PR changes.AI use: Claude Code (Claude Opus 5.5) built both trees and ran
scripts/smoke.ps1; I checked the blocks before posting.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.