xmem tests: unmap only the mapped pages after the tile hold test #665
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/665"
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?
Imported from brcly/TuxBox. Originally posted by snoozedDev on 2026-12-02T22:10:35Z.
Summary
Since #660, the
tuxbox-xmemunit tests fail on every run on main under GE-Proton11-14's Wine.gpu_tile_hold_keeps_the_whole_private_span_mappedunmaps page 1 of its four-page aperture, and its clean-up then unmaps all four in one call. An unmap refuses a range with an unmapped page in it (unmap_single_private_span_rangereturnsERROR_INVALID_ADDRESS), somap(aperture, 4, null)returns NULL atphysical_backing.rs:248. The test panics while holdingPOOL, and six more tests fail on the poisoned lock.The change: the clean-up unmaps page 0 and pages 2 and 3 separately. Only that test's clean-up changes. Its assertions about the hold are unchanged and pass: the sibling page stays committed while the hold lives and is reserved again after release.
I left the provider alone. Whether an unmap should skip pages that are already unmapped is your call; the current check is explicit, so I treated it as intended.
I didn't run the game. Nothing here changes what the game runs.
This contribution was written by an AI agent (Claude Opus 5.5) operating under my supervision. I am accountable for it and will respond to review.
Tested
Run the checks relevant to this change.
xmem,lanes-selftestor D3D12 buffer controls on either card.The first box is unticked because the GPU suites the table names for
runtime/xmem/were not run. This PR only changes a unit test, so no Lanes scenario applies. The xmem unit tests ran under Wine, andtuxbox.py check --no-gpupassed (below).GPU, driver and backend: none (CPU-only unit tests under GE-Proton11-14's Wine).
The
Evidence:linetuxbox.py checkprints last, one per card (it names the commit it tested; run it on this pull request's head):(The one not run is the synthetic shaders through the runtime's DXC flags; no Linux DXC was on
PATH.)Commands run and their results:
a789a4e4)--test-threads=1The two failed runs with this PR are older rare failures, not in the changed test:
mapping_state_seqlock_tracks_active_and_completed_mutations(physical_backing.rs:815), once in 300 runs from a short path.gpu_pool_then_plain_cpu_view_upgrades_backing_and_keeps_mem_private(physical_backing.rs:420), once in 100 runs from cargo's output path. Line 420 is the acquire that #662 described as failing when the CPU view lands across a 4 MiB boundary; I didn't print the addresses in this run. It poisonedPOOLin that run, so the same six tests failed after it.Also run:
cargo fmt --all --checkandcargo +1.95.0 clippy --locked --target x86_64-pc-windows-msvc -p tuxbox-xmem --all-targets -- -D warnings: pass.-p tuxbox-xmemon a local nightly (not CI's pinned one): 1 passed, 56 ignored. The test keeps its Miri ignore.Checks
CI runs the code checks: the Python and Rust unit tests, the translator tests through DXC, a Windows typecheck, clippy, formatting, rustdoc, and Miri on the providers. It has no GPU.
If this pull request changes evidence JSON, regenerate the results table and the progress map and include both files:
This pull request changes no evidence JSON.
Imported from brcly/TuxBox. Originally posted by JeffreyBytes on 2026-12-03T15:42:03Z.
AMD run, plus the unit tests on GE-Proton11-15. RX 6700 XT 12 GB (
1002:73df), Mesa 26.3.1 RADV, GE-Proton11-15.On the head (
527e52b6), the full check had 15 passed and 2 failed. The failures are the #656 ones from the base, which is one commit behind main's fix:So I cherry-picked the commit onto
106120ca(6bfa5ac3) and ran it again. Those four passed, and the only failure wastexture-publication:I don't think that one is from this PR, since it only changes a unit test and
lanes.exeis the same binary as on main.106120capassed 17 of 17 on this card earlier today, so it's intermittent. It came with a compute ring (CPC) permission fault in the kernel log, and the ring reset worked. Afterwards it passed 28 more times on106120ca(20 alone, 8 full selftest runs), so it's rare.The xmem unit tests under GE-Proton11-15's Wine, same commits:
106120ca)106120ca--test-threads=1Same failure as you saw on 11-14: the panic at
physical_backing.rs:248, then the six tests on the poisoned lock. So it isn't specific to 11-14's Wine.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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.