startup-runtime: the budget heartbeat does not say whether a commit failure comes from the job limit, the system commit or the page pool #2832
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows#2832
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?
@tedin7 on GitHub · 2026-11-26 12:42 UTC · original
Part of #870 (related: #1199 tracks the commit pressure itself; this only makes failures attributable)
Problem. A startup run that ends on
ERROR_COMMITMENT_LIMIT(1455) orERROR_NOT_ENOUGH_MEMORY(8) fromXMemMapPhysicalPagesScattercannot be attributed from its log. Three different limits can produce the same error, and nothing in the log tells them apart:run.ps1 -MemoryGiB,JobMemoryLimit),x2w_xmem_page_statsandx2w_xmem_slab_statsalready count but only the DirectStorage heartbeat prints (sections only).The
x2w-budgetline (X2W_D3D12_BUDGET=1) lists DXGI usage and the resource categories, so it is the line a reader compares across a run, but it has none of these numbers. The failure line of the pool (x2w-xmem XMemMapPhysicalPagesScatter failed stage=map-view ... error=1455) names the page and the region but not how full any limit was.Proposal.
x2w-budgetline:commit=<used>/<limit> avail=<free>(system commit, MiB),sections=<n> slabs=<n> slots=<in use>/<free>(the page pool) andjob_peak=<MiB> job_limit=<MiB|none>(peak commit and memory limit of the job). Each readsn/awhen it cannot be read.x2w-xmem commit exhausted at <call> (error N): ...line that saysjob memory limit N GiB reached (run.ps1 -MemoryGiB)when the job peak is within 256 MiB of its limit (otherwisejob memory limit not reached), then the job numbers, the system commit and the pool counters, with the hint thatX2W_XMEM_LAZY_COMMIT=1(run.ps1 -LazyMemory) keeps untouched pages out of the commit.tools/startup/triage_run.pykeeps reading the budget line with and without the new fields.Done when a source-built check covers the text of the new fields and of the failure line (known and unknown values, job limit reached or not, which error codes count, the system commit is consistent),
triage_run.pyis checked against lines with and without the fields, anddocs/startup-runtime.mddescribes them.Source: Microsoft Learn, Win32
GlobalMemoryStatusEx,QueryInformationJobObjectwithJobObjectExtendedLimitInformation(JOBOBJECT_EXTENDED_LIMIT_INFORMATION:JobMemoryLimit,PeakJobMemoryUsed), system error codes 8 and 1455; earlier code of this repo (x2w_xmem_page_stats,x2w_xmem_slab_stats,report_budget).@tedin7 on GitHub · 2026-11-26 12:42 UTC · original
Taking this one; a Draft PR will follow.