Repository navigation
Conversation
|
Independent Windows/NVIDIA validation of the commit cap. I merged PR head
24 SKIPPED messagesThe 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. |
|
Test report on a local merge of Setup: NVIDIA GeForce RTX 4070 Ti SUPER 16 GB, driver 621.01, 31.6 GB RAM, Windows 11 Pro. Retail title, What happened
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
No game data is included. The report was written with Claude Code (Claude Opus 5.5) from the run's |
|
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: f0dbb08 cherry-picked onto Run: the retail title, 300 s, A pressed at 15-35 s to reach the world,
Not tested: other caps, NVIDIA, a full Written with Claude Code from runs on this machine. |
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
Tested commit Tested
Note / possible follow-up (cross-linked with #1566): Not tested
AI use
|
XCL PR #1831 verificationClean detached head 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 Tested
Workspace failures and skips All 20 libtest summaries in The log had 25 lines beginning with Not tested Matched 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 |
|
Wine 11.0 / Linux, 16 GiB system RAM, RTX 4060 Laptop GPU (no GPU exercised by these tests): I built the exact PR head
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 |
e8d71df to
3a43562
Compare
|
Thanks for testing this under Wine 11.0 / Linux and catching that
|
|
Re-verification on RTX 3060 Ti (Windows 11): still a merge conflict with current |
|
GitHub shows no conflicts with current |
|
Independent Windows/NVIDIA check of head Tested
One source-review point: Suggested probe decision change- let Ok(exe) = std::env::current_exe() else {
- return Ok(());
- };
+ let exe = std::env::current_exe().map_err(|e| format!("commit-cap probe: current_exe failed: {e}"))?;
if !exe.file_stem().and_then(|s| s.to_str()).is_some_and(|s| s.eq_ignore_ascii_case("xcl")) {
- return Ok(());
+ return Err("commit-cap enforcement probe needs xcl.exe".into());
}
- let Ok(status) = std::process::Command::new(&exe)
+ let status = std::process::Command::new(&exe)
.env("XCL_COMMIT_CAP_PROBE", "1")
.env_remove("XCL_HOST")
.env_remove(crate::config::ENV_TITLE_COMMIT_CAP_MB)
.status()
- else {
- return Ok(());
- };
- if status.code() == Some(2) {
- return Err(format!("Job Object assignment succeeded without enforcing VirtualAlloc commit limits; {UNSUPPORTED_COMMIT_CAP_MSG}"));
+ .map_err(|e| format!("commit-cap probe: child launch failed: {e}"))?;
+ match status.code() {
+ Some(0) => Ok(()),
+ Some(2) => Err(format!("Job Object assignment succeeded without enforcing VirtualAlloc commit limits; {UNSUPPORTED_COMMIT_CAP_MSG}")),
+ other => Err(format!("commit-cap probe could not verify enforcement (exit {other:?})")),
}
- Ok(())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. |
…#1566) Part of xcl-dev#1566. Assisted-by: Antigravity (Gemini 4 Hydrogen)
…cl-dev#1566) Part of xcl-dev#1566. Record the active XCL_TITLE_COMMIT_CAP_MB limit and current process commit in MiB on D3D12 heap OOM warnings and before fatal Rust alloc-error fail-fast (writing allocation-free diagnostics to xcl.log and report.json). Detect hosts that do not enforce JOB_OBJECT_LIMIT_PROCESS_MEMORY (via ntdll!wine_get_version and a guarded xcl.exe child probe requiring exit status 0 on startup), warn and fail closed on any probe error or non-zero status without advertising an active cap, update unit tests for native Windows vs Wine and probe status decoding, and document that Linux cgroup MemoryMax / external free-RAM guards remain necessary under Wine/Linux. Assisted-by: Antigravity (Gemini 4 Hydrogen)
|
NVIDIA and AMD full-suite run, to go with the reports above by thehollowedone, since none of them covers AMD. Tested exact head Tested
Not tested
AI use
|
|
Independent AMD report for Tested
Regression run ( 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
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 |
3a43562 to
c8301f1
Compare
|
Good catch, thanks! Rebased onto |
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.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, and 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, and OOM formatting.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
32.0.15.9144), AMD Ryzen 5 7500F 6-Core Processor, Windows10.0.26200.0,rustc 1.100.0 (0ef1bc386 2026-11-09), debug (cargo test) & release (cargo build --release -p xcl).cargo build --workspaceandcargo build --release -p xcl: succeeded with zero new compiler warnings (3 pre-existing warnings:Atomic::fetch_updatedeprecation inreal.rsandxgameruntime/mod.rs,RetiringBatch::heapsdead-code warning invram.rs).c8301f11:cargo test -p xcl --lib commit_cap -- --nocapture --test-threads=1: 8 passed, 0 failed, 0 ignored (title_commit_cap_mb_parsing,alloc_error_hook_logs_active_commit_cap_and_writes_report,commit_cap_probe_reports_host_enforcement,commit_cap_probe_requires_exit_zero,commit_cap_query_and_oom_formatting,rejects_zero_and_overflow_commit_cap,title_commit_cap_enforced_only_when_positive,unsupported_commit_cap_enforcement_fails_closed).cargo test -p xcl --lib host -- --test-threads=4: 9 passed, 0 failed, 0 ignored.cargo test -p xcl --lib emergency_oom_report -- --test-threads=1: 1 passed, 0 failed, 0 ignored.XCL_COMMIT_CAP_PROBE=1on releasexcl.exe: exited0.cargo test --workspace --no-fail-fast -- --test-threads=4: 1454 passed, 1 failed (gpu::recomp::tests::gpu_clamp_and_omod_per_instructiononlane 0 v_pk_add_i16 clamp, pre-existing on RTX 3060), 47 ignored (SKIPPEDGPU/driver-cache/heap tests: 21no wave64, 3refusedwave32 per-lane ingpu::recomp::lower_dxil::tests, 1cannot disable the driver cacheinshaders::tests::pso_measurement_compiles_an_exact_synthetic_record, 1no heap windowsinheap_window_out_of_memory_falls_back_to_the_switch_form;XCL_SAMPLE_*tests skipped sample bodies because those env vars are unset).Regression run
main:
PR:
Not tested
host.rsandeh.rswere verified on Windows viaunsupported_commit_cap_enforcement_fails_closedandcommit_cap_probe_requires_exit_zero, and nativeunder_wine() == falsepaths ran end-to-end).no wave64on RTX 3060) andXCL_SAMPLE_*retail test inputs.XCL_TITLE_COMMIT_CAP_MBlimit (covered via synthetic 64 MiB subprocess tests).AI use
upstream/main, madeprobe_commit_cap_enforcementstrictly fail-closed on non-zero/error probe outcomes with unit tests, ran builds, workspace/targeted tests, release probe check, and smoke runs, and updated the PR description.