Memory: the title's budget is reported but never enforced - a retail title reaches 94 GB of commit and takes the machine's commit limit #1566

Open
opened 2026-11-26 04:57:42 +00:00 by github-bot · 15 comments
Owner

@⁠tugasky on GitHub · 2026-11-24 17:43 UTC · original

What happens

title_memory_mb = 0 gives an anaconda title a 13 824 MB budget (crates/xcl/src/config.rs:117), and XMemGetWorkingSetStatistics reports it: usage is min(process_private, limit), so the title sees itself at 100%. No allocation is ever refused against that limit.

A retail title on this machine reaches 94 464 MB private (commit limit 103.1 GB: 31.1 GB RAM and a 72 GB pagefile) while every pool XCL reports stays flat. At the plateau XCL holds 99.5 GB of the commit limit, leaving ~3.6 GB for Windows and every other process: two other processes failed an allocation and died while that run was live, and a run carrying an unrelated local patch ended with memory allocation of 25834 bytes failed from XCL's own allocator. On the console that state cannot exist: an allocation past the title's budget fails with ERROR_NOT_ENOUGH_MEMORY, and a title that streams a world is written to evict a cache when it does.

What it is not: measured with a log-only probe

XCL_MEM_CENSUS (a VirtualQuery walk on the XCL_ACTIVITY tick next to byte counters per owner) in a guarded run that reached ~44 GB of commit (43 955 MB at the log's peak, 41 831 MB at the last sample), main 930e8b4, RX 9070 XT 16 GB driver 32.0.32029.2010, Ryzen 7 9700X, 31.1 GB, Windows 11 26200, release:

owner at ~44 GB
XCL resources for placed title textures: GPU arena / shared pages / resource of its own 934 (3 697 MB) / 529 (461 MB) / 418 (402 MB) = 4.5 GB in 1 881 resources
the title's own CreateCommittedResourceX 0 resources
title_textures kept in step 748 live, 43 dormant
XCL's own heap (counting global allocator) 761 MB live, 1 104 MB peak
target pages / arenas / sparse pools 3 602 / 311 / 896 MB, flat from ~18 s
video memory 6 403 MB local, 4 707 MB non-local, flat
the title's own VirtualAlloc / XMemAlloc 19 calls / 16 calls (95 MB)
physical pages 7 131 MB allocated, 11 491 MB mapped, 0 freed
committed regions 31 851 (1 519 at t=2 s), 99.5% private, ~5 MB each; 848 MB of 44.8 GB inside the title's 7 graphics reservations

So none of XCL's own accounting is the growth. What is left is the title's own allocator: its CRT malloc/HeapAlloc, i.e. ntdll heap segments of ~5 MB, ~1.4 GB/s, never returned. ntdll makes those VirtualAlloc calls itself, which is why the title's own import shows 19 calls in the whole run.

Why an enforced budget should change it

With a job object capping the process at 44 GB, the title's allocations failed mid-run and it kept presenting (42-60 presents per 2 s, 0 timed out) while the region count went 35 179 -> 177 709. The title tolerates allocation failure: that is exactly the signal a console budget produces and what its eviction path is written for, and it is the cheapest thing to test here.

Proposal

Refuse the title's allocations past title_memory_budget_mb() with ERROR_NOT_ENOUGH_MEMORY, as the console does. The title's heap reaches Windows through ntdll, below every import XCL resolves, so the mechanism that actually reaches it is a job object ProcessMemoryLimit on the host process (the one tests/console_dlls_e2e.rs caps itself with) - which counts XCL's own commit too, and on the console XCL's resources would be part of the same budget.

Two questions for the maintainer, since this changes behaviour:

  1. Default, or opt-in like #640's XCL_PAGE_BUDGET_MB? This repository's precedent for bounding memory is an opt-in knob.
  2. Do XCL's own resources count against the budget? They are 4.5 GB here, and on the console they would be part of the same 13.8 GB.

Repro and hazard

XCL_MEM_CENSUS=1 with XCL_ACTIVITY=1; the growth shows with the retail 1.0.2.1 package on any card. This is a machine hazard, not only a title stall: check Get-Process xcl | Select PrivateMemorySize64 during a run and verify a kill with Get-Process - a Start-Process object's .Kill() did not take once here and the run continued for another 180 s at 94 GB.

Related: #1268 (same runs; the fps drop there is a separate bug), #640, #800, #1048, #288, #505 (the watchdog that ends the run).

AI use: the probe, runs and this text were written by Claude (Anthropic) under my review on my machine; every number is from a run here, and no game data is included.

**@⁠tugasky** on GitHub · 2026-11-24 17:43 UTC · [original](https://github.com/xcl-dev/xcl/issues/1566) ### What happens `title_memory_mb = 0` gives an anaconda title a **13 824 MB** budget (`crates/xcl/src/config.rs:117`), and `XMemGetWorkingSetStatistics` reports it: usage is `min(process_private, limit)`, so the title sees itself at 100%. No allocation is ever refused against that limit. A retail title on this machine reaches **94 464 MB private** (commit limit 103.1 GB: 31.1 GB RAM and a 72 GB pagefile) while every pool XCL reports stays flat. At the plateau XCL holds 99.5 GB of the commit limit, leaving ~3.6 GB for Windows and every other process: two other processes failed an allocation and died while that run was live, and a run carrying an unrelated local patch ended with `memory allocation of 25834 bytes failed` from XCL's own allocator. On the console that state cannot exist: an allocation past the title's budget fails with `ERROR_NOT_ENOUGH_MEMORY`, and a title that streams a world is written to evict a cache when it does. ### What it is not: measured with a log-only probe `XCL_MEM_CENSUS` (a `VirtualQuery` walk on the `XCL_ACTIVITY` tick next to byte counters per owner) in a guarded run that reached **~44 GB** of commit (43 955 MB at the log's peak, 41 831 MB at the last sample), `main` `930e8b4`, RX 9070 XT 16 GB driver 32.0.32029.2010, Ryzen 7 9700X, 31.1 GB, Windows 11 26200, release: | owner | at ~44 GB | |---|---| | XCL resources for placed title textures: GPU arena / shared pages / resource of its own | 934 (3 697 MB) / 529 (461 MB) / 418 (402 MB) = **4.5 GB in 1 881 resources** | | the title's own `CreateCommittedResourceX` | **0 resources** | | `title_textures` kept in step | 748 live, 43 dormant | | XCL's own heap (counting global allocator) | 761 MB live, 1 104 MB peak | | target pages / arenas / sparse pools | 3 602 / 311 / 896 MB, flat from ~18 s | | video memory | 6 403 MB local, 4 707 MB non-local, flat | | the title's own `VirtualAlloc` / `XMemAlloc` | 19 calls / 16 calls (95 MB) | | physical pages | 7 131 MB allocated, 11 491 MB mapped, **0 freed** | | committed regions | **31 851** (1 519 at t=2 s), 99.5% `private`, ~5 MB each; 848 MB of 44.8 GB inside the title's 7 graphics reservations | So none of XCL's own accounting is the growth. What is left is the title's own allocator: its CRT `malloc`/`HeapAlloc`, i.e. ntdll heap segments of ~5 MB, ~1.4 GB/s, never returned. ntdll makes those `VirtualAlloc` calls itself, which is why the title's own import shows 19 calls in the whole run. ### Why an enforced budget should change it With a job object capping the process at 44 GB, the title's allocations failed mid-run and it **kept presenting** (42-60 presents per 2 s, `0 timed out`) while the region count went 35 179 -> 177 709. The title tolerates allocation failure: that is exactly the signal a console budget produces and what its eviction path is written for, and it is the cheapest thing to test here. ### Proposal Refuse the title's allocations past `title_memory_budget_mb()` with `ERROR_NOT_ENOUGH_MEMORY`, as the console does. The title's heap reaches Windows through ntdll, below every import XCL resolves, so the mechanism that actually reaches it is a job object `ProcessMemoryLimit` on the host process (the one `tests/console_dlls_e2e.rs` caps itself with) - which counts XCL's own commit too, and on the console XCL's resources would be part of the same budget. Two questions for the maintainer, since this changes behaviour: 1. Default, or opt-in like #640's `XCL_PAGE_BUDGET_MB`? This repository's precedent for bounding memory is an opt-in knob. 2. Do XCL's own resources count against the budget? They are 4.5 GB here, and on the console they would be part of the same 13.8 GB. ### Repro and hazard `XCL_MEM_CENSUS=1` with `XCL_ACTIVITY=1`; the growth shows with the retail 1.0.2.1 package on any card. This is a machine hazard, not only a title stall: check `Get-Process xcl | Select PrivateMemorySize64` during a run and verify a kill with `Get-Process` - a `Start-Process` object's `.Kill()` did not take once here and the run continued for another 180 s at 94 GB. Related: #1268 (same runs; the fps drop there is a separate bug), #640, #800, #1048, #288, #505 (the watchdog that ends the run). AI use: the probe, runs and this text were written by Claude (Anthropic) under my review on my machine; every number is from a run here, and no game data is included.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:57:42 +00:00
Author
Owner

@⁠tugasky on GitHub · 2026-11-24 17:58 UTC · original

Tested on my machine: the cap enforced, opt-in, and the title lives inside it

Rather than leave the experiment theoretical, I made the change locally (not a PR; the branch also carries the census diagnostics): XCL_TITLE_COMMIT_CAP_MB, off unless set, applied as the job object ProcessMemoryLimit on the host before the title is mapped, so an allocation past it fails with ERROR_NOT_ENOUGH_MEMORY the way the console's does. Run at 20 480 MB - XCL's own parts were ~6 GB in the uncapped run, so this leaves the title roughly the console's 13.8 GB. 300 s, then stopped by the script. Same machine and driver as above.

uncapped (earlier run) cap 20 480 MB
peak commit 94 464 MB private at 318 s 20 280 MB (99% of the cap) at 229 s; 17 432 MB at 297 s
commit after the peak stayed 94-99 GB fell ~2.8 GB
presents after 170 s 0-2 per 2 s (the stall of #1268) 62-63 every 2 s to 297 s
frames 3 000 in 318 s 8 795 in 300 s, one 0 window (t=2 s, start-up)
XCL's placed resources 934 + 529 + 418, 3 697 + 461 + 402 MB identical, 0 refused
exceptions none none

What this says:

  • the title lives inside a cap that size: it grows to ~20 GB, its allocations start failing, it gives ~2.8 GB back and keeps presenting at its frame rate. Nothing in XCL had to evict anything.
  • XCL's own resources do not have to be counted separately for the cap to work: 4.5 GB of the 20 GB was XCL's, the rest the title's heap, and the title still ran.
  • the frame rate is unchanged by the cap in this run, so the cost of the limit is not visible in presents.

Caveats: one run; and I cannot show the title was in the same world state as the 318 s run - the first minute (60-63 presents per 2 s) and the resource counters match, nothing more. The two questions in the issue body still stand (default vs opt-in, and counting XCL's own resources), and 20 480 MB is not the console's number: 13824 is the run that answers "does it survive inside the budget proper", and I can do that next if you want it.

AI use: the change, the run and this text were written by Claude (Anthropic) under my review on my machine; no game data is included.

**@⁠tugasky** on GitHub · 2026-11-24 17:58 UTC · [original](https://github.com/xcl-dev/xcl/issues/1566#issuecomment-7139968686) **Tested on my machine: the cap enforced, opt-in, and the title lives inside it** Rather than leave the experiment theoretical, I made the change locally (not a PR; the branch also carries the census diagnostics): `XCL_TITLE_COMMIT_CAP_MB`, off unless set, applied as the job object `ProcessMemoryLimit` on the host before the title is mapped, so an allocation past it fails with `ERROR_NOT_ENOUGH_MEMORY` the way the console's does. Run at **20 480 MB** - XCL's own parts were ~6 GB in the uncapped run, so this leaves the title roughly the console's 13.8 GB. 300 s, then stopped by the script. Same machine and driver as above. | | uncapped (earlier run) | cap 20 480 MB | |---|---|---| | peak commit | 94 464 MB private at 318 s | **20 280 MB (99% of the cap) at 229 s; 17 432 MB at 297 s** | | commit after the peak | stayed 94-99 GB | **fell ~2.8 GB** | | presents after 170 s | 0-2 per 2 s (the stall of #1268) | **62-63 every 2 s to 297 s** | | frames | 3 000 in 318 s | **8 795 in 300 s**, one 0 window (t=2 s, start-up) | | XCL's placed resources | 934 + 529 + 418, 3 697 + 461 + 402 MB | **identical**, 0 refused | | exceptions | none | none | What this says: - the title **lives inside a cap that size**: it grows to ~20 GB, its allocations start failing, it gives ~2.8 GB back and keeps presenting at its frame rate. Nothing in XCL had to evict anything. - XCL's own resources do not have to be counted separately for the cap to work: 4.5 GB of the 20 GB was XCL's, the rest the title's heap, and the title still ran. - the frame rate is unchanged by the cap in this run, so the cost of the limit is not visible in presents. Caveats: one run; and I cannot show the title was in the same world state as the 318 s run - the first minute (60-63 presents per 2 s) and the resource counters match, nothing more. The two questions in the issue body still stand (default vs opt-in, and counting XCL's own resources), and 20 480 MB is not the console's number: `13824` is the run that answers "does it survive inside the budget proper", and I can do that next if you want it. AI use: the change, the run and this text were written by Claude (Anthropic) under my review on my machine; no game data is included.
Author
Owner

@⁠ofc0urse on GitHub · 2026-11-24 18:06 UTC · original

A possible other source of the growth, from runs on a 32 GB machine today: DXC compiling the very large translated compute sources inside the XCL process. dxcompiler.dll allocates through its own CRT heap, so its memory shows up as private ntdll heap segments, the same as a title's heap would, and the Rust counting allocator does not see it. 930e8b4 already has the 154.6 MB HLSL program that throny and coenflict measured in #1269.

Tested: RTX 4060 Ti 8 GB, driver 621.24, Core i5-14400F, 32 GB RAM (commit limit ~70 GB at the time), Windows 11 Pro 26300, DXC 1.9.2602.17, release build of main 9e3831e with local test-only patches, XCL_HEAP_WINDOWS=1.

run title running? what commit did
title, world loading yes process commit 33 GB → 82 GB in about 40 s at ~520 s (~1.2 GB/s); xcl-dxc-0 was inside dxcompiler.dll in the thread dump when I stopped it with 0.7 GB of commit left
xcl shaders <pack> --precompile --only cs --pipelines no free commit 48 GB → 4.9 GB within about 2 minutes, process killed by my script
same, sources over 8 MB refused (local patch) no six sources refused (12.0, 12.3, 12.7, 29.5, 29.6 and 147.4 MB of HLSL); free commit flat at 47–52 GB through 975+ pipelines, sources of 4–4.6 MB built in 21–126 s each

The second row has no title at all and grows the same way, at a rate close to the ~1.4 GB/s above. Your cap result fits this too: if a DXC allocation fails, that compile ends with an error, its program is refused, and the title goes on presenting.

I have not run your census, and this is NVIDIA, not AMD (DXC itself runs on the CPU the same way). A check that would tell the two apart on your machine: XCL_THREAD_DUMP_AT at a few points of the plateau's growth, and whether an xcl-dxc-* thread is inside dxcompiler.dll each time; or one run with the >8 MB sources refused. If it is DXC, a cap on the whole process would hide it rather than fix it (#1526 has the per-flag numbers: neither -O0 nor -O1 gets through these sources here).

AI use: Claude Code (Claude Opus 5.5) ran the builds and runs and wrote this; I checked it before posting.

**@⁠ofc0urse** on GitHub · 2026-11-24 18:06 UTC · [original](https://github.com/xcl-dev/xcl/issues/1566#issuecomment-7140177866) A possible other source of the growth, from runs on a 32 GB machine today: DXC compiling the very large translated compute sources inside the XCL process. `dxcompiler.dll` allocates through its own CRT heap, so its memory shows up as private ntdll heap segments, the same as a title's heap would, and the Rust counting allocator does not see it. `930e8b4` already has the 154.6 MB HLSL program that throny and coenflict measured in #1269. **Tested:** RTX 4060 Ti 8 GB, driver 621.24, Core i5-14400F, 32 GB RAM (commit limit ~70 GB at the time), Windows 11 Pro 26300, DXC 1.9.2602.17, release build of `main` `9e3831e` with local test-only patches, `XCL_HEAP_WINDOWS=1`. | run | title running? | what commit did | |---|---|---| | title, world loading | yes | process commit 33 GB → 82 GB in about 40 s at ~520 s (~1.2 GB/s); `xcl-dxc-0` was inside `dxcompiler.dll` in the thread dump when I stopped it with 0.7 GB of commit left | | `xcl shaders <pack> --precompile --only cs --pipelines` | **no** | free commit 48 GB → 4.9 GB within about 2 minutes, process killed by my script | | same, sources over 8 MB refused (local patch) | **no** | six sources refused (12.0, 12.3, 12.7, 29.5, 29.6 and 147.4 MB of HLSL); free commit flat at 47–52 GB through 975+ pipelines, sources of 4–4.6 MB built in 21–126 s each | The second row has no title at all and grows the same way, at a rate close to the ~1.4 GB/s above. Your cap result fits this too: if a DXC allocation fails, that compile ends with an error, its program is refused, and the title goes on presenting. I have not run your census, and this is NVIDIA, not AMD (DXC itself runs on the CPU the same way). A check that would tell the two apart on your machine: `XCL_THREAD_DUMP_AT` at a few points of the plateau's growth, and whether an `xcl-dxc-*` thread is inside `dxcompiler.dll` each time; or one run with the >8 MB sources refused. If it is DXC, a cap on the whole process would hide it rather than fix it (#1526 has the per-flag numbers: neither `-O0` nor `-O1` gets through these sources here). AI use: Claude Code (Claude Opus 5.5) ran the builds and runs and wrote this; I checked it before posting.
Author
Owner

@⁠tugasky on GitHub · 2026-11-24 18:10 UTC · original

Ran the cap at the console's own number, XCL_TITLE_COMMIT_CAP_MB=13824. It does not survive: the title dies in start-up, twice, at 11.7 s.

Same build and guard as the 20 480 MB run above; two runs 40 minutes apart, both exit -1073740791 (0xC0000409).

t commit of 13 824 presents target pages / sparse pools
2.0 s 6 007 MB 43% 30 0 MB / 320 MB
4.0 s 8 472 MB 61% 30 116 MB / 320 MB
6.1 s 9 916 MB 71% 63 116 MB / 320 MB
8.2 s 11 332 MB 81% 63 116 MB / 320 MB
10.4 s 13 066 MB 94% 64 216 MB / 896 MB
11.7 s dead

How it dies, 1 ms before the exit: XCL's own allocation is the first to be refused — pages of title textures ... refused (0x8007000E). The title then raises an unhandled 0x80000003 in game_scarlett_master.exe+0x16477d03 (entire stack in title code) and goes down. The second run died at the same tenth of a second with no exception logged at all, i.e. inside an XCL allocation. The census at 10.5 s: 13 881 MB committed (private 13 045, mapped 551, image 284), of which physical pages for the title's resources 7 131 MB, the 4 GiB coherent window, and XCL's Rust heap 697 MB live; 383 title textures live, 0 refused on the placed-resource path. So the title was mid-load, not idle.

That answers my own second question: yes, XCL's commit counts against the cap, and at the console number it starves the title during the one phase where the title cannot evict. XCL's page backing alone is 7.1 GB by 10 s, so 13 824 MB leaves the title well under half of the console's budget, the first denial is in XCL's allocator, and a required resource that cannot be allocated is fatal at start-up — unlike the 20 480 MB run, where the cap was first touched at 229 s, past loading, and every denial was tolerated.

So 13 824 is a lower bound on "a cap that leaves the title 13 824 MB", not the number itself. Two ways to spend the budget honestly, and only one of them is measurable here:

  1. cap = budget + XCL's own commit. The 20 480 MB run sits in that range (the same start-up burst was at 10 940 MB by 10.4 s and the title ran 300 s), but "XCL's own" moves with the scene.
  2. enforce the budget where XCL already does its title-memory accounting - pages, pools, arenas, the place #640's XCL_PAGE_BUDGET_MB asks for - so the title gets exactly 13 824 MB whatever XCL itself costs. This one I cannot approximate with a job object, and it is the only one that would match the console.

Which of those do you want the knob to mean? I will run whichever it is; the code is local and unmerged, about 90 lines (crates/xcl/src/commit_cap.rs, installed before the title is mapped, off unless the variable is set).

Caveats unchanged: one machine, a headless run stopped by my script, the title never reaching the world-load state of a long session, and a cap the title can hit only indirectly (the CRT's heap is ntdll's own, below every import XCL resolves, so the job object is the only handle on it).

Found this by doing it on my machine; the run and this text were written by Claude (Anthropic) under my review on my machine; no game data is included.

**@⁠tugasky** on GitHub · 2026-11-24 18:10 UTC · [original](https://github.com/xcl-dev/xcl/issues/1566#issuecomment-7140271276) **Ran the cap at the console's own number, `XCL_TITLE_COMMIT_CAP_MB=13824`. It does not survive: the title dies in start-up, twice, at 11.7 s.** Same build and guard as the 20 480 MB run above; two runs 40 minutes apart, both exit `-1073740791` (`0xC0000409`). | t | commit | of 13 824 | presents | target pages / sparse pools | |---|---|---|---|---| | 2.0 s | 6 007 MB | 43% | 30 | 0 MB / 320 MB | | 4.0 s | 8 472 MB | 61% | 30 | 116 MB / 320 MB | | 6.1 s | 9 916 MB | 71% | 63 | 116 MB / 320 MB | | 8.2 s | 11 332 MB | 81% | 63 | 116 MB / 320 MB | | 10.4 s | 13 066 MB | 94% | 64 | 216 MB / 896 MB | | 11.7 s | dead | | | | How it dies, 1 ms before the exit: **XCL's own allocation is the first to be refused** — `pages of title textures ... refused (0x8007000E)`. The title then raises an unhandled `0x80000003` in `game_scarlett_master.exe+0x16477d03` (entire stack in title code) and goes down. The second run died at the same tenth of a second with no exception logged at all, i.e. inside an XCL allocation. The census at 10.5 s: 13 881 MB committed (private 13 045, mapped 551, image 284), of which physical pages for the title's resources 7 131 MB, the 4 GiB coherent window, and XCL's Rust heap 697 MB live; 383 title textures live, 0 refused on the placed-resource path. So the title was mid-load, not idle. That answers my own second question: **yes, XCL's commit counts against the cap, and at the console number it starves the title during the one phase where the title cannot evict.** XCL's page backing alone is 7.1 GB by 10 s, so 13 824 MB leaves the title well under half of the console's budget, the first denial is in XCL's allocator, and a required resource that cannot be allocated is fatal at start-up — unlike the 20 480 MB run, where the cap was first touched at 229 s, past loading, and every denial was tolerated. So `13 824` is a lower bound on "a cap that leaves the title 13 824 MB", not the number itself. Two ways to spend the budget honestly, and only one of them is measurable here: 1. cap = `budget + XCL's own commit`. The 20 480 MB run sits in that range (the same start-up burst was at 10 940 MB by 10.4 s and the title ran 300 s), but "XCL's own" moves with the scene. 2. enforce the budget where XCL already does its title-memory accounting - pages, pools, arenas, the place #640's `XCL_PAGE_BUDGET_MB` asks for - so the title gets exactly 13 824 MB whatever XCL itself costs. This one I cannot approximate with a job object, and it is the only one that would match the console. Which of those do you want the knob to mean? I will run whichever it is; the code is local and unmerged, about 90 lines (`crates/xcl/src/commit_cap.rs`, installed before the title is mapped, off unless the variable is set). Caveats unchanged: one machine, a headless run stopped by my script, the title never reaching the world-load state of a long session, and a cap the title can hit only indirectly (the CRT's heap is ntdll's own, below every import XCL resolves, so the job object is the only handle on it). Found this by doing it on my machine; the run and this text were written by Claude (Anthropic) under my review on my machine; no game data is included.
Author
Owner

@⁠tugasky on GitHub · 2026-11-24 19:15 UTC · original

More data: a cap sweep, and then 20 minutes at 20 480 MB. The 20 480 number turned out to be the edge, not a generous ceiling.

Sweep, XCL_TITLE_COMMIT_CAP_MB, same build and guard. A 90 s probe first, then a 420 s run for the ones that passed:

cap 90 s probe 420 s run
13 824 died 11.7 s, twice -
16 384 died 11.7 s (last commit line 14 263 MB) -
18 432 alive at 90 s, peak 17 389 MB died 14.9 s, exit 0x80000003
19 456 alive at 90 s, peak 18 368 MB died 42.8 s, exit 0xC0000005
20 480 - survived 1 200 s

Two things I did not expect:

  • A 90 s survival is not a pass. Both marginal caps got through start-up once and died in the load phase.
  • At 18 432 the title died on a 43.5 MB allocation while the census said 16 143 MB of 18 432 MB (87%). The job object's meter counts more than PrivateUsage (mapped sections and the commit behind them), so "how much headroom is left" in my log is a floor, not the answer. At 19 456 it died at 99% instead - a 64 MB commit refused, then an access violation writing to 0xc73f50000, with xcl.exe frames under the title's on the stack. A refused commit came back to the title as a bad write rather than a clean 0x8007000E. That looks like a real robustness hole rather than a property of the cap - happy to file it separately if you want it tracked on its own.

The 20-minute run at 20 480 MB:

t commit of the cap
60 s 18 390 MB 90%
180 s 19 747 MB 96%
294 s 20 478 MB 99.99%
297 s 15 909 MB 78%
300-1 141 s 15 908-15 910 MB, no creep 78%

567 activity windows, 35 344 frames, 60-64 presents in every 2 s window from 61 s to 1 141 s, the only empty windows at t=2/4/6 (start-up), 0 refusals on the placed-resource path, 0 exceptions. The fold I reported last time was real and it happens at ~295 s (4.5 GB given back in 3 s); after it the title holds 15.9 GB to the megabyte for fifteen minutes while rendering at the same rate. Uncapped, the same title went 44 GB -> 94 GB.

So: this title's load peak genuinely wants ~20.5 GB of whole-process commit on this machine - 20 480 is where it just fits and has to fold. With XCL's own share measured at 7.1 GB of pages plus 0.7 GB of Rust heap at that point, "budget + XCL's own" lands at ~20.5 GB, which is exactly the edge I ran. That is the strongest argument I have for accounting the budget inside XCL rather than on the process: as a job-object cap the number is only right for one machine state.

Still one machine, headless, script-stopped, and the title never reaches a full world-load state. All runs and the analysis are in my local notes; code is unchanged from last week (~90 lines, unmerged).

Written by Claude (Anthropic) under my review on my machine; every number is from a run here, and no game data is included.

**@⁠tugasky** on GitHub · 2026-11-24 19:15 UTC · [original](https://github.com/xcl-dev/xcl/issues/1566#issuecomment-7141842859) **More data: a cap sweep, and then 20 minutes at 20 480 MB. The 20 480 number turned out to be the edge, not a generous ceiling.** Sweep, `XCL_TITLE_COMMIT_CAP_MB`, same build and guard. A 90 s probe first, then a 420 s run for the ones that passed: | cap | 90 s probe | 420 s run | |---|---|---| | 13 824 | died 11.7 s, twice | - | | 16 384 | died 11.7 s (last commit line 14 263 MB) | - | | 18 432 | alive at 90 s, peak 17 389 MB | **died 14.9 s**, exit `0x80000003` | | 19 456 | alive at 90 s, peak 18 368 MB | **died 42.8 s**, exit `0xC0000005` | | 20 480 | - | survived 1 200 s | Two things I did not expect: - **A 90 s survival is not a pass.** Both marginal caps got through start-up once and died in the load phase. - **At 18 432 the title died on a 43.5 MB allocation while the census said 16 143 MB of 18 432 MB (87%).** The job object's meter counts more than `PrivateUsage` (mapped sections and the commit behind them), so "how much headroom is left" in my log is a floor, not the answer. At 19 456 it died at 99% instead - a 64 MB commit refused, then **an access violation writing to `0xc73f50000`, with `xcl.exe` frames under the title's on the stack**. A refused commit came back to the title as a bad write rather than a clean `0x8007000E`. That looks like a real robustness hole rather than a property of the cap - happy to file it separately if you want it tracked on its own. The 20-minute run at 20 480 MB: | t | commit | of the cap | |---|---|---| | 60 s | 18 390 MB | 90% | | 180 s | 19 747 MB | 96% | | 294 s | **20 478 MB** | 99.99% | | 297 s | **15 909 MB** | 78% | | 300-1 141 s | 15 908-15 910 MB, no creep | 78% | 567 activity windows, **35 344 frames**, 60-64 presents in *every* 2 s window from 61 s to 1 141 s, the only empty windows at t=2/4/6 (start-up), 0 refusals on the placed-resource path, 0 exceptions. The fold I reported last time was real and it happens at **~295 s** (4.5 GB given back in 3 s); after it the title holds 15.9 GB to the megabyte for fifteen minutes while rendering at the same rate. Uncapped, the same title went 44 GB -> 94 GB. So: **this title's load peak genuinely wants ~20.5 GB of whole-process commit** on this machine - 20 480 is where it just fits and has to fold. With XCL's own share measured at 7.1 GB of pages plus 0.7 GB of Rust heap at that point, "budget + XCL's own" lands at ~20.5 GB, which is exactly the edge I ran. That is the strongest argument I have for accounting the budget inside XCL rather than on the process: as a job-object cap the number is only right for one machine state. Still one machine, headless, script-stopped, and the title never reaches a full world-load state. All runs and the analysis are in my local notes; code is unchanged from last week (~90 lines, unmerged). Written by Claude (Anthropic) under my review on my machine; every number is from a run here, and no game data is included.
Author
Owner

@⁠tugasky on GitHub · 2026-11-24 20:30 UTC · original

A follow-up that has to start by walking back part of my last comment: 20 480 MB is not a floor, because the wall moves.

Six runs of the same build, same title, minutes apart this evening (AMD, RDNA4, DXC 1.9.2602.17 from the 26100 SDK):

run cap commit at the wall outcome
cold shader cache 20 480 20 478 MB at 294 s, then the 4.5 GB fold survived 1 200 s
20:16 20 480 20 479 MB at 101 s 88 refusals, exit 0xC0000409
20:22 24 576 24 447 MB at 149 s 110 refusals, exit 0xC0000409
20:26 24 576 23 714 MB at 24 s 0xC0000005 in bink2scarlett.dll, write at 0xc4e020c00
uncapped, 40 GB guard - 40 633 MB at 32 s stopped by my own guard

The growth rate is what moves: 9 MB/s on the cold run, ~190 MB/s at 20:22, ~800 MB/s at 20:26. That last one is in your range (1.2-1.4 GB/s), so the rate does not rule DXC in or out - it says a warm cache makes this title spend memory an order of magnitude faster, and then the same cap that held for 20 minutes dies in 24 s. If that holds up, a whole-process cap is not a number that can be tuned at all; it is a property of the machine's cache state.

Two things your hypothesis does not explain, both from these runs:

  • The 20:26 death is not a refused allocation ending one compile. At 96% of the cap, two threads at once took an access violation in the video decoder (bink2scarlett.dll+0xc5e3 and +0xc6ab), writing into 0xc4e020c00 - a GPU-visible window address. Same shape as an earlier 0xC0000005 at 19 456 MB. A refused commit coming back as a bad write instead of a clean error is worth its own issue, and I will file it separately.
  • At the 13 824 MB cap the log's refusal came from XCL's title-texture page path (pages of title textures ... refused (0x8007000E)), not from DXC.

On the dumps: I have one so far, at 60 s - no thread inside dxcompiler.dll (15 xcl-dxc-* threads exist and are idle; the only DXC line in 9 700 is the version banner). To get dumps at 240-300 s I need the slow state, because every warm run dies before then; that means a fresh boot to empty the file cache. I will report when I have it, and I would still take your over-8 MB source refusal as a diff if you have it.

Written by Claude (Anthropic) under my review; numbers from runs on my machine, no game data included.

**@⁠tugasky** on GitHub · 2026-11-24 20:30 UTC · [original](https://github.com/xcl-dev/xcl/issues/1566#issuecomment-7143646248) A follow-up that has to start by walking back part of my last comment: **20 480 MB is not a floor, because the wall moves.** Six runs of the same build, same title, minutes apart this evening (AMD, RDNA4, DXC 1.9.2602.17 from the 26100 SDK): | run | cap | commit at the wall | outcome | |---|---|---|---| | cold shader cache | 20 480 | 20 478 MB at 294 s, then the 4.5 GB fold | survived 1 200 s | | 20:16 | 20 480 | 20 479 MB at 101 s | 88 refusals, exit `0xC0000409` | | 20:22 | 24 576 | 24 447 MB at 149 s | 110 refusals, exit `0xC0000409` | | 20:26 | 24 576 | 23 714 MB at 24 s | **`0xC0000005` in `bink2scarlett.dll`, write at `0xc4e020c00`** | | uncapped, 40 GB guard | - | 40 633 MB at 32 s | stopped by my own guard | The growth rate is what moves: **9 MB/s** on the cold run, **~190 MB/s** at 20:22, **~800 MB/s** at 20:26. That last one is in your range (1.2-1.4 GB/s), so the rate does not rule DXC in or out - it says a warm cache makes this title spend memory an order of magnitude faster, and then the same cap that held for 20 minutes dies in 24 s. If that holds up, a whole-process cap is not a number that can be tuned at all; it is a property of the machine's cache state. Two things your hypothesis does not explain, both from these runs: - The 20:26 death is not a refused allocation ending one compile. At 96% of the cap, two threads at once took an access violation in the video decoder (`bink2scarlett.dll+0xc5e3` and `+0xc6ab`), writing into `0xc4e020c00` - a GPU-visible window address. Same shape as an earlier `0xC0000005` at 19 456 MB. A refused commit coming back as a bad write instead of a clean error is worth its own issue, and I will file it separately. - At the 13 824 MB cap the log's refusal came from XCL's title-texture page path (`pages of title textures ... refused (0x8007000E)`), not from DXC. **On the dumps:** I have one so far, at 60 s - no thread inside `dxcompiler.dll` (15 `xcl-dxc-*` threads exist and are idle; the only DXC line in 9 700 is the version banner). To get dumps at 240-300 s I need the slow state, because every warm run dies before then; that means a fresh boot to empty the file cache. I will report when I have it, and I would still take your over-8 MB source refusal as a diff if you have it. Written by Claude (Anthropic) under my review; numbers from runs on my machine, no game data included.
Author
Owner

@⁠denverquane on GitHub · 2026-11-24 23:00 UTC · original

A 64 GB machine with a 129.5 GB commit limit: no runaway in 8 world loads. The title's commit levels off at 27–33 GB.

Setup: RTX 5070 12 GB (621.24), Ryzen 7 9800X3D, 64 GB RAM, 64 GB page file, Windows 10 Home 22H2, release build of 9e3831e + #1638 (+ #684 in seven of the eight runs), DXC 1.9.2609.5, retail 1.0.2.1, XCL_NETWORK=0 XCL_ACTIVITY=1. Warm DXIL cache in three runs, cold in five; DXC in-process in five, in #1638's workers in three.

  • Every run has the same shape. Commit is about 16 GB in the menus. It rises to about 27 GB between about 44 and 64 s, while DirectStorage streams 300–800 MB per 2 s, then stays flat (≤ 33.6 GB) until the run ends at 63–311 s.
  • Of that growth, target pages go 4.5 → 9.5–10.1 GB and sparse pools 1.0 → 1.9–2.6 GB. I did not break down the rest. Video memory reaches 14.2–15.1 GB local on the 12 GB card, plus about 4.6 GB non-local.
  • The two cold in-process runs compiled 454 and 497 programs with DXC with no growth.
  • What the load waits on here is the NVIDIA driver. From about 64 s, up to 15 xcl-pso threads are inside nvgpucomp64.dll at once. The largest compute PSOs take 30–60 s each (595 KB of DXIL: 48.6 s; 251 KB: 59.7 s), while the DXC threads wait for work (#1096).

So on this card the title reaches its watchdog before whatever drove 44 → 94 GB in this issue and in #1598. The limit of this data is the run length (≤ 311 s), not memory.

AI use: Claude Code (Claude Opus 5.5) ran the runs and drafted this; I checked it before posting.

**@⁠denverquane** on GitHub · 2026-11-24 23:00 UTC · [original](https://github.com/xcl-dev/xcl/issues/1566#issuecomment-7146905277) **A 64 GB machine with a 129.5 GB commit limit: no runaway in 8 world loads. The title's commit levels off at 27–33 GB.** **Setup:** RTX 5070 12 GB (621.24), Ryzen 7 9800X3D, 64 GB RAM, 64 GB page file, Windows 10 Home 22H2, release build of `9e3831e` + #1638 (+ #684 in seven of the eight runs), DXC 1.9.2609.5, retail 1.0.2.1, `XCL_NETWORK=0 XCL_ACTIVITY=1`. Warm DXIL cache in three runs, cold in five; DXC in-process in five, in #1638's workers in three. - Every run has the same shape. Commit is about 16 GB in the menus. It rises to about 27 GB between about 44 and 64 s, while DirectStorage streams 300–800 MB per 2 s, then stays flat (≤ 33.6 GB) until the run ends at 63–311 s. - Of that growth, target pages go 4.5 → 9.5–10.1 GB and sparse pools 1.0 → 1.9–2.6 GB. I did not break down the rest. Video memory reaches 14.2–15.1 GB local on the 12 GB card, plus about 4.6 GB non-local. - The two cold in-process runs compiled 454 and 497 programs with DXC with no growth. - What the load waits on here is the NVIDIA driver. From about 64 s, up to 15 `xcl-pso` threads are inside `nvgpucomp64.dll` at once. The largest compute PSOs take 30–60 s each (595 KB of DXIL: 48.6 s; 251 KB: 59.7 s), while the DXC threads wait for work (#1096). So on this card the title reaches its watchdog before whatever drove 44 → 94 GB in this issue and in #1598. The limit of this data is the run length (≤ 311 s), not memory. **AI use:** Claude Code (Claude Opus 5.5) ran the runs and drafted this; I checked it before posting.
Author
Owner

@⁠tugasky on GitHub · 2026-11-24 23:28 UTC · original · edited 2026-11-25 00:03 UTC

The refusal behind the fail-fast was XCL's, not the title's

Adding to the cap data in this thread, because it changes what "the cap held for 420 s" means.

Build and machine (none of this is committed; the tree is main@930e8b4 plus local changes, so treat it as a measured experiment rather than a commit anyone can rebuild): AMD Ryzen 7 9700X, 32 GB RAM, page file 73 728 MB, AMD Radeon RX 9070 XT (16 191 MiB VRAM), driver 32.0.32029.2010, Windows 11 Pro build 26300, release build. The local changes are the cap itself, an allocation census, a shim-side borrow (below) and a crash reporter; four files are untracked and ten tracked files differ from 930e8b4, mostly in the D3D12.X layer.

The cap is a job-object ProcessMemoryLimit over the whole process. The harness had been starting the title with -WindowStyle Hidden and no stdio redirection, so nothing XCL wrote to stderr was ever kept. Once the child's stdout and stderr go to files, the death that looked like an unexplained 0xC0000409 40.4 s in — the moment the run's first scheduled press existed — is one line:

memory allocation of 18220 bytes failed

at 40.4 s, exit 0xC0000409. A second run with RUST_BACKTRACE on gave:

memory allocation of 1048576 bytes failed
stack backtrace:
memory allocation of 1048576 bytes failed
skipping backtrace printing to avoid potential recursion

The second and third lines are the backtrace printer's own 1 MiB block being refused in the same way, which is why that run printed no backtrace either. Rust answers a refused allocation with abort(), and abort() is 0xC0000409: no exception line, no frames, no report. So in a capped run the first thing that dies can be XCL's own Vec growth, not the title, and the guard then shows the host pinned at the cap for the whole window before it, which reads like the title having eaten the budget.

What fixes it

commit_cap::borrow_for_shim(want) raises the job limit by 64 MB (or want, if the request is bigger) when XCL's own heap is refused, and the counting allocator retries alloc, alloc_zeroed and realloc once. The title keeps exactly its budget until the shim needs room, and the periodic line now says how much moved — these are real lines from the 32 768 MB run:

memory cap: 32778 MB of 32768 MB (100%), 64 MB of it taken back by XCL's own heap, the title's allocations past it fail

That run took 72 such lines (of its 83 memory cap: lines), and the amount walked 64 → 128 → … → 320 MB: the shim was refused, borrowed, was refused again, and the title was holding the cap the whole time. The 40 960 MB run took zero borrow lines — nothing was ever refused at that cap, XCL's own heap included.

cargo test --release -p xcl --lib: 748 run, 725 passed, 0 failed, 23 ignored, exit 0. The one test that needs a real job object is #[ignore]d and moves a 256 MB job to 320 MB and then 520 MB when run by hand.

What the caps then measured, same build, same script, only the number changed

  • 32 768, no button pressed, 420 s: exit 0, peak commit 31 310 MB, 12 149 frames (the guard's count; the log's last line says 12 181 frames shown, 12 181 PresentX calls). So the intro alone fits and holds.
  • 32 768, scripted presses: the run reached the world (the title's own crash log has TileHeap: used (3631Mb) - total (6236Mb)) and died at 188.9 s with D3D12.X: command list … (type 2) Close → 0x8007000e (five times, five different lists), then unhandled exception 0x80000003 … rax=0x8007000e on five threads — the title asserting on a refusal it got from its own Close. Peak commit 32 995 MB, i.e. above the 32 768 MB cap: the borrow did its job, XCL survived, and the title did not. Whether the schedule actually delivered its presses is not something the log can answer (it records one pressed for the first time line, at 17.978 s, before the first scheduled press at 40 s), so read that arm as "with the press schedule configured".
  • 40 960, same script, 420 s: exit 0, peak commit 39 462 MB, 5 396 frames, zero exceptions.

There is a useful contrast from a second run at the same 32 768 MB cap, with no scripted input at all (a person pressed A once, at 244 s): it reached the cap — 32 767 MB at 27 s — then folded itself down to 19 443 MB by 135 s, the census over the fold reading 0 refused (0), and ran on for another 155 s. Reaching the cap is not what killed that one; it ended at 290 s in a separate 0xC0000005, which I am filing on its own. Having a Close refused, as above, is fatal inside the same second.

On the frame rate

I was going to claim the larger cap costs frame rate, and the runs do not support it. Presents per second from the activity lines: 28.9 (no press, 32 768), 13.3 (pressed, 32 768, up to its death at 188.9 s), 12.8 (pressed, 40 960). The two pressed runs are within 4% of each other at caps 8 GB apart, so the drop follows the input/world path, not the cap. What a 40 GB cap does cost on a 32 GB machine is page file — peak commit 39 462 MB, so ~7 GB of it — and how expensive that is has not been measured here beyond those presents-per-second figures.

Written by Claude (Anthropic) under my review; numbers from runs on my machine, no game data included.

**@⁠tugasky** on GitHub · 2026-11-24 23:28 UTC · [original](https://github.com/xcl-dev/xcl/issues/1566#issuecomment-7147445895) · edited 2026-11-25 00:03 UTC ### The refusal behind the fail-fast was XCL's, not the title's Adding to the cap data in this thread, because it changes what "the cap held for 420 s" means. **Build and machine** (none of this is committed; the tree is `main@930e8b4` plus local changes, so treat it as a measured experiment rather than a commit anyone can rebuild): AMD Ryzen 7 9700X, **32 GB RAM**, page file 73 728 MB, AMD Radeon RX 9070 XT (16 191 MiB VRAM), driver 32.0.32029.2010, Windows 11 Pro build 26300, release build. The local changes are the cap itself, an allocation census, a shim-side borrow (below) and a crash reporter; four files are untracked and ten tracked files differ from `930e8b4`, mostly in the D3D12.X layer. The cap is a job-object `ProcessMemoryLimit` over the whole process. The harness had been starting the title with `-WindowStyle Hidden` and **no stdio redirection**, so nothing XCL wrote to stderr was ever kept. Once the child's stdout and stderr go to files, the death that looked like an unexplained `0xC0000409` 40.4 s in — the moment the run's first scheduled press existed — is one line: ``` memory allocation of 18220 bytes failed ``` at 40.4 s, exit `0xC0000409`. A second run with `RUST_BACKTRACE` on gave: ``` memory allocation of 1048576 bytes failed stack backtrace: memory allocation of 1048576 bytes failed skipping backtrace printing to avoid potential recursion ``` The second and third lines are the backtrace printer's own 1 MiB block being refused in the same way, which is why that run printed no backtrace either. Rust answers a refused allocation with `abort()`, and `abort()` is `0xC0000409`: no exception line, no frames, no report. So in a capped run the first thing that dies can be XCL's own `Vec` growth, not the title, and the guard then shows the host pinned at the cap for the whole window before it, which reads like the title having eaten the budget. ### What fixes it `commit_cap::borrow_for_shim(want)` raises the job limit by 64 MB (or `want`, if the request is bigger) when XCL's own heap is refused, and the counting allocator retries `alloc`, `alloc_zeroed` and `realloc` once. The title keeps exactly its budget until the shim needs room, and the periodic line now says how much moved — these are real lines from the 32 768 MB run: ``` memory cap: 32778 MB of 32768 MB (100%), 64 MB of it taken back by XCL's own heap, the title's allocations past it fail ``` That run took 72 such lines (of its 83 `memory cap:` lines), and the amount walked 64 → 128 → … → **320 MB**: the shim was refused, borrowed, was refused again, and the title was holding the cap the whole time. The 40 960 MB run took **zero** borrow lines — nothing was ever refused at that cap, XCL's own heap included. `cargo test --release -p xcl --lib`: 748 run, **725 passed, 0 failed, 23 ignored**, exit 0. The one test that needs a real job object is `#[ignore]`d and moves a 256 MB job to 320 MB and then 520 MB when run by hand. ### What the caps then measured, same build, same script, only the number changed - **32 768, no button pressed, 420 s**: exit 0, peak commit 31 310 MB, 12 149 frames (the guard's count; the log's last line says 12 181 frames shown, 12 181 `PresentX` calls). So the intro alone fits and holds. - **32 768, scripted presses**: the run reached the world (the title's own crash log has `TileHeap: used (3631Mb) - total (6236Mb)`) and died at 188.9 s with `D3D12.X: command list … (type 2) Close → 0x8007000e` (five times, five different lists), then `unhandled exception 0x80000003 … rax=0x8007000e` on five threads — the title asserting on a refusal it got from its own `Close`. Peak commit 32 995 MB, i.e. **above** the 32 768 MB cap: the borrow did its job, XCL survived, and the title did not. Whether the schedule actually delivered its presses is not something the log can answer (it records one `pressed for the first time` line, at 17.978 s, before the first scheduled press at 40 s), so read that arm as "with the press schedule configured". - **40 960, same script, 420 s**: exit 0, peak commit 39 462 MB, 5 396 frames, zero exceptions. There is a useful contrast from a second run at the same 32 768 MB cap, with no scripted input at all (a person pressed A once, at 244 s): it **reached** the cap — 32 767 MB at 27 s — then folded itself down to 19 443 MB by 135 s, the census over the fold reading `0 refused (0)`, and ran on for another 155 s. Reaching the cap is not what killed that one; it ended at 290 s in a separate `0xC0000005`, which I am filing on its own. Having a `Close` refused, as above, is fatal inside the same second. ### On the frame rate I was going to claim the larger cap costs frame rate, and the runs do not support it. Presents per second from the activity lines: 28.9 (no press, 32 768), 13.3 (pressed, 32 768, up to its death at 188.9 s), 12.8 (pressed, 40 960). The two pressed runs are within 4% of each other at caps 8 GB apart, so the drop follows the input/world path, not the cap. What a 40 GB cap does cost on a 32 GB machine is page file — peak commit 39 462 MB, so ~7 GB of it — and how expensive that is has not been measured here beyond those presents-per-second figures. Written by Claude (Anthropic) under my review; numbers from runs on my machine, no game data included.
Author
Owner

@⁠tugasky on GitHub · 2026-11-25 00:23 UTC · original

The steady state matches a 32 GB machine within ~10%; the high-water mark is in the first 40 s

Eight loads with no growth, and a plateau rather than a climb, is the data this issue needed — thank you for running it. From this side the two machines agree closely enough to call it a budget:

your 64 GB machine, 8 loads my 32 GB run, 40 960 MB cap
process commit, steady state 27–33.6 GB 29.3–30.9 GB from ~250 s to 420 s (last line 30 163 MB at 419.5 s)
target pages 9.5–10.1 GB 9 860 MB (pools 10 176 MB)
video memory 15.1 GB local + 4.6 GB non-local (12 GB card) 14 412 MB local + 4 745 MB non-local (16 GB card)

Build and machine on my side: main@930e8b4 plus local changes (an enforced commit cap, a census, a crash reporter — not a commit anyone can rebuild), Ryzen 7 9700X, 32 GB RAM, page file 73 728 MB, RX 9070 XT, driver 32.0.32029.2010, Windows 11 Pro 26300, XCL_TITLE_COMMIT_CAP_MB=40960, guard limit 52 GB, XCL_RUN_SECONDS=420. That late figure is not a floor: a run at a 32 768 MB cap with no press ends at 16 160 MB, so the agreement above is with a run that reached the world.

Where your window matters is the peak. Mine is 39 462 MB at 30.0 s, with the cap line 37 953 MB of 40 960 (93%) at 38.3 s, and it is smaller for the whole rest of the run. Your samples start after the 44–64 s stream; if you have any inside that first minute, they would settle what the load actually asks for — on a 32 GB machine the difference between 33.6 and 39.5 GB is ~6 GB of page file.

On the wait: my thread dump at 41.6 s (130 threads, commit 37 736 MB of 40 960) has 13 of the 15 xcl-dxc-N threads and 14 of the 15 xcl-pso-N threads in Mutex::lock_contended (mutex/futex.rs:61) inside pso_async::queue, xcl-dxc-1 parked in mpmc::list::Channel::recv with no work, and one xcl-pso-pre-0 inside dxc::compile. Nothing sits in a driver module. That matches your #1096 reading of idle DXC threads; if yours are genuinely inside nvgpucomp64.dll, that is a different wait from mine and probably wants its own report.

One more thing from the tail of my runs, since it changes what "the load never finishes" is made of. Presentation stops right after DirectStorage starts refusing requests: 109 failures at 362.3 s, 14 at 364.5 s, 308 at 373.3 s (431 in total), the first zero-present activity sample is the 364.5 s one, and from 412.9 s to the timeout the run reports no presents, no submits and no draws. The status is 0x89240009, XCL's E_ACCESS_VIOLATION (hle/dstorage.rs:59): the shim returns it when the destination range is not committed writable (:869–870, writable() at :803 checks VirtualQuery for MEM_COMMIT plus a writable protection) or when a physical-page write is refused (:935). So at that point the title is streaming into memory XCL cannot write — a stall with a cause, not the queue going quiet.

AI-assisted (Claude) under my review; numbers from my runs, no game data.

**@⁠tugasky** on GitHub · 2026-11-25 00:23 UTC · [original](https://github.com/xcl-dev/xcl/issues/1566#issuecomment-7148462520) ### The steady state matches a 32 GB machine within ~10%; the high-water mark is in the first 40 s Eight loads with no growth, and a plateau rather than a climb, is the data this issue needed — thank you for running it. From this side the two machines agree closely enough to call it a budget: | | your 64 GB machine, 8 loads | my 32 GB run, 40 960 MB cap | |---|---|---| | process commit, steady state | 27–33.6 GB | 29.3–30.9 GB from ~250 s to 420 s (last line 30 163 MB at 419.5 s) | | target pages | 9.5–10.1 GB | 9 860 MB (pools 10 176 MB) | | video memory | 15.1 GB local + 4.6 GB non-local (12 GB card) | 14 412 MB local + 4 745 MB non-local (16 GB card) | Build and machine on my side: `main@930e8b4` plus local changes (an enforced commit cap, a census, a crash reporter — not a commit anyone can rebuild), Ryzen 7 9700X, 32 GB RAM, page file 73 728 MB, RX 9070 XT, driver 32.0.32029.2010, Windows 11 Pro 26300, `XCL_TITLE_COMMIT_CAP_MB=40960`, guard limit 52 GB, `XCL_RUN_SECONDS=420`. That late figure is not a floor: a run at a 32 768 MB cap with no press ends at 16 160 MB, so the agreement above is with a run that reached the world. Where your window matters is the peak. Mine is **39 462 MB at 30.0 s**, with the cap line 37 953 MB of 40 960 (93%) at 38.3 s, and it is smaller for the whole rest of the run. Your samples start after the 44–64 s stream; if you have any inside that first minute, they would settle what the load actually asks for — on a 32 GB machine the difference between 33.6 and 39.5 GB is ~6 GB of page file. On the wait: my thread dump at 41.6 s (130 threads, commit 37 736 MB of 40 960) has 13 of the 15 `xcl-dxc-N` threads and 14 of the 15 `xcl-pso-N` threads in `Mutex::lock_contended` (`mutex/futex.rs:61`) inside `pso_async::queue`, `xcl-dxc-1` parked in `mpmc::list::Channel::recv` with no work, and one `xcl-pso-pre-0` inside `dxc::compile`. Nothing sits in a driver module. That matches your #1096 reading of idle DXC threads; if yours are genuinely inside `nvgpucomp64.dll`, that is a different wait from mine and probably wants its own report. One more thing from the tail of my runs, since it changes what "the load never finishes" is made of. Presentation stops right after DirectStorage starts refusing requests: 109 failures at 362.3 s, 14 at 364.5 s, 308 at 373.3 s (431 in total), the first zero-present activity sample is the 364.5 s one, and from 412.9 s to the timeout the run reports no presents, no submits and no draws. The status is `0x89240009`, XCL's `E_ACCESS_VIOLATION` (`hle/dstorage.rs:59`): the shim returns it when the destination range is not committed writable (`:869–870`, `writable()` at `:803` checks `VirtualQuery` for `MEM_COMMIT` plus a writable protection) or when a physical-page write is refused (`:935`). So at that point the title is streaming into memory XCL cannot write — a stall with a cause, not the queue going quiet. AI-assisted (Claude) under my review; numbers from my runs, no game data.
Author
Owner

@⁠zorde23 on GitHub · 2026-11-25 00:37 UTC · original

Measurements 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, current main (80f4819), 300 s runs into the world with the title's A presses,
XCL_PSO_PRELOAD=0. A local diagnostic tagged every committed resource, heap and shader-visible descriptor heap the
device makes (private data released with the object) and walked the address space every 6 s.

1. On this driver the process commit includes XCL's video memory. #1773 says WDDM charges it to the commit; here
it is measured. A standalone check: 16 default heaps of 64 MiB raise the process commit by 1,026 MB and show as 16
private regions of 64 MiB; 16 committed 4096x4096 RGBA8 textures add another 1,027 MB. In the world, about 9.4 of
20.9 GB of commit at 96 s is video memory XCL made (page pools, sparse pools, arenas, committed resources). So a
commit number on AMD counts XCL's VRAM once more, and a commit cap also caps the texture pages.

2. What grows between 80 and 140 s (main, the run that reached 150 s). This is the split #1773 asks for before
choosing a reduction, and the part of the growth @⁠denverquane did not break down:

80 s 141 s
process commit 18.7 GB 27.3 GB
local video memory (OS budget ~10.2 GB) 8.3 GB 13.5 GB
texture page pools (target pages in use) 5.0 GB (4.9) 9.7 GB (9.6)
sparse pools 1.5 GB 1.9 GB
committed textures / buffers / targets 0.43 / 0.57 / 0.08 GB 0.64 / 0.57 / 0.08 GB
title's own private commit in its graphics reservations 1.5 GB 3.9 GB
pipeline objects alive 58,773 58,773

About 60 % of the commit growth is XCL's video memory (almost all texture page pools), about 27 % is memory the
title itself commits in its graphics reservations (the streamed texture data, which XCL then also keeps in VRAM
pages: #1773's point 2), and the rest is spread over smaller allocations. Video memory the device makes outside these
objects (driver) stays under ~0.3 GB; pipelines do not grow after the world loads. Target pages reach the same
9.5-10 GB as on @⁠denverquane's 12 GB card and @⁠tugasky's 16 GB card. The pools were 98-99 % in use the whole time
(9.6 of 9.7 GB at 141 s); #1985 (giving back empty pool heaps) was not tested here.

3. The frame stall starts before the memory runs out. In all four runs the frames drop from 60 to 0-20 per 2 s
at 74-79 s, when local video memory is 7.3-7.9 GB, under the OS budget. Memory pressure comes later and ends the
run (here: the system commit limit at 150 s; the 27-33 GB plateau the other reports describe does not fit on this
machine); it is not what starts the stall on this card.

4. #640 and #1831 on the same build and card:

  • #640 (rebased locally onto #1747, which it no longer applies to; budget 4096 MB): 5,532 textures evicted,
    263 mapped again. At 150 s the page pools are 6.5 GB instead of 10.0 GB, local video memory 10.2 GB instead of
    14.0 GB, commit 23.7 GB instead of 28.1 GB, and the run lasted 251 s instead of 150 s. The pools still pass the
    4 GB budget (6.5 GB), and the stall starts at the same time (77 s).
  • #1831 with XCL_TITLE_COMMIT_CAP_MB=20480: XCL aborts at 110 s (0xC0000409). @⁠tugasky found 20,480 MB to be an
    edge that moves with the cache state (24,576 MB died at 24 s with a warm cache), and at 13,824 MB the first refusal
    at 11.7 s was XCL's own title-texture page allocation. If point 1 holds on their card too (also AMD, not
    checked), the cap counts those pages, and whatever XCL keeps in VRAM comes out of the title's share.

Plan: I would post the numbers in point 4 as test reports on #640 and #1831. Question for the maintainer:
should a title commit budget or cap (#1566, #1831) leave out the video memory XCL makes, at least on drivers that
charge it to the commit?

Written with Claude Code from runs on this machine.

**@⁠zorde23** on GitHub · 2026-11-25 00:37 UTC · [original](https://github.com/xcl-dev/xcl/issues/1566#issuecomment-7148709571) Measurements 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, current `main` (80f4819), 300 s runs into the world with the title's A presses, `XCL_PSO_PRELOAD=0`. A local diagnostic tagged every committed resource, heap and shader-visible descriptor heap the device makes (private data released with the object) and walked the address space every 6 s. **1. On this driver the process commit includes XCL's video memory.** #1773 says WDDM charges it to the commit; here it is measured. A standalone check: 16 default heaps of 64 MiB raise the process commit by 1,026 MB and show as 16 private regions of 64 MiB; 16 committed 4096x4096 RGBA8 textures add another 1,027 MB. In the world, about 9.4 of 20.9 GB of commit at 96 s is video memory XCL made (page pools, sparse pools, arenas, committed resources). So a commit number on AMD counts XCL's VRAM once more, and a commit cap also caps the texture pages. **2. What grows between 80 and 140 s (main, the run that reached 150 s).** This is the split #1773 asks for before choosing a reduction, and the part of the growth @⁠denverquane did not break down: | | 80 s | 141 s | |---|---|---| | process commit | 18.7 GB | 27.3 GB | | local video memory (OS budget ~10.2 GB) | 8.3 GB | 13.5 GB | | texture page pools (target pages in use) | 5.0 GB (4.9) | 9.7 GB (9.6) | | sparse pools | 1.5 GB | 1.9 GB | | committed textures / buffers / targets | 0.43 / 0.57 / 0.08 GB | 0.64 / 0.57 / 0.08 GB | | title's own private commit in its graphics reservations | 1.5 GB | 3.9 GB | | pipeline objects alive | 58,773 | 58,773 | About 60 % of the commit growth is XCL's video memory (almost all texture page pools), about 27 % is memory the title itself commits in its graphics reservations (the streamed texture data, which XCL then also keeps in VRAM pages: #1773's point 2), and the rest is spread over smaller allocations. Video memory the device makes outside these objects (driver) stays under ~0.3 GB; pipelines do not grow after the world loads. Target pages reach the same 9.5-10 GB as on @⁠denverquane's 12 GB card and @⁠tugasky's 16 GB card. The pools were 98-99 % in use the whole time (9.6 of 9.7 GB at 141 s); #1985 (giving back empty pool heaps) was not tested here. **3. The frame stall starts before the memory runs out.** In all four runs the frames drop from 60 to 0-20 per 2 s at 74-79 s, when local video memory is 7.3-7.9 GB, under the OS budget. Memory pressure comes later and ends the run (here: the system commit limit at 150 s; the 27-33 GB plateau the other reports describe does not fit on this machine); it is not what starts the stall on this card. **4. #640 and #1831 on the same build and card:** - #640 (rebased locally onto #1747, which it no longer applies to; budget 4096 MB): 5,532 textures evicted, 263 mapped again. At 150 s the page pools are 6.5 GB instead of 10.0 GB, local video memory 10.2 GB instead of 14.0 GB, commit 23.7 GB instead of 28.1 GB, and the run lasted 251 s instead of 150 s. The pools still pass the 4 GB budget (6.5 GB), and the stall starts at the same time (77 s). - #1831 with `XCL_TITLE_COMMIT_CAP_MB=20480`: XCL aborts at 110 s (0xC0000409). @⁠tugasky found 20,480 MB to be an edge that moves with the cache state (24,576 MB died at 24 s with a warm cache), and at 13,824 MB the first refusal at 11.7 s was XCL's own title-texture page allocation. If point 1 holds on their card too (also AMD, not checked), the cap counts those pages, and whatever XCL keeps in VRAM comes out of the title's share. **Plan:** I would post the numbers in point 4 as test reports on #640 and #1831. Question for the maintainer: should a title commit budget or cap (#1566, #1831) leave out the video memory XCL makes, at least on drivers that charge it to the commit? Written with Claude Code from runs on this machine.
Author
Owner

@⁠AmateurWizrd on GitHub · 2026-11-25 01:16 UTC · original

Plan for a small separate PR (part of this issue): when XCL's own Rust heap is refused an allocation, write one line to xcl.log without allocating, and if the run then ends with 0xC0000409, name that as the crash in report.json. Today such a run leaves only memory allocation of N bytes failed on stderr; the log just stops and report.json has "crash": null.

No cap, no counting, no retry and no other change in behaviour; the cap stays #1831's. If the crash reporter in the local tree described above (comment of 23:28Z) already does this and is headed for a PR, say so and I will test that instead.

AI use: omp. Claude Fable 5.2 wrote this plan; Claude Opus 5.5 read the code for it.

**@⁠AmateurWizrd** on GitHub · 2026-11-25 01:16 UTC · [original](https://github.com/xcl-dev/xcl/issues/1566#issuecomment-7149382438) Plan for a small separate PR (part of this issue): when XCL's own Rust heap is refused an allocation, write one line to `xcl.log` without allocating, and if the run then ends with `0xC0000409`, name that as the crash in `report.json`. Today such a run leaves only `memory allocation of N bytes failed` on stderr; the log just stops and `report.json` has `"crash": null`. No cap, no counting, no retry and no other change in behaviour; the cap stays #1831's. If the crash reporter in the local tree described above (comment of 23:28Z) already does this and is headed for a PR, say so and I will test that instead. AI use: omp. Claude Fable 5.2 wrote this plan; Claude Opus 5.5 read the code for it.
Author
Owner

@⁠thiagocalile on GitHub · 2026-11-25 01:19 UTC · original

Tested PR #1831 (f0dbb08, merged locally onto main 62265d3) and a local two-tier soft+hard cap prototype on an AMD Radeon RX 6600 (8 GB VRAM) to see whether refusing only title kernelx allocations with 2 GiB of XCL headroom avoids the 0x8007000E / 0xC0000409 failures seen under a raw job-object cap.

Hardware & setup

  • AMD Radeon RX 6600 (8146 MiB VRAM, RDNA2, driver 32.0.21045.29003; XCL_ADAPTER=radeon), Ryzen 7 5700X3D, 47.9 GB RAM, Windows 11 (26200), Rust 1.100.0 MSVC, DXC 1.8.2502.11, release build.
  • 90 s scripts/smoke.ps1 world-load runs (XCL_DIRECT_DXIL=1, XCL_PRESS_A_AT=15,25,35, XCL_NETWORK=0).

Results

Run Hard / Soft Cap (MB) Soft Refusals Peak Commit Exit What happened
Uncapped none 0 23,979 MB 0x0 2,348 frames (60 60 60), 0 crashes
Plain #1831 20,480 / none — 20,241 MB 0x80000003 CreateHeap(64 MiB) refused (0x8007000E) at 58.1 s
Two-tier proto 20,480 / 18,432 0 20,434 MB 0x80000003 0 kernelx refusals; commit still climbed 18.4 → 20.4 GB via XCL's own vram::Pages CreateHeap(64 MiB) (0x8007000E) at 77.4 s
Plain #1831 16,384 / none — 16,224 MB 0xc0000409 Silent __fastfail inside XCL/CRT
Two-tier proto 16,384 / 14,336 1 (13,312 KiB) 14,891 MB 0x80000003 Avoided 0xC0000409, but the title asserted 0x80000003 on the very first refused XMem allocation (42.9 s → 43.7 s)

Takeaways

  1. A soft title-only cap prevents silent 0xC0000409 inside XCL/CRT, turning it into a logged refusal before the title's own handler runs — e.g. gating VirtualAlloc (MEM_COMMIT), XMemAllocDefault, and AllocateTitlePhysicalPages in kernelx.rs:
    unsafe fn title_commit_allowed(request_bytes: usize) -> bool {
        let soft = TITLE_COMMIT_SOFT_CAP.load(Ordering::Relaxed);
        if soft == 0 || request_bytes == 0 { return true; }
        if process_private_bytes().saturating_add(request_bytes as u64) <= soft { return true; }
        fnd::SetLastError(fnd::ERROR_NOT_ENOUGH_MEMORY);
        false
    }
    
  2. However, the retail title does not evict caches when XMem refuses during world load (it asserted 0x80000003 on refusal #1 at 14.3 GB), and above ~18.4 GB the climb is XCL's own D3D12 DEFAULT heap pools (CreateHeap(64 MiB)), not kernelx.
  3. So #1831's XCL_TITLE_COMMIT_CAP_MB works best as an outer safety fuse (e.g. >= 28–32 GB to protect Windows from runaway commit, optionally with a small soft headroom to avoid silent 0xC0000409), while lowering the ~24 GB floor itself depends on reducing XCL's D3D12 heap footprint (#1773, #1248, #1182, #1663).

AI use: Antigravity (Gemini 4 Neon) merged #1831 onto 62265d3, implemented the local soft-cap prototype, ran the 90 s RX 6600 runs, and drafted this report; I checked the numbers before posting.

**@⁠thiagocalile** on GitHub · 2026-11-25 01:19 UTC · [original](https://github.com/xcl-dev/xcl/issues/1566#issuecomment-7149429194) Tested PR #1831 (`f0dbb08`, merged locally onto `main` `62265d3`) **and** a local two-tier soft+hard cap prototype on an **AMD Radeon RX 6600 (8 GB VRAM)** to see whether refusing *only* title `kernelx` allocations with 2 GiB of XCL headroom avoids the `0x8007000E` / `0xC0000409` failures seen under a raw job-object cap. **Hardware & setup** - AMD Radeon RX 6600 (8146 MiB VRAM, RDNA2, driver `32.0.21045.29003`; `XCL_ADAPTER=radeon`), Ryzen 7 5700X3D, 47.9 GB RAM, Windows 11 (`26200`), Rust `1.100.0` MSVC, DXC `1.8.2502.11`, release build. - 90 s `scripts/smoke.ps1` world-load runs (`XCL_DIRECT_DXIL=1`, `XCL_PRESS_A_AT=15,25,35`, `XCL_NETWORK=0`). **Results** | Run | Hard / Soft Cap (MB) | Soft Refusals | Peak Commit | Exit | What happened | |---|---|---:|---:|---|---| | Uncapped | none | 0 | `23,979 MB` | `0x0` | `2,348` frames (`60 60 60`), 0 crashes | | Plain #1831 | `20,480` / none | — | `20,241 MB` | `0x80000003` | `CreateHeap(64 MiB)` refused (`0x8007000E`) at `58.1 s` | | Two-tier proto | `20,480` / `18,432` | **0** | `20,434 MB` | `0x80000003` | **0** `kernelx` refusals; commit still climbed `18.4 → 20.4 GB` via XCL's own `vram::Pages` `CreateHeap(64 MiB)` (`0x8007000E`) at `77.4 s` | | Plain #1831 | `16,384` / none | — | `16,224 MB` | `0xc0000409` | Silent `__fastfail` inside XCL/CRT | | Two-tier proto | `16,384` / `14,336` | **1** (`13,312 KiB`) | `14,891 MB` | `0x80000003` | Avoided `0xC0000409`, but the title asserted `0x80000003` on the very first refused `XMem` allocation (`42.9 s → 43.7 s`) | **Takeaways** 1. **A soft title-only cap prevents silent `0xC0000409` inside XCL/CRT**, turning it into a logged refusal before the title's own handler runs — e.g. gating `VirtualAlloc` (`MEM_COMMIT`), `XMemAllocDefault`, and `AllocateTitlePhysicalPages` in `kernelx.rs`: ```rust unsafe fn title_commit_allowed(request_bytes: usize) -> bool { let soft = TITLE_COMMIT_SOFT_CAP.load(Ordering::Relaxed); if soft == 0 || request_bytes == 0 { return true; } if process_private_bytes().saturating_add(request_bytes as u64) <= soft { return true; } fnd::SetLastError(fnd::ERROR_NOT_ENOUGH_MEMORY); false } ``` 2. **However, the retail title does not evict caches when `XMem` refuses during world load** (it asserted `0x80000003` on refusal #1 at `14.3 GB`), and **above ~18.4 GB the climb is XCL's own D3D12 `DEFAULT` heap pools (`CreateHeap(64 MiB)`), not `kernelx`**. 3. So #1831's `XCL_TITLE_COMMIT_CAP_MB` works best as an **outer safety fuse** (e.g. `>= 28–32 GB` to protect Windows from runaway commit, optionally with a small soft headroom to avoid silent `0xC0000409`), while lowering the ~24 GB floor itself depends on reducing XCL's D3D12 heap footprint (#1773, #1248, #1182, #1663). **AI use:** Antigravity (Gemini 4 Neon) merged #1831 onto `62265d3`, implemented the local soft-cap prototype, ran the 90 s RX 6600 runs, and drafted this report; I checked the numbers before posting.
Author
Owner

@⁠O5-7 on GitHub · 2026-11-25 04:18 UTC · original

Planning a small follow-up in crates/xcl/src/hle/kernelx.rs (AllocateTitlePhysicalPages): when sparse UMA windows are present (u.has_sparse()) and u.sparse_alloc fails, it currently falls back to u.alloc in the committed coherent window without respecting the 96 MiB KEEP headroom (VirtualAlloc leaves 96 MiB for XCL's own readback/internal allocations) and loses lazy_home decommitability.

Plan: skip the coherent u.alloc fallback when u.has_sparse() is true (going straight to VirtualAlloc(..., MEM_RESERVE) plain memory, keeping u.alloc only for coherent-only layouts without sparse windows), plus a synthetic unit test. Checked open PRs for AllocateTitlePhysicalPages / PHYS_BLOCKS / lazy_home — no overlap found.

AI use: Antigravity (Gemini 4 Neon) helped inspect kernelx.rs and draft this note.

**@⁠O5-7** on GitHub · 2026-11-25 04:18 UTC · [original](https://github.com/xcl-dev/xcl/issues/1566#issuecomment-7152720952) Planning a small follow-up in `crates/xcl/src/hle/kernelx.rs` (`AllocateTitlePhysicalPages`): when sparse UMA windows are present (`u.has_sparse()`) and `u.sparse_alloc` fails, it currently falls back to `u.alloc` in the committed coherent window without respecting the 96 MiB `KEEP` headroom (`VirtualAlloc` leaves 96 MiB for XCL's own readback/internal allocations) and loses `lazy_home` decommitability. Plan: skip the coherent `u.alloc` fallback when `u.has_sparse()` is true (going straight to `VirtualAlloc(..., MEM_RESERVE)` plain memory, keeping `u.alloc` only for coherent-only layouts without sparse windows), plus a synthetic unit test. Checked open PRs for `AllocateTitlePhysicalPages` / `PHYS_BLOCKS` / `lazy_home` — no overlap found. AI use: Antigravity (Gemini 4 Neon) helped inspect `kernelx.rs` and draft this note.
Author
Owner

@⁠anes66 on GitHub · 2026-11-25 05:45 UTC · original

Additional native Windows / NVIDIA data point on unmodified main cbc296ab65a2661a61e3e2da109134bcd5319f60, release. This is uncapped system commit exhaustion, not a test of #1831.

Setup

  • Windows 10 Pro 19045; Ryzen 7 9800X3D; 32 GB installed RAM; RTX 3060 12 GB, driver 32.0.16.2114; Rust 1.100.0 MSVC; DXC 1.9.2602.17; Agility 1.620.2.
  • Windows currently reports a 24,576 MiB pagefile and about 55.6 GiB total virtual-memory capacity. These were read after the runs, not sampled throughout them.
  • cargo build --locked --release -p xcl -j 2, then xcl.exe run <unpacked-title>; XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_HUGE_PSO_CONCURRENCY=1, explicit DXC / Agility paths and a separate XCL_DATA_ROOT. No run timer or commit cap. Configuration has title_memory_mb=0, title_memory="auto". Game data is on a SATA HDD; XCL caches were reused, NVIDIA implicit-cache state was not controlled.
  • The user manually drove menus and loading. The runs are not controlled A/B measurements. No optimization or cap was applied between them.

Observed

Run ending (local CET, 2026-11-25) Evidence
06:24 0xC0000005 read failure at title RVA 0x1fb2616, log time 281.414 s. At 281.362 s DirectStorage had logged 0x89240009; the last activity sample counted 75 failed requests. Peak sampled process commit 36,343 MB. Windows Resource-Exhaustion-Detector event 2004 at 06:24:33 identifies XCL as the largest consumer, 38,103,392,256 bytes.
06:34 Launcher report exit 0xC0000409, crash: null, stale presents: 0. The actual log reaches 291.255 s and still records presents. Peak sampled process commit 36,330 MB. Event 2004 at 06:33:51 identifies XCL at 38,090,289,152 bytes.
06:41 Same report exit 0xC0000409, crash: null, stale presents: 0. First logged CreateHeap(64 MiB) refusal 0x8007000E at 273.950 s; 3,847 no video memory for more pages of title textures warnings before the log stops at 277.736 s. Peak sampled process commit 36,620 MB. Event 2004 at 06:41:02 identifies XCL at 38,240,530,432 bytes.

The latest log's last reported driver compile finished at 38.619 s, long before the allocation-refusal burst. This does not prove that no other compilation was outstanding. The user also reported a roughly one-second monitor blackout during one loading attempt. No matching Display/nvlddmkm reset event was found in the checked interval; no driver-reset cause is established.

Limits / relevance

  • Resource-exhaustion events confirm system memory pressure, but do not identify the allocation owner inside XCL/title/driver or prove that it caused every preceding stall or exception. 0xC0000409 alone does not establish a Rust allocation abort: stderr from these manual launches was not retained separately.
  • A zero present count with crash: null in the last two reports is incomplete shutdown reporting, not evidence that the title never presented. The activity logs show otherwise.
  • The first crash preceded these two fast-fail exits and has a different signature. Do not combine them as a proven single fault.
  • Logs and Windows event XML are preserved locally. No proprietary files, dumps, raw logs or other-process event details are attached.
  • Further title/GPU attempts are paused after the repeated resource-exhaustion events and monitor blackout. No pagefile, driver, registry or BIOS changes were made.

AI use: Codex (GPT-6; exact variant unavailable) collected and compared local logs/events and prepared this report. The title runs were performed manually by the user on the stated machine.

**@⁠anes66** on GitHub · 2026-11-25 05:45 UTC · [original](https://github.com/xcl-dev/xcl/issues/1566#issuecomment-7154114383) Additional native Windows / NVIDIA data point on unmodified `main` `cbc296ab65a2661a61e3e2da109134bcd5319f60`, release. This is **uncapped system commit exhaustion**, not a test of #1831. **Setup** - Windows 10 Pro 19045; Ryzen 7 9800X3D; 32 GB installed RAM; RTX 3060 12 GB, driver `32.0.16.2114`; Rust 1.100.0 MSVC; DXC `1.9.2602.17`; Agility 1.620.2. - Windows currently reports a 24,576 MiB pagefile and about 55.6 GiB total virtual-memory capacity. These were read after the runs, not sampled throughout them. - `cargo build --locked --release -p xcl -j 2`, then `xcl.exe run <unpacked-title>`; `XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_HUGE_PSO_CONCURRENCY=1`, explicit DXC / Agility paths and a separate `XCL_DATA_ROOT`. No run timer or commit cap. Configuration has `title_memory_mb=0`, `title_memory="auto"`. Game data is on a SATA HDD; XCL caches were reused, NVIDIA implicit-cache state was not controlled. - The user manually drove menus and loading. The runs are not controlled A/B measurements. No optimization or cap was applied between them. **Observed** | Run ending (local CET, 2026-11-25) | Evidence | | --- | --- | | 06:24 | `0xC0000005` read failure at title RVA `0x1fb2616`, log time 281.414 s. At 281.362 s DirectStorage had logged `0x89240009`; the last activity sample counted 75 failed requests. Peak sampled process commit 36,343 MB. Windows Resource-Exhaustion-Detector event 2004 at 06:24:33 identifies XCL as the largest consumer, 38,103,392,256 bytes. | | 06:34 | Launcher report exit `0xC0000409`, `crash: null`, stale `presents: 0`. The actual log reaches 291.255 s and still records presents. Peak sampled process commit 36,330 MB. Event 2004 at 06:33:51 identifies XCL at 38,090,289,152 bytes. | | 06:41 | Same report exit `0xC0000409`, `crash: null`, stale `presents: 0`. First logged `CreateHeap(64 MiB)` refusal `0x8007000E` at 273.950 s; 3,847 `no video memory for more pages of title textures` warnings before the log stops at 277.736 s. Peak sampled process commit 36,620 MB. Event 2004 at 06:41:02 identifies XCL at 38,240,530,432 bytes. | The latest log's last reported driver compile finished at 38.619 s, long before the allocation-refusal burst. This does not prove that no other compilation was outstanding. The user also reported a roughly one-second monitor blackout during one loading attempt. No matching Display/nvlddmkm reset event was found in the checked interval; no driver-reset cause is established. **Limits / relevance** - Resource-exhaustion events confirm system memory pressure, but do not identify the allocation owner inside XCL/title/driver or prove that it caused every preceding stall or exception. `0xC0000409` alone does not establish a Rust allocation abort: stderr from these manual launches was not retained separately. - A zero present count with `crash: null` in the last two reports is incomplete shutdown reporting, not evidence that the title never presented. The activity logs show otherwise. - The first crash preceded these two fast-fail exits and has a different signature. Do not combine them as a proven single fault. - Logs and Windows event XML are preserved locally. No proprietary files, dumps, raw logs or other-process event details are attached. - Further title/GPU attempts are paused after the repeated resource-exhaustion events and monitor blackout. No pagefile, driver, registry or BIOS changes were made. AI use: Codex (GPT-6; exact variant unavailable) collected and compared local logs/events and prepared this report. The title runs were performed manually by the user on the stated machine.
Author
Owner

@⁠voiceovarian1-max on GitHub · 2026-11-25 08:07 UTC · original

Linux + NVIDIA: on this machine the jump at world load is not the title's C runtime heap. It is the driver's compiler under 32 pipeline workers; the title's own big blocks stay under 512 MB.

Setup: RTX 4070 Ti 12 GB (NVIDIA 620.73.04), i7-14700K, 31 GB RAM, CachyOS kernel 7.3.5, Proton Experimental's Wine (wine-11.0), vkd3d-proton v3.1 + scripts/linux/vkd3d-proton-xcl.patch. Release, x86_64-pc-windows-gnu. Local stack: main 9e3831e + #1315/#1316 + #867 + #871 + #877 + #1321 + #684 + #640 + #605 + #495 + #1420 + #1368's line. Retail 1.0.2.1, Series X profile; every compute program's DXIL already on disk, so DXC hardly ran.

  1. The title's heap, counted. The executable imports malloc, calloc, realloc, free from api-ms-win-crt-heap-l1-1-0.dll (passed to Windows) and 11 functions of xmem.dll. A local module routed those four through a counter of live blocks of 256 KiB or more (21 imports bound to it, title and its DLLs). In a run that ended with the process's anonymous memory going 12.4 → 16.1 GB in its last 10 s (VmData 23.0 → 27.8 GB), the counter never reached 512 MB.
  2. What grows instead. In the same seconds the xcl-pso-* workers inside a winevulkan call go 3 → 7 → 32 and about 57 glibc arena heaps of 64 MiB appear (table in #2127). With XCL_DXC_THREADS=4 (4 + 4 workers) there is no jump in 3 of 3 runs (Series X: 11.6–13.1 GB and 9.9–12.4 GB of anonymous memory from 100 s on); with the default the run ends by system memory in 10 of 10.
  3. A process-wide limit, Linux counterpart of the job limit. RLIMIT_DATA of 22,000 MiB put on the title's process at 10 s: memory allocation of 1726379 bytes failed from XCL's own allocator at 140 s (0xc0000409), VmData 21.3 GB at 130 s. Same picture as the 13,824 MB test above: XCL's allocation is the first refused.

This does not say what holds the 94 GB of the Windows runs above: DXC ran in those, and here it did not.

Not tested: Windows, AMD, #1831, a run with DXC compiling in the process, blocks under 256 KiB.

AI use: Claude Code (Claude Fable 5.2) ran the runs and wrote this report; posted with the account owner's approval.

**@⁠voiceovarian1-max** on GitHub · 2026-11-25 08:07 UTC · [original](https://github.com/xcl-dev/xcl/issues/1566#issuecomment-7156639979) **Linux + NVIDIA: on this machine the jump at world load is not the title's C runtime heap. It is the driver's compiler under 32 pipeline workers; the title's own big blocks stay under 512 MB.** **Setup:** RTX 4070 Ti 12 GB (NVIDIA 620.73.04), i7-14700K, 31 GB RAM, CachyOS kernel 7.3.5, Proton Experimental's Wine (wine-11.0), vkd3d-proton v3.1 + `scripts/linux/vkd3d-proton-xcl.patch`. Release, `x86_64-pc-windows-gnu`. Local stack: `main` `9e3831e` + #1315/#1316 + #867 + #871 + #877 + #1321 + #684 + #640 + #605 + #495 + #1420 + #1368's line. Retail 1.0.2.1, Series X profile; every compute program's DXIL already on disk, so DXC hardly ran. 1. **The title's heap, counted.** The executable imports `malloc`, `calloc`, `realloc`, `free` from `api-ms-win-crt-heap-l1-1-0.dll` (passed to Windows) and 11 functions of `xmem.dll`. A local module routed those four through a counter of live blocks of 256 KiB or more (21 imports bound to it, title and its DLLs). In a run that ended with the process's anonymous memory going 12.4 → 16.1 GB in its last 10 s (VmData 23.0 → 27.8 GB), the counter never reached 512 MB. 2. **What grows instead.** In the same seconds the `xcl-pso-*` workers inside a winevulkan call go 3 → 7 → 32 and about 57 glibc arena heaps of 64 MiB appear (table in https://git.gtahub.st/github/xcl-dev--xcl/pulls/2127). With `XCL_DXC_THREADS=4` (4 + 4 workers) there is no jump in 3 of 3 runs (Series X: 11.6–13.1 GB and 9.9–12.4 GB of anonymous memory from 100 s on); with the default the run ends by system memory in 10 of 10. 3. **A process-wide limit, Linux counterpart of the job limit.** `RLIMIT_DATA` of 22,000 MiB put on the title's process at 10 s: `memory allocation of 1726379 bytes failed` from XCL's own allocator at 140 s (`0xc0000409`), VmData 21.3 GB at 130 s. Same picture as the 13,824 MB test above: XCL's allocation is the first refused. This does not say what holds the 94 GB of the Windows runs above: DXC ran in those, and here it did not. **Not tested:** Windows, AMD, #1831, a run with DXC compiling in the process, blocks under 256 KiB. **AI use:** Claude Code (Claude Fable 5.2) ran the runs and wrote this report; posted with the account owner's approval.
Author
Owner

@⁠GreemSC on GitHub · 2026-11-25 21:39 UTC · original

A Linux / AMD data point for the growth itself, in case it helps to place it: on this machine it is not in any pool XCL reports either, it is many mid-size anonymous allocations, and it starts with the world load.

Setup: RX 7900 XT 20 GB (Mesa 26.2.5 RADV), 24 GB RAM, Linux 7.2, Proton-CachyOS Wine 11, local vkd3d-proton; retail 1.0.2.1, XCL_DIRECT_DXIL=1 XCL_PSO_WAIT_MS=50; main 68a284a / e0d93c8 + #1732, #684, #1860, #2097, #2404; the game in a cgroup (memory cap, the samples below are its memory.current + memory.swap.current). Under Wine, XCL's committed by the process reads 0, so these are cgroup numbers.

  • Shape over time (one run, e0d93c8 tree, first #101 at 90.4 s): 4.4 GB at 13 s, 5.9 at 28 s, 7.7 at 58 s, 10.6 at 74 s, 12.7 at 89 s. With the cap at 14 GB and 8 GB of disk swap allowed, it then pushed 8 GB to swap in 45 s (104 → 150 s) with resident memory still at ~13 GB, so > 21 GB about a minute after the world load, still climbing when I stopped it.

  • Where, by /proc/<pid>/smaps (another run, 68a284a tree, first #101 at 68.1 s), anonymous mappings by size:

    at 100 s at 220 s
    < 16 MB 9,150 mappings, 4.2 GB 17,224 mappings, 6.5 GB
    16–64 MB 43, 1.4 GB 114, 4.4 GB
    64 MB – 1 GB 14, 2.6 GB 15, 3.0 GB
    ≥ 1 GB 1, 1.2 GB 0

    At 216 s XCL's own line reads target pages 10049 MB (pools 10240 MB) and sparse pools 3264 MB — those are video memory here — and arenas 270 MB. The growth is in thousands of small and mid-size blocks, not in one region.

  • Not the two big GPU heaps: with #2009's commit (2f49088, XCL_COHERENT_HEAPS=sparse:1024) they went to the sparse windows (a GPU heap of 1172 MB / 2199 MB … in the sparse windows), and the game was at 13.5 GB at 95 s instead of 12.5–13.2.

  • Not one stuck compile: refusing the one program whose driver compile never ends here (95cc13288a27a96e, see #1035) did not keep it under the cap: 12.5–13.2 GB at 95 s with the refusal, in four runs.

  • On top of the cgroup, amdgpu's GTT holds ~3 GB.

So on a 24 GB Linux machine the title stops at the memory cap 3–190 s after the first #101 (once in the intro cutscene). I have not yet attributed the small and mid-size blocks to an owner (XCL, Wine's heap, vkd3d-proton / dxil-spirv); XCL_TRACE_MEM or a census like yours is the next step here.

AI use: Claude Code (Claude Opus 5.5) ran the runs, read the cgroup samples and smaps, and wrote this.

**@⁠GreemSC** on GitHub · 2026-11-25 21:39 UTC · [original](https://github.com/xcl-dev/xcl/issues/1566#issuecomment-7175367517) A Linux / AMD data point for the growth itself, in case it helps to place it: on this machine it is not in any pool XCL reports either, it is many mid-size anonymous allocations, and it starts with the world load. **Setup:** RX 7900 XT 20 GB (Mesa 26.2.5 RADV), 24 GB RAM, Linux 7.2, Proton-CachyOS Wine 11, local vkd3d-proton; retail 1.0.2.1, `XCL_DIRECT_DXIL=1 XCL_PSO_WAIT_MS=50`; `main` `68a284a` / `e0d93c8` + #1732, #684, #1860, #2097, #2404; the game in a cgroup (memory cap, the samples below are its `memory.current` + `memory.swap.current`). Under Wine, XCL's `committed by the process` reads 0, so these are cgroup numbers. - **Shape over time** (one run, `e0d93c8` tree, first `#101` at 90.4 s): 4.4 GB at 13 s, 5.9 at 28 s, 7.7 at 58 s, 10.6 at 74 s, 12.7 at 89 s. With the cap at 14 GB and 8 GB of disk swap allowed, it then pushed **8 GB to swap in 45 s** (104 → 150 s) with resident memory still at ~13 GB, so **> 21 GB** about a minute after the world load, still climbing when I stopped it. - **Where, by `/proc/<pid>/smaps`** (another run, `68a284a` tree, first `#101` at 68.1 s), anonymous mappings by size: | | at 100 s | at 220 s | |---|---|---| | < 16 MB | 9,150 mappings, 4.2 GB | 17,224 mappings, 6.5 GB | | 16–64 MB | 43, 1.4 GB | 114, 4.4 GB | | 64 MB – 1 GB | 14, 2.6 GB | 15, 3.0 GB | | ≥ 1 GB | 1, 1.2 GB | 0 | At 216 s XCL's own line reads `target pages 10049 MB (pools 10240 MB)` and `sparse pools 3264 MB` — those are video memory here — and `arenas 270 MB`. The growth is in thousands of small and mid-size blocks, not in one region. - **Not the two big GPU heaps:** with #2009's commit (`2f49088`, `XCL_COHERENT_HEAPS=sparse:1024`) they went to the sparse windows (`a GPU heap of 1172 MB` / `2199 MB … in the sparse windows`), and the game was at 13.5 GB at 95 s instead of 12.5–13.2. - **Not one stuck compile:** refusing the one program whose driver compile never ends here (`95cc13288a27a96e`, see #1035) did not keep it under the cap: 12.5–13.2 GB at 95 s with the refusal, in four runs. - On top of the cgroup, amdgpu's GTT holds ~3 GB. So on a 24 GB Linux machine the title stops at the memory cap 3–190 s after the first `#101` (once in the intro cutscene). I have not yet attributed the small and mid-size blocks to an owner (XCL, Wine's heap, vkd3d-proton / dxil-spirv); `XCL_TRACE_MEM` or a census like yours is the next step here. **AI use:** Claude Code (Claude Opus 5.5) ran the runs, read the cgroup samples and smaps, and wrote this.
This discussion has been locked. Commenting is limited to contributors.
No description provided.