xcl run: add opt-in XCL_TITLE_COMMIT_CAP_MB job memory limit (#1566) #1821
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1831"
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 ivall/xcl. Originally posted by fixgep on 2026-11-24T21:34:17Z.
Adds an opt-in process commit cap via
XCL_TITLE_COMMIT_CAP_MB(disabled when unset or0) as an outer native-Windows safety fuse against runaway commit, plus OOM diagnostics when the cap is active. When set to a positive MiB value on native Windows, the host verifiesJOB_OBJECT_LIMIT_PROCESS_MEMORYenforcement (failing closed on Wine viantdll!wine_get_versionor unless a guardedxcl.exechild probe exits0after confirmingVirtualAllocis constrained), creates and assigns a Windows Job Object (ProcessMemoryLimit = cap_mb * 1024 * 1024) before mapping or starting the title, keeps the handle alive for the host run, logs a clear diagnostic namingXCL_TITLE_COMMIT_CAP_MBand current process commit on D3D12 heap OOM refusals, and records allocation-free failure details inxcl.logandreport.jsonbefore fatal Rust OOM fail-fast (0xc0000409). When enforcement is unsupported or cannot be verified (such as Wine/Linux or probe failure), XCL warns and leaves the cap inactive so logs and crash/OOM reports never advertise an unenforced limit. Part of #1566.The Job Object commit cap,
handle_alloc_erroremergency crash writer, andCreateHeapOOM diagnostics belong in a single PR because once the commit cap triggers, standard allocation-dependent panic and logging paths OOM themselves without the pre-allocated emergency detour. Shipping the cap without allocation-free emergency OOM reporting would leave capped runs crashing silently with noxcl.logorreport.jsonattribution.What is in it
crates/xcl/src/config.rs:ENV_TITLE_COMMIT_CAP_MB,parse_title_commit_cap_mb,title_commit_cap_mb_from_env, documentation noting native Windows Job Object dependency vs Linux cgroupMemoryMax/ external free-RAM guards, and unit tests for unset/zero/positive/invalid values.crates/xcl/src/host.rs,crates/xcl/src/main.rs,crates/xcl/src/util.rs:CommitCapJob,apply_commit_cap_mb,apply_commit_cap_from_env,check_commit_cap_enforcement(under_wine()check + fail-closedXCL_COMMIT_CAP_PROBEchild probe viaprobe_commit_cap_enforcement,probe_commit_cap_enforcement_with,interpret_commit_cap_probe_outcome, andcommit_cap_probe_main),active_commit_cap_mb,current_process_commit_bytes/current_process_commit_mb,format_commit_cap_oom,log_commit_cap_if_active,StackBuf; initializereport::init_emergency_metaandeh::install_alloc_error_hookinhost_main/host_main_withright after logging startup metadata and immediately before commit-cap assignment so early capped startup OOMs are captured; unit/subprocess tests verifying uncapped vs64MB cappedVirtualAlloc/Vec::try_reserve, unsupported/Wine fail-closed behavior, strict exit-0probe status decoding (commit_cap_probe_requires_exit_zero), probe exit status, OOM formatting, andhost_main_early_commit_cap_oom_writes_log_and_report.crates/xcl/src/hle/d3d12x/vram.rs,crates/xcl/src/hle/d3d12x/sparse.rs,crates/xcl/src/hle/d3d12x/real.rs: logXCL_TITLE_COMMIT_CAP_MB, the configured cap MiB, and current process commit MiB whenCreateHeap/CreateHeap1fails with OOM while the cap is active.crates/xcl/src/hooks.rs,crates/xcl/src/eh.rs,crates/xcl/src/log.rs,crates/xcl/src/report.rs: hookstd::alloc::handle_alloc_errorviahook_addr, write an allocation-free emergency line toxcl.log(write_emergency) and an allocation-freereport.json(write_emergency_alloc_errorusing pre-cached startup metadata andStackBuf) before0xc0000409fail-fast, with unit and subprocess tests (asserting active cap reporting on native Windows and no inactive cap advertisement on Wine).README.md: documentXCL_TITLE_COMMIT_CAP_MB=N, its hard-limit outer safety-fuse behavior, and the requirement for Linux cgroupMemoryMaxand/or external free-RAM guards under Wine/Linux.Tested
XCL_ADAPTER=warp), Windows,rustc 1.100.0 (0ef1bc386 2026-11-09), debug (cargo test) & release (cargo build -j 4 --release -p xcl).cargo build -j 4 --workspace,cargo test -j 4 --workspace --no-run,cargo build -j 4 --release -p xcl: exited0with 0 new warnings in modified files.c760cbb5(run with--test-threads=1on both RTX 3060 andXCL_ADAPTER=warp):cargo test -j 4 -p xcl --lib config::tests -- --test-threads=1: 10 passed, 0 failed, 0 ignored (RTX 3060 & WARP).cargo test -j 4 -p xcl --lib host::tests -- --test-threads=1: 9 passed, 0 failed, 0 ignored (RTX 3060 & WARP).cargo test -j 4 -p xcl --lib eh::tests::alloc_error_hook -- --test-threads=1: 1 passed, 0 failed, 0 ignored (RTX 3060 & WARP).cargo test -j 4 -p xcl --lib log::tests -- --test-threads=1: 1 passed, 0 failed, 0 ignored (RTX 3060 & WARP).cargo test -j 4 -p xcl --lib report::tests -- --test-threads=1: 13 passed, 0 failed, 0 ignored (RTX 3060 & WARP).cargo test -j 4 -p xcl --test d3d12_create_heap -- --test-threads=1: 3 passed, 0 failed, 0 ignored (RTX 3060 & WARP).Regression run
main:
PR:
Not tested
cargo test --workspacerun onc760cbb5(only targeted unit/integration suites and workspace compile/test-compile were run after the rebase).host.rsandeh.rswere verified on Windows viaunsupported_commit_cap_enforcement_fails_closedandcommit_cap_probe_requires_exit_zero).XCL_SAMPLE_*retail test inputs.AI use
feat/title-commit-cap-mbontoupstream/main(6bfb5c51), resolved merge conflicts inREADME.md,crates/xcl/src/eh.rs, andcrates/xcl/src/host.rs, ran builds, targeted RTX 3060 and WARP tests, and paired 60-second release smoke tests, and updated/validated the PR description.Imported from ivall/xcl. Originally posted by gabrielsteglich on 2026-11-24T22:21:05Z.
Independent Windows/NVIDIA validation of the commit cap.
I merged PR head
f0dbb087f3ec781bc740c816404f723fd7cd4e20ontomainat1d027e5c76c9a86a7ee2ca1cc677edf0be95d331locally, producing1336bdceaa1ba6063b941d6132a51ff44df694af.cargo test --offline --locked -p xcl --lib title_commit_cap -- --test-threads=4 --show-outputpassed both tests.title_commit_cap_mb_parsingandtitle_commit_cap_enforced_only_when_positivepassed, including the capped and uncapped subprocess cases.cargo build --offline --locked --workspacesucceeded.cargo test --offline --locked --workspace --no-fail-fast -- --test-threads=4 --show-outputreported 962 passed, 0 failed, and 43 ignored. Cargo's pass count includes cases that returned early. Optional sample-data tests were disabled.24 SKIPPED messages
The validation used synthetic tests. Startup and world loading with the cap enabled remain untested on this machine.
AI use — OpenAI's coding agent with GPT-6 ran the local validation and drafted this report.
Imported from ivall/xcl. Originally posted by tikD1337 on 2026-11-24T23:52:49Z.
Test report on a local merge of
main20cf130+ #1809, #1852, #1798 and this PR (release build).Setup: NVIDIA GeForce RTX 4070 Ti SUPER 16 GB, driver 621.01, 31.6 GB RAM, Windows 11 Pro. Retail title,
XCL_TITLE_COMMIT_CAP_MB=24000.What happened
xcl.logconfirms the cap:process commit cap: 24000 MB (XCL_TITLE_COMMIT_CAP_MB).CreateHeap(0x4000000 bytes, type 1, alignment 0x0, flags 0x0) refused (0x8007000e), each followed byno video memory for more pages of title textures (0x8007000E). Those are the last lines of the log.0xC0000409. There is noprocess ends with statusline and no thread dump inxcl.log, andreport.jsonhas"crash": null, "exit_code": null.What it does not show: whether the 24 GB was really reached or the limit counts more than the title's own commit. The same build without the cap grew by about 30 GB of commit in 100 s in the next two runs, and an external guard stopped them. So the cap likely did stop real growth here.
Two points for this PR
xcl.logandreport.jsondo not say why the run ended.No game data is included. The report was written with Claude Code (Claude Opus 5.5) from the run's
xcl.logandreport.json; the run was done by the person posting.Imported from ivall/xcl. Originally posted by zorde23 on 2026-11-25T00:40:38Z.
Test report on an AMD RX 6750 XT (12 GB, driver 32.0.21045.29003), Ryzen 7 5700X, 32 GB RAM (45 GB commit limit), Windows build 26200, release build.
What was tested:
f0dbb08cherry-picked ontomain80f4819(one conflict inconfig.rs, where #1053 addedparse_device_typeat the same place; kept both).XCL_TITLE_COMMIT_CAP_MB=20480. The same build also had local diagnostics (memory by kind, a commit guard), which are also in themainrun it is compared with.Run: the retail title, 300 s, A pressed at 15-35 s to reach the world,
XCL_PSO_PRELOAD=0,XCL_ACTIVITY=1.main80f48190xC0000409at 110 s0xC0000409at 101 s), here at 110 s.mainrun. So with this cap the texture pages and pools count against the 20,480 MB too.main, before the cap is reached.Not tested: other caps, NVIDIA, a full
cargo test --workspaceon this build.Written with Claude Code from runs on this machine.
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T00:50:50Z.
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~23 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
Imported from ivall/xcl. Originally posted by thiagocalile on 2026-11-25T01:19:24Z.
Tested commit
f0dbb08locally merged ontomain62265d3(1-spot conflict incrates/xcl/src/config.rswith #1053'sparse_device_type) on an AMD Radeon RX 6600 (8 GB VRAM, native wave64).Tested
32.0.21045.29003;XCL_ADAPTER=radeon), Ryzen 7 5700X3D, 47.9 GB RAM, Windows 11 (26200), Rust1.100.0MSVC, DXC1.8.2502.11.XCL_ADAPTER=radeon cargo test -p xcl --lib title_commit_cap -- --nocapture: 2 passed, 0 failed, 0 ignored (0.04 s).scripts/smoke.ps1world-load sweep (release,XCL_DIRECT_DXIL=1,XCL_PRESS_A_AT=15,25,35):exit 0x0, 2,348 frames (60 60 60), peak commit23,979 MB, 0 crashes.XCL_TITLE_COMMIT_CAP_MB=20480:exit 0x80000003, peak commit20,241 MB(CreateHeap(64 MiB)refused0x8007000Eat58.1 s).XCL_TITLE_COMMIT_CAP_MB=16384:exit 0xc0000409, peak commit16,224 MB(silent__fastfailinside XCL/CRT).Note / possible follow-up (cross-linked with #1566):
We also tested adding a 2 GiB soft title-only headroom in
kernelx.rs(VirtualAllocMEM_COMMIT,XMemAllocDefault,AllocateTitlePhysicalPages) below the hard job cap so XCL's own allocations don't trigger silent0xC0000409(full table & snippet in #1566). That turned0xC0000409into a clean logged refusal at16,384 MB(42.9 s), while confirming that above ~18.4 GB the remaining climb is XCL's ownvram::PagesCreateHeap(64 MiB)pools — so #1831 is best documented as an outer safety fuse against runaway commit (and needs a quick rebase onconfig.rs).Not tested
AI use
Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T04:25:54Z.
XCL PR #1831 verification
Clean detached head
f0dbb087f3ec781bc740c816404f723fd7cd4e20. The diff changesREADME.md,crates/xcl/src/config.rs, andcrates/xcl/src/host.rs.STOR-WINLAB ran Windows 11 Enterprise Evaluation x64 build 26200 on a Ryzen 7 3800X with Intel Arc A770 (16 GiB, driver 32.0.101.9175). DXC reported 1.9.2609.5. Rust was
rustc 1.100.0 (0ef1bc386 2026-11-09),x86_64-pc-windows-msvc. Cargo used unoptimized dev/test profiles with debug info and incremental compilation disabled.Tested
cargo build --workspaceandcargo test --workspace --no-runboth succeeded outside the Arc lock. The latter compiled 19 test binaries.cargo test -p xcl --lib commit_capwithXCL_ADAPTER=NONE_CPU_ONLYoutside the lock yielded 3 passed, 0 failed, 0 ignored, and 0 explicit skips. The tests covered unset, blank, zero, positive, and invalid input plus zero and overflow rejection by the Windows cap helper. Child processes committed 128 MiB viaVirtualAllocwith the cap unset or zero. Under the 64 MiB cap, Windows rejected that allocation with a memory-limit error accepted by the test, andVec::try_reservealso failed.cargo test --workspace --no-fail-fast -- --test-threads=4ran once underInvoke-ArcTest.ps1withXCL_ADAPTER=A770andRUST_TEST_NOCAPTURE=1. Cargo exited 1. All three PR tests passed again.Workspace failures and skips
All 20 libtest summaries in
pr1831-suite.log(19 binaries and one doctest run) total 941 passed, 19 failed, 42 ignored. The 18 library failures were in GPU DXIL and recompiler tests, including pipeline creation errors and result mismatches. The synthetic-title e2e failed itsRSSetDepthBiasXcheck when a blue pixel was expected to be green.The log had 25 lines beginning with
SKIPPED. Reasons included missing wave64 (17), refused wave32 per-lane cases (3), tiled resources tier below 2 (1), driver cache control (1), unavailable heap windows (1), and missing D3D12 debug-layer support (2). These are excluded from coverage.Not tested
Matched
mainbaseline, retail-title smoke run, and positive-cap enforcement through a livexcl runtitle launch. TheXCL_SAMPLE_*variables were unset, so game-data paths were outside coverage.AI use
T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high) ran the build and verification. Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against
pr1831-suite.logand published.Imported from ivall/xcl. Originally posted by pickles976 on 2026-11-26T03:23:37Z.
Wine 11.0 / Linux, 16 GiB system RAM, RTX 4060 Laptop GPU (no GPU exercised by these tests): I built the exact PR head
e8d71df7cd9cd3b4f4dfa88c9d999c6307f53764forx86_64-pc-windows-msvcand rancargo test --locked --target x86_64-pc-windows-msvc -p xcl --lib commit_cap -- --nocapture --test-threads=1under Wine. Result: 3 passed, 2 failed.host::tests::title_commit_cap_enforced_only_when_positive: the child successfully creates/assigns a 64 MiB Job Object withJOB_OBJECT_LIMIT_PROCESS_MEMORY, but its 128 MiBMEM_RESERVE|MEM_COMMITVirtualAllocsucceeds (host.rs:339), so the cap is not enforced in this Wine environment.eh::tests::alloc_error_hook_logs_active_commit_cap_and_writes_report: the 128 MiB allocation also succeeds, the child panics (allocation unexpectedly succeeded under 64 MB cap,eh.rs:1235), and the parent sees exit 101 instead of0xc0000409. The OOM hook/report path was therefore not exercised, not independently shown broken. The other three tests (parsing, commit query/formatting, zero/overflow rejection) pass. This is a Wine Job Object limitation observed here, not a native Windows regression or retail-title result.Please do not report the Windows job cap as an effective Linux/Wine host limit merely because assignment succeeds. Suggested fix: detect unsupported enforcement (small guarded child allocation probe, or explicit Wine detection), warn/fail closed for
XCL_TITLE_COMMIT_CAP_MBrather than advertising an active safety cap, and document that Linux cgroupMemoryMax+ external free-RAM guard remain necessary. Even with a working cap, low hard limits refuse allocations instead of throttling loading (#1566). Full local log:.compat-xcl/logs/verify-pr1831-wine-commit-cap.log(path on this machine; not attached). No title was launched.Imported from ivall/xcl. Originally posted by fixgep on 2026-11-26T04:32:23Z.
Thanks for testing this under Wine 11.0 / Linux and catching that
JOB_OBJECT_LIMIT_PROCESS_MEMORYassignment succeeds there without constrainingVirtualAlloc,@pickles976. I've rebased ontomain(b49be183) and updatedfeat/title-commit-cap-mb(3a435628) to address this:host.rs,main.rs):apply_commit_cap_mbnow checkscrate::util::under_wine()(ntdll!wine_get_version) before creating/assigning a Job Object or settingACTIVE_COMMIT_CAP_MB, andhost_mainadditionally runs a guarded child-process probe (XCL_COMMIT_CAP_PROBE=1viacommit_cap_probe_main) to verifyVirtualAllocis actually rejected byJOB_OBJECT_LIMIT_PROCESS_MEMORY. When enforcement is unsupported, XCL logs a warning pointing to Linux cgroupMemoryMax/ external free-RAM guards and leaves the cap inactive (active_commit_cap_mb() == 0), so neitherxcl.lognorreport.jsonadvertises an active limit.host.rs,eh.rs): Native Windows still runs the strict 64 MiBVirtualAlloc/Vec::try_reserveand real-OOMalloc_error_hookassertions; under Wine,title_commit_cap_enforced_only_when_positiveverifies fail-closed refusal,alloc_error_hook_logs_active_commit_cap_and_writes_reportexerciseshandle_alloc_erroremergency logging/reporting while assertingXCL_TITLE_COMMIT_CAP_MBis not advertised, andunsupported_commit_cap_enforcement_fails_closed+commit_cap_probe_reports_host_enforcementcover detection directly.README.md,config.rs): Clarified thatXCL_TITLE_COMMIT_CAP_MBis a native Windows outer safety fuse (low hard limits refuse allocations rather than throttling loading), that XCL disables it with a warning when Job Object limits are not enforced, and that Linux cgroupMemoryMax/ external free-RAM guards remain necessary under Wine/Linux.Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T06:28:03Z.
Re-verification on RTX 3060 Ti (Windows 11): still a merge conflict with current
mainon the new head — needs another rebase before it can be tested.Imported from ivall/xcl. Originally posted by fixgep on 2026-11-26T11:47:12Z.
GitHub shows no conflicts with current
mainand all CI checks are green on3a435628Imported from ivall/xcl. Originally posted by thehollowedone on 2026-11-26T16:12:26Z.
Independent Windows/NVIDIA check of head
3a435628on an RTX 3080 Ti (driver 621.35), Ryzen 7 9800X3D, Windows 11, rustc 1.99.1 MSVC. Synthetic tests only; no title files or retail run.Tested
cargo test --offline --locked -p xcl --lib commit_cap -- --nocapture --test-threads=1: 7 passed, 0 failed, 0 ignored, 0 skips. This includes the native child-process enforcement probe, capped and uncapped allocations, and the OOM log/report subprocess.cargo test --offline --locked -p xcl --lib emergency_oom_report -- --test-threads=1: 1 passed, 0 failed, 0 ignored, 0 skips.cargo test --offline --locked --workspace --no-fail-fast -- --test-threads=4: 1,442 passed, 1 failed, 47 ignored, with 25 explicit GPU skips (21 no wave64, 3 refused per-lane forms, 1 no heap windows). The sole failure wasconsole_mesh_caches_hlsl_compute_pass_in_memory_and_on_disk:cached_only console_mesh hit: "DXIL not compiled yet". The same isolated test fails with the same message on the PR's exact baseb49be183usingcargo test --offline --locked -p xcl --lib console_mesh_caches_hlsl_compute_pass_in_memory_and_on_disk -- --test-threads=1(0 passed, 1 failed). I did not run the full suite on the base.One source-review point:
probe_commit_cap_enforcementaccepts any child outcome except exit code 2. Ifcurrent_exeor child launch fails, the executable is renamed, or the child exits 3 (the probe's own Job setup-failure code), it returnsOk(()). The host can then log the cap as active without the promised enforcement check having succeeded. Native Windows enforcement passed here; I did not reproduce an unsupported host falsely accepting a cap. For the stated fail-closed contract, accept only probe exit 0; warn and leave the cap inactive on every other outcome. A small status-decoding test covering 0, 2, 3, launch error, and missing executable would protect that decision.Suggested probe decision change
AI use: Codex (GPT-6.2 Sol) inspected the exact head and base, ran the tests, checked the probe control flow, and drafted this report.
Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-26T17:14:50Z.
NVIDIA and AMD full-suite run, to go with the reports above by thehollowedone, since none of them covers AMD. Tested exact head
3a435628(on its baseb49be18).Tested
cargo build --workspace, thenXCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::const_and_null_mask_operands_agree_with_hlsl_on_the_gpu --skip gpu::recomp::lower_dxil::tests::mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu --skip gpu::dxil::fuzz_tests: 1431 passed, 0 failed, 45 ignored. SKIPPED (no wave64):a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu,a_per_lane_2d_or_3d_group_runs_on_the_gpu,coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu,cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu,dispatch_chain_native_wave64_builds_whole,gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware,the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu.title_commit_cap_mb_parsing,alloc_error_hook_logs_active_commit_cap_and_writes_report,rejects_zero_and_overflow_commit_cap,commit_cap_query_and_oom_formatting,unsupported_commit_cap_enforcement_fails_closed,commit_cap_probe_reports_host_enforcement,title_commit_cap_enforced_only_when_positive,emergency_oom_report_json_parses_without_heap_alloc.XCL_ADAPTER=radeon),cargo test --workspace -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1: 1442 passed, 0 failed, 47 ignored. SKIPPED:f16_programs_on_the_gpu(f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))),f16_programs_on_the_gpu(f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))),f16_programs_on_the_gpu(f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))),f16_programs_on_the_gpu(f16 packed, wave64, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))),f32_programs_on_the_gpu(f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))),f32_programs_on_the_gpu(f32 conversions, wave64, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))),heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).--skipleaves out tests that fail on main8b957bectoo, not because of this PR. On NVIDIA:heap_window_out_of_memory_falls_back_to_the_switch_form(#1651), the fourgpu::recomp::lower_dxil::tests::*_programs_on_the_gputests,const_and_null_mask_operands_agree_with_hlsl_on_the_gpuandmask_ff0_and_flbit_agree_with_hlsl_on_the_gpu(follow-up on #1651) fail becauserunner::skip_testturns their skips into failures underXCL_REQUIRE_GPU=mesh, andgpu::dxil::fuzz_testsseeds 70, 545, 1019 and 1507 failCreateComputePipelineStatewithE_OUTOFMEMORYon this card (drivers 616.64 and 621.40). On AMD:fuzz_validate_and_gpu_1fails on seed 540 (res[833]0x7 vs CPU 0x6). The AMD run does not setXCL_REQUIRE_GPU.Not tested
AI use
Imported from ivall/xcl. Originally posted by oni-swr on 2026-11-26T19:49:18Z.
Independent AMD report for
3a435628168f1732bb0345b7fd3150ff40c3a59c.Tested
XCL_ADAPTERunset), Ryzen 7 5700X3D, 64 GB, Windows 11 build 26200, rustc 1.100.0, debug profile for tests / release forxcl.exe, DXC from the Windows SDK. Exact PR head in a clean detached checkout (not merged ontomain), own target directory per checkout;mainwas8b957bec, merge-base below. Merge-base:b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7.cargo test --workspace --no-fail-fast -j 4 -- --test-threads=4 --nocapture: 1442 passed, 1 failed, 47 ignored. The one failure isgpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1(seed 722:res[30] = 0x1, CPU 0x7fffffff); it fails identically onmain6d12f58aon this adapter (cargo test -p xcl --lib fuzz_validate_and_gpu_1), so it is not caused by this PR.e2efailures from my setup (the test title was not built next to the e2e binary); aftercargo build --workspacethee2etest passed (cargo test -p xcl --test e2e), counts below include that rerun.f16_programs_on_the_gpu/f32_programs_on_the_gpuper-lane cases refused forV_MUL_F16,V_PK_MUL_F16orV_CVT_F16_F32, andheap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).config::tests::title_commit_cap_mb_parsing,host::tests::commit_cap_*,host::tests::unsupported_commit_cap_enforcement_fails_closed,eh::tests::alloc_error_hook_logs_active_commit_cap_and_writes_report). The retail runs did not setXCL_TITLE_COMMIT_CAP_MB, so the cap itself was not exercised on the title; they only show the default path is unchanged.Regression run (
scripts/smoke.ps1 -Seconds 60 -Title retail-title, one 60 s run each, same retail title, built from the merge-base and from this head)No device removal, no crash; 1295 frames vs 1545 (PresentX 1546) on the merge-base (83.8 %, above the 80 % threshold but the closest of the three), peak commit 14131 MB vs 15061 MB. With one run per build I cannot say how much of the frame difference is run-to-run noise.
Not tested
XCL_ADAPTERoverrides, any title other than the one retail title. No game data was committed or posted.AI use
Claude Code (Claude Sonnet 5.5) ran the tests and drafted this report. No game files, dumps, shader names or retail hashes are included; the title in the
xcl-smokeblocks is replaced withretail-title.Imported from ivall/xcl. Originally posted by fixgep on 2026-11-27T03:52:17Z.
Good catch, thanks! Rebased onto
main(8b957bec) and tightenedprobe_commit_cap_enforcementinc8301f11so it fails closed unless the probe exits0(covering non-zero exit codes, launch/missing-exe errors, and non-xclbinaries, with a unit test for the status handling). Also refreshed the test and smoke results in the description. @thehollowedoneImported from ivall/xcl. Originally posted by thehollowedone on 2026-11-27T15:51:15Z.
At head
c8301f11, the process cap is assigned inhost_mainbefore emergency report metadata and the allocation-error hook are initialized. Between those points, the host clonesBoot, runs shader preparation, and starts a thread. A fatal Rust allocation in that capped interval therefore bypasses the new emergencyxcl.logline andreport.json. The existing allocation-error subprocess test installs both reporting pieces before applying the cap, so it does not exercise this startup order.The smallest candidate is to initialize the metadata and hook after the log is ready, immediately before cap assignment. I applied this reorder locally.
cargo test --offline --locked -j 4 -p xcl --lib commit_cap -- --test-threads=1passed 8/0;emergency_oom_reportpassed 1/0 on the unchanged head; the releasexcl.exenativeXCL_COMMIT_CAP_PROBE=1exited 0.cargo build --offline --locked -j 4 --workspacepassed on the unchanged head. The candidate's full workspace run recorded 1,454 passed, 1 failed, 47 ignored, and 25 GPU skip notices, identical to the unchanged head. The sole failure,console_mesh_caches_hlsl_compute_pass_in_memory_and_on_disk(DXIL not compiled yet), also reproduced on the exact base8b957bec.A follow-up regression should force a Rust allocation failure early in capped preparation in a synthetic child and verify that the emergency log and parseable report include the active cap. I did not run that injection or a clean-commit paired smoke for this uncommitted candidate.
Candidate startup-order diff
AI use: Codex (GPT-6.2 Sol) tested and drafted the candidate; Codex (GPT-6.2 Astra) independently traced the host and OOM paths.
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T06:55:52Z.
Triage (#1607) – head
c760cbbNo open or merged PR adds a process commit cap; #2544, #2585 and #2652 mention #1566 but change kernelx mappings and DXC admission, not this.
The diff is about 1036 lines in 12 files. The description now says why the commit cap and the allocation-free OOM writer go together; the CreateHeap OOM log lines could still go separately.
It now merges cleanly into main.
Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
Imported from ivall/xcl. Originally posted by fixgep on 2026-12-01T16:17:19Z.
Rebased onto
upstream/main(6bfb5c51→c760cbb5) with conflicts inREADME.md,eh.rs, andhost.rsresolved, and updated the targeted RTX 3060 / WARP tests and paired 60 s smoke runs. The Job Object commit cap,handle_alloc_erroremergency crash writer, andCreateHeapOOM diagnostics are kept together because once the cap triggers, standard allocation-dependent panic and logging paths OOM themselves without the pre-allocated emergency detour.Imported from ivall/xcl. Originally posted by fromthemoonx on 2026-12-01T18:16:43Z.
merge-check
base:
6bfb5c5153head:
c760cbb52cmerge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2914 passed, 0 failed, 51 ignored (base: 2904 passed, 0 failed, 51 ignored); SKIPPED: 25 (22 no wave64, 2 no heap windows, 1 no GPU_UPLOAD heaps), the same set as base; failing: none
review: read the two commits, focusing on what the rebase touched (
host.rs,eh.rs,README.md) and the new commitc760cbb5. No correctness problem in the code read.c8301f11is fixed.host_main_withnow callsinit_emergency_metaandinstall_alloc_error_hook(host.rs:132-133) before the cap is applied (:136).commit_cap,emergency,oomfilters, 24 tests,--test-threads=1): 3 of 3 runs passed. They includehost_main_early_commit_cap_oom_writes_log_and_reportandunsupported_commit_cap_enforcement_fails_closed.xcl run <testgame> -- --hello, the e2e test's folder, debug build), one run per cap unless noted:XCL_TITLE_COMMIT_CAP_MB=16384: exit 0,process commit cap: 16384 MB (XCL_TITLE_COMMIT_CAP_MB)on the console and inxcl.log.128: exit 0x11.CreateHeap: allocation failed while XCL_TITLE_COMMIT_CAP_MB=128 MB is active (process commit 124 MB).256,512: the test title exits 0xe, withreport.jsonwritten.1024, run 1:memory allocation of 27104 bytes (align 8) failed while XCL_TITLE_COMMIT_CAP_MB=1024 MB is active (process commit 1023 MB) – aborting (0xc0000409)inxcl.log, andreport.jsonwritten (exit_code3221226505). The emergency path works when the failing allocation is Rust's.64, 8 runs:Shader preparation: No pipeline device: Not enough memory resources ... (0x8007000E)in the log;unhandled exceptionline, no cap line about the failure, noreport.json. These failing allocations were not Rust's;0 of 1 records processed after 115 s) until my 120 s timeout.1024, run 2: aftersparse windows: tile pool CreateHeap: allocation failed while XCL_TITLE_COMMIT_CAP_MB=1024 MB is activethe host stopped making progress. When my timeout ended the launcher, the host was still running at 1024 MB, and I killed it by hand.xcl.logorreport.jsonattribution" still happens when the allocation that fails is native (driver, D3D12, the crash logger itself), and a capped host can outlive its launcher.performance: none by default (the cap is off unless set). Set, it adds a child probe of
xcl.exeat host start.verdict: safe to merge
hardware / tool and model: RTX 3060 12 GB (610.88), Ryzen 7 5700X, Windows 11 Pro 26300 / Claude Code (Claude Opus 5.5)
Imported from ivall/xcl. Originally posted by ClosetPie107 on 2026-12-02T17:13:01Z.
Linux / AMD RDNA4 (RADV, Wine + vkd3d-proton): full test suite on
c760cbbMerged onto
main5eaadb54(clean merge) and compared withmainrun twice on the same machine.Setup
v3.1-83-gcae8353edand DXVKdxgi.dllfrom GE-Proton11-16, DXC 1.9.2609.5x86_64-pc-windows-msvcwithcargo-xwin; test binaries run under WineTested:
cargo xwin test --workspace --target x86_64-pc-windows-msvc --no-fail-fast -- --test-threads=4 --skip <31 tests>main5eaadb54main: none.main:gpu::recomp::tests::gpu_qsad_and_mqsad(flaky onmainunder Wine).About the failures on
mainand the 31 skipped tests (same for every PR in this batch)main's 177 failures under Wine come from #175: once a test has set up the real device, vkd3d-proton refuses the command allocators XCL adopts (d3d12_command_list_Reset: Invalid command allocator), and later tests getE_INVALIDARG(0x80070057). Running vkd3d-proton master with its vtable check taken out,hle::d3d12x::sparse::testsgoes from 106 passed / 38 failed to 144 / 0.std::terminate()(Cannot reliably convert LLVM pointer type, we cannot differentiate between Function and Private), which kills the whole test binary. They are the split-wave64, dispatch-chain and bridged-mask GPU tests,gpu_compute_mode_dispatch_abi,gpu_compute_thread_limits_leave_the_lanes_past_them_out, the twogpu_mesh_mode_*tests, andconsole_wave64_compute_through_the_pso_hook_dispatch_and_read_back, plusserialize_root_signature_strips_console_flags_and_preserves_pc_flags, whose null descriptor vkd3d-proton dereferences. The dxil-spirv ones crash the same way with vkd3d-proton master (f8c1cae8, dxil-spirv93ab44c5).mainwas run twice: same counts, same failure set.SKIPPEDlines (same asmain): no heap windows (2), no D3D12 debug layer (2-3), driver cache control not implemented in vkd3d-proton (1).Not tested: Windows, NVIDIA, a retail title /
scripts/smoke.ps1, a review of the diff. This is a test report, not amerge-check.AI use: omp (Claude Opus 5.5) merged, built and ran the suites on this machine, compared the results with
main, and drafted this report. The user asked for it to be posted.Imported from ivall/xcl. Originally posted by stijn-boer on 2026-12-02T17:18:34Z.
merge-check
base:
5eaadb54c1head:
c760cbb52cverdict: not yet: the workspace suite aborted on both builds, and the capped retail run did not produce an allocation-failure report.
Windows / AMD RDNA4 (native D3D12) — workspace suite and commit-cap checks on
c760cbbClean merge onto
mainat5eaadb54(merge commitfa58a8035dcef0ea197b8a0cb4df0603c6506d9b).git diff --checkwas clean.Setup
d3d12SDKLayers.dll, DXC 1.9.2609.5Tested
cargo build --workspacepassed.cargo test --workspace --no-fail-fast -- --test-threads=4 --show-outputexited 101. The table reuses the recordedmainrun from the same commit, machine, SDK, and command.SKIPPEDnoticesmainCounts are partial because two test processes aborted on each build.
main— none observed in the comparable results.--exact --test-threads=1 --show-output. These cover parsing, enforcement, and allocation-failure messages in the log and JSON report.uploads_start_from_each_subresources_statepassed.Shared failures and process aborts
fuzz_validate_and_gpu_1,fuzz_validate_and_gpu_3, andtwo_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobsreported failures on both builds.gpu_compute_e2etest processes exited with0xc0000409on both builds.Retail smoke
Ran
scripts/smoke.ps1 -Game <local folder> -Seconds 60 -Xcl <debug binary>withXCL_UMA_DRIVER=mixedfor title hash2c508222. Themainrow is from the prior run under that setup.main, cap unset0xc00004090xc0000409XCL_TITLE_COMMIT_CAP_MB=64The capped run's local log confirmed the 64 MiB cap was active. The run did not yield an allocation-failure message or
report.json. The focused tests exercised both diagnostics with a synthetic allocation failure.Not tested
Wine behavior, tests after the aborts, retail allocation-failure reporting, and frame performance.
AI use
Codex (GPT-6) merged and built the PR, ran the tests and smoke checks, compared the results with the prior
mainrun, and drafted this report.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.