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
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl#1566
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@tugasky on GitHub · 2026-11-24 17:43 UTC · original
What happens
title_memory_mb = 0gives an anaconda title a 13 824 MB budget (crates/xcl/src/config.rs:117), andXMemGetWorkingSetStatisticsreports it: usage ismin(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 failedfrom XCL's own allocator. On the console that state cannot exist: an allocation past the title's budget fails withERROR_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(aVirtualQuerywalk on theXCL_ACTIVITYtick 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),main930e8b4, RX 9070 XT 16 GB driver 32.0.32029.2010, Ryzen 7 9700X, 31.1 GB, Windows 11 26200, release:CreateCommittedResourceXtitle_textureskept in stepVirtualAlloc/XMemAllocprivate, ~5 MB each; 848 MB of 44.8 GB inside the title's 7 graphics reservationsSo 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 thoseVirtualAlloccalls 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()withERROR_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 objectProcessMemoryLimiton the host process (the onetests/console_dlls_e2e.rscaps 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:
XCL_PAGE_BUDGET_MB? This repository's precedent for bounding memory is an opt-in knob.Repro and hazard
XCL_MEM_CENSUS=1withXCL_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: checkGet-Process xcl | Select PrivateMemorySize64during a run and verify a kill withGet-Process- aStart-Processobject'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: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 objectProcessMemoryLimiton the host before the title is mapped, so an allocation past it fails withERROR_NOT_ENOUGH_MEMORYthe 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.What this says:
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:
13824is 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.
@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.dllallocates 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.930e8b4already 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
main9e3831ewith local test-only patches,XCL_HEAP_WINDOWS=1.xcl-dxc-0was insidedxcompiler.dllin the thread dump when I stopped it with 0.7 GB of commit leftxcl shaders <pack> --precompile --only cs --pipelinesThe 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_ATat a few points of the plateau's growth, and whether anxcl-dxc-*thread is insidedxcompiler.dlleach 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-O0nor-O1gets 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.
@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).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 unhandled0x80000003ingame_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 824is 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: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.XCL_PAGE_BUDGET_MBasks 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 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:0x800000030xC0000005Two things I did not expect:
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 to0xc73f50000, withxcl.exeframes under the title's on the stack. A refused commit came back to the title as a bad write rather than a clean0x8007000E. 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:
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 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):
0xC00004090xC00004090xC0000005inbink2scarlett.dll, write at0xc4e020c00The 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:
bink2scarlett.dll+0xc5e3and+0xc6ab), writing into0xc4e020c00- a GPU-visible window address. Same shape as an earlier0xC0000005at 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.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(15xcl-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.
@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.xcl-psothreads are insidenvgpucomp64.dllat 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.
@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@930e8b4plus 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 from930e8b4, mostly in the D3D12.X layer.The cap is a job-object
ProcessMemoryLimitover the whole process. The harness had been starting the title with-WindowStyle Hiddenand 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 unexplained0xC000040940.4 s in — the moment the run's first scheduled press existed — is one line:at 40.4 s, exit
0xC0000409. A second run withRUST_BACKTRACEon gave: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(), andabort()is0xC0000409: no exception line, no frames, no report. So in a capped run the first thing that dies can be XCL's ownVecgrowth, 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 (orwant, if the request is bigger) when XCL's own heap is refused, and the counting allocator retriesalloc,alloc_zeroedandrealloconce. 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: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
PresentXcalls). So the intro alone fits and holds.TileHeap: used (3631Mb) - total (6236Mb)) and died at 188.9 s withD3D12.X: command list … (type 2) Close → 0x8007000e(five times, five different lists), thenunhandled exception 0x80000003 … rax=0x8007000eon five threads — the title asserting on a refusal it got from its ownClose. 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 onepressed for the first timeline, at 17.978 s, before the first scheduled press at 40 s), so read that arm as "with the press schedule configured".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 separate0xC0000005, which I am filing on its own. Having aCloserefused, 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-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:
Build and machine on my side:
main@930e8b4plus 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-Nthreads and 14 of the 15xcl-pso-Nthreads inMutex::lock_contended(mutex/futex.rs:61) insidepso_async::queue,xcl-dxc-1parked inmpmc::list::Channel::recvwith no work, and onexcl-pso-pre-0insidedxc::compile. Nothing sits in a driver module. That matches your #1096 reading of idle DXC threads; if yours are genuinely insidenvgpucomp64.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'sE_ACCESS_VIOLATION(hle/dstorage.rs:59): the shim returns it when the destination range is not committed writable (:869–870,writable()at:803checksVirtualQueryforMEM_COMMITplus 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.
@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 thedevice 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:
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:
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).
XCL_TITLE_COMMIT_CAP_MB=20480: XCL aborts at 110 s (0xC0000409). @tugasky found 20,480 MB to be anedge 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.
@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.logwithout allocating, and if the run then ends with0xC0000409, name that as the crash inreport.json. Today such a run leaves onlymemory allocation of N bytes failedon stderr; the log just stops andreport.jsonhas"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.
@thiagocalile on GitHub · 2026-11-25 01:19 UTC · original
Tested PR #1831 (
f0dbb08, merged locally ontomain62265d3) and a local two-tier soft+hard cap prototype on an AMD Radeon RX 6600 (8 GB VRAM) to see whether refusing only titlekernelxallocations with 2 GiB of XCL headroom avoids the0x8007000E/0xC0000409failures seen under a raw job-object cap.Hardware & setup
32.0.21045.29003;XCL_ADAPTER=radeon), Ryzen 7 5700X3D, 47.9 GB RAM, Windows 11 (26200), Rust1.100.0MSVC, DXC1.8.2502.11, release build.scripts/smoke.ps1world-load runs (XCL_DIRECT_DXIL=1,XCL_PRESS_A_AT=15,25,35,XCL_NETWORK=0).Results
23,979 MB0x02,348frames (60 60 60), 0 crashes20,480/ none20,241 MB0x80000003CreateHeap(64 MiB)refused (0x8007000E) at58.1 s20,480/18,43220,434 MB0x80000003kernelxrefusals; commit still climbed18.4 → 20.4 GBvia XCL's ownvram::PagesCreateHeap(64 MiB)(0x8007000E) at77.4 s16,384/ none16,224 MB0xc0000409__fastfailinside XCL/CRT16,384/14,33613,312 KiB)14,891 MB0x800000030xC0000409, but the title asserted0x80000003on the very first refusedXMemallocation (42.9 s → 43.7 s)Takeaways
0xC0000409inside XCL/CRT, turning it into a logged refusal before the title's own handler runs — e.g. gatingVirtualAlloc(MEM_COMMIT),XMemAllocDefault, andAllocateTitlePhysicalPagesinkernelx.rs:XMemrefuses during world load (it asserted0x80000003on refusal #1 at14.3 GB), and above ~18.4 GB the climb is XCL's own D3D12DEFAULTheap pools (CreateHeap(64 MiB)), notkernelx.XCL_TITLE_COMMIT_CAP_MBworks best as an outer safety fuse (e.g.>= 28–32 GBto protect Windows from runaway commit, optionally with a small soft headroom to avoid silent0xC0000409), 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.@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()) andu.sparse_allocfails, it currently falls back tou.allocin the committed coherent window without respecting the 96 MiBKEEPheadroom (VirtualAllocleaves 96 MiB for XCL's own readback/internal allocations) and loseslazy_homedecommitability.Plan: skip the coherent
u.allocfallback whenu.has_sparse()is true (going straight toVirtualAlloc(..., MEM_RESERVE)plain memory, keepingu.alloconly for coherent-only layouts without sparse windows), plus a synthetic unit test. Checked open PRs forAllocateTitlePhysicalPages/PHYS_BLOCKS/lazy_home— no overlap found.AI use: Antigravity (Gemini 4 Neon) helped inspect
kernelx.rsand draft this note.@anes66 on GitHub · 2026-11-25 05:45 UTC · original
Additional native Windows / NVIDIA data point on unmodified
maincbc296ab65a2661a61e3e2da109134bcd5319f60, release. This is uncapped system commit exhaustion, not a test of #1831.Setup
32.0.16.2114; Rust 1.100.0 MSVC; DXC1.9.2602.17; Agility 1.620.2.cargo build --locked --release -p xcl -j 2, thenxcl.exe run <unpacked-title>;XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_HUGE_PSO_CONCURRENCY=1, explicit DXC / Agility paths and a separateXCL_DATA_ROOT. No run timer or commit cap. Configuration hastitle_memory_mb=0,title_memory="auto". Game data is on a SATA HDD; XCL caches were reused, NVIDIA implicit-cache state was not controlled.Observed
0xC0000005read failure at title RVA0x1fb2616, log time 281.414 s. At 281.362 s DirectStorage had logged0x89240009; 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.0xC0000409,crash: null, stalepresents: 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.0xC0000409,crash: null, stalepresents: 0. First loggedCreateHeap(64 MiB)refusal0x8007000Eat 273.950 s; 3,847no video memory for more pages of title textureswarnings 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
0xC0000409alone does not establish a Rust allocation abort: stderr from these manual launches was not retained separately.crash: nullin the last two reports is incomplete shutdown reporting, not evidence that the title never presented. The activity logs show otherwise.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.
@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:main9e3831e+ #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.malloc,calloc,realloc,freefromapi-ms-win-crt-heap-l1-1-0.dll(passed to Windows) and 11 functions ofxmem.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.xcl-pso-*workers inside a winevulkan call go 3 → 7 → 32 and about 57 glibc arena heaps of 64 MiB appear (table in #2127). WithXCL_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.RLIMIT_DATAof 22,000 MiB put on the title's process at 10 s:memory allocation of 1726379 bytes failedfrom 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.
@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;main68a284a/e0d93c8+ #1732, #684, #1860, #2097, #2404; the game in a cgroup (memory cap, the samples below are itsmemory.current+memory.swap.current). Under Wine, XCL'scommitted by the processreads 0, so these are cgroup numbers.Shape over time (one run,
e0d93c8tree, first#101at 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,68a284atree, first#101at 68.1 s), anonymous mappings by size:At 216 s XCL's own line reads
target pages 10049 MB (pools 10240 MB)andsparse pools 3264 MB— those are video memory here — andarenas 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_MEMor 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.