kernelx: a lazy page whose commit fails stays lazy, and says so #502
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!502
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/502/head"
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?
@Luislariosss on GitHub · 2026-11-24 01:03 UTC · original
Luislariosss:fix/lazy-commit-failure→main· +47 −2 · 1 files · 1 commits · closed without mergingFixes #467.
Tested
On: AMD Radeon RX 9060 XT (RDNA4, gfx1200), Adrenalin 26.10.1 (Windows driver 32.0.32015.7029), Windows 11 26200, MSVC 2022, base
2997c9aca.The new unit test reserves one page, marks it lazy, commits it with an allocator that fails and asserts the page is still in
LAZY; commits it with one that succeeds and asserts it is out; then asserts a page that was never lazy is not touched.Not tested
No regression run: I do not have the game package, so
scripts/smoke.ps1cannot be run here, andpr_check.pywill say so - the file is undercrates/xcl/src/, which it treats as runtime even though every added line is inside#[cfg(test)](this is the case #452 describes).The commit-limit failure itself was not reproduced against a title; only the unit test above covers it. The
xlog_warn!is new and could be noisy if the limit is reached with many pages at once - happy to cap it.AI use
Written by an AI agent under this repository's rules: the diff was produced by DeepSeek V4.1 Flash, with the design discussed with Gemini 4 Neon (T3 Code) and reviewed line by line by the operator, who ran the suites above.
CONTRIBUTING.mddoes not accept open-weight models for code andpr_check.pynamesdeepseek, so this PR does not meet that rule as written. I am declaring it rather than leaving it out: close it if that rule is firm, and keep the test idea for whoever writes it by hand.Regression run
None: no game package on this machine.
@TurGangS on GitHub · 2026-11-24 01:04 UTC · original
cool
@yyc160 on GitHub · 2026-11-24 02:06 UTC · original
Regression run, with a caveat about what it can and cannot show on this title.
main@2997c9a(two runs, idle GPU):This PR @
be9423c:Hardware and toolchain: RTX 5070 Ti (Blackwell, 32-lane), driver 32.0.16.1742, Windows 11, 32 GB, DXC 1.9.2609.
scripts/smoke.ps1 -Seconds 180, no uncommitted changes.The frame counts are not a performance signal on this title yet. Every activity line in the log of all three runs reads
0 draws, 0 dispatches— the title presents 871-1047 times and never submits a draw or a dispatch, i.e. it is sitting in a menu/loading state. That also explains why these runs were faster on a GPU that was 100 % busy with an unrelated job (1479 frames) than on an idle one: XCL was not using the GPU at all. So 1047 vs 871/953 says nothing about this change; it is the idle-spin rate of a menu.What the run does show: no crash, no device removal, exit 0x0, and peak commit 15052 MB against 15044/15061 on main — no memory regression.
The path this PR changes was not taken.
lazy pageappears zero times in the log, so no commit failed during these runs; the fix'scommit_withfailure branch never ran. The run therefore confirms "no regression", not "the fix works".Not tested: the actual failure case (a commit hitting the system commit limit). Triggering it would need either an artificial commit-limit pressure or a title that gets close to it — this machine has 32 GB and did not approach it. The unit test in the PR covers the behaviour; what is missing is a run where the branch is reached for real.
@asd3670576 on GitHub · 2026-11-24 10:25 UTC · original
Built and tested the PR head on a Windows 10 machine that has no Shader Model 6.6 and only a GNU toolchain. Every count below is pasted from the run, not written by hand.
Machine
x86_64-pc-windows-gnu(no MSVC, no Windows SDK:cargo buildhere needs MinGW-w64 on PATH or it dies witherror calling dlltool 'dlltool.exe': program not found), Ryzen 9 5950X (32 logical CPUs), 64 GB RAM.H:\leonida\dxc\bin\x64(XCL_DXC_DIR). Agility 1.620.2 atH:\leonida\agility\build\native\bin\x64(XCL_D3D12_DIR) but it cannot load on this OS build (noID3D12SDKConfiguration1before KB5029331), so the inbox runtime caps at Shader Model 6.5 and XCL's GPU recompiler path is unavailable here.xcl-smokeblock from this machine.Apply / build
git fetch --depth=1 https://github.com/ivall/xcl pull/502/head:pr502→be9423c6285a6a9b6cc373f53fcdd71d9a5a9970, checked out as-is: no rebase, no conflict resolution,git status --porcelainempty before the build and after it. (The first three unshallowed fetch attempts died withSSL_ERROR_SYSCALL, so the head came in shallow; the tree built is the head commit itself, verified by its sha.) The API reportsmergeable: true,mergeable_state: unstable.cargo build --release --workspace→ exit code 0:Tests
cargo test --release -p xcl --lib -- kernelx::lazy, three runs on the default thread count:cargo test --release -p xcl --lib -- gpu::recomp::dxc:cargo test --release -p xcl --lib -- kernelx::lazy gpu::recomp::dxc(both modules in one process, default threads):cargo test --release --workspace --no-fail-fast -- --test-threads=4→ exit code 0. 16test result:lines (one per test binary plus the doc-test run); the xcl lib is:all 16 are
ok; summed over them: 677 passed; 0 failed; 41 ignored. Skips, reported rather than counted as coverage: 86SKIPPEDlines, 84: no GPUand 2: no wave64, for exampleOne thing the new test output shows. The new warning prints an
os errorthat is not the commit error, because in the test the failing allocator is an injected closure that never callsVirtualAlloc, sostd::io::Error::last_os_error()reports whatever the thread last saw — here the zero code:(that message on an English display locale reads "The operation completed successfully. (os error 0)", which is an odd thing to print after "commit failed"). With a real
VirtualAllocfailure the last error would be set, so this looks like a test-path artifact rather than a bug in the fix; if you want the two apart, the test could callSetLastErroror the message could only be printed when an allocation was actually attempted.What this machine can and cannot verify. It can verify that the head builds in release with the GNU toolchain, that the new
a_failed_commit_leaves_the_page_lazytest passes (3/3, and 17/17 together with the dxc tests), and that nothing else in the workspace regresses. It cannot verify the failure it guards against: with 64 GB of RAM and a 153 GB commit limit (125 GB of it free) nothing here reachesERROR_COMMITMENT_LIMIT, so the branch only runs because the test injects a failing allocator, and the "could be noisy" question in the description cannot be measured on this machine either. And because the adapter caps at SM 6.5, no GPU test executed at all.AI use: an agent (DeepSeek Harness, "auto" route - I do not know the underlying model) built the head, ran the tests and pasted the output.
@raylitebull on GitHub · 2026-11-24 10:41 UTC · original
Closing per
CONTRIBUTING.md/pr_check.py, which does not accept open-weight models (DeepSeek) for code contributions. Thank you for declaring AI use transparently — the fix idea on #467 remains helpful for a compliant follow-up.Pull request closed