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. |
|
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 |
|
At head The smallest candidate is to initialize the metadata and hook after the log is ready, immediately before cap assignment. I applied this reorder locally. 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 diffdiff --git a/crates/xcl/src/host.rs b/crates/xcl/src/host.rs
index 78fee5b1..945a7361 100644
--- a/crates/xcl/src/host.rs
+++ b/crates/xcl/src/host.rs
@@ -74,6 +74,8 @@ pub fn host_main(boot_path: &Path) -> i32 {
boot.config.title_memory_mb,
boot.config.title_memory
);
+ crate::report::init_emergency_meta(&boot);
+ crate::eh::install_alloc_error_hook();
// Keep the job object handle alive for the lifetime of the host run.
let _commit_cap = match crate::config::title_commit_cap_mb_from_env() {
@@ -107,8 +109,6 @@ pub fn host_main(boot_path: &Path) -> i32 {
std::thread::sleep(std::time::Duration::from_secs(10));
crate::hle::d3d12x::real::log_dispatch_chain_counts();
});
- crate::report::init_emergency_meta(&boot);
- crate::eh::install_alloc_error_hook();
// `XCL_ACTIVITY=1`: every 2 s what the title did since (a timeline of where it stops)
if std::env::var_os("XCL_ACTIVITY").is_some() {
let _ = std::thread::Builder::new().name("xcl-activity".into()).spawn(|| {AI use: Codex (GPT-6.2 Sol) tested and drafted the candidate; Codex (GPT-6.2 Astra) independently traced the host and OOM paths. |
c8301f1 to
9b2594a
Compare
|
No open or merged PR adds a process commit cap; #2544, #2585 and #2652 mention #1566 but change kernelx mappings and DXC admission, not this. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human. |
…#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). Initialize emergency report metadata and install the handle_alloc_error hook immediately before commit-cap assignment in host_main so early capped startup OOMs are captured. 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 and synthetic host_main early-OOM regression 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)
9b2594a to
c760cbb
Compare
|
Rebased onto |
|
merge-check
|
|
Linux / AMD RDNA4 (RADV, Wine + vkd3d-proton): full test suite on Merged onto Setup
Tested:
About the failures on
|
|
merge-check Windows / AMD RDNA4 (native D3D12) — workspace suite and commit-cap checks on Clean merge onto Setup
Tested
Counts are partial because two test processes aborted on each build.
Shared failures and process aborts
Retail smoke Ran
The capped run's local log confirmed the 64 MiB cap was active. The run did not yield an allocation-failure message or 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 |
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.