fix(build): stop sampling memory for exited compiler roots #1562
No reviewers
Labels
No labels
accessibility
autorelease: pending
autorelease: tagged
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
question
testing wanted
wontfix
No milestone
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Hookshot!1562
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/compiler-memory-liveness"
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?
The build memory gate samples a compiler's process tree by PID even after its retained
Popenhas reported completion. A stale counter or a PID found in a later snapshot can therefore contribute memory for a compiler that has ended; the existing child-memory regression already expects zero in that state.Check
Popen.poll()before querying the platform counter. Known-ended roots, including exitcode0, return zero without a PID lookup. Live compilers still include their descendants, and unavailable counters keep the existing zero fallback. Peak estimates, reserves, worker floors and lease release are unchanged. This does not make process-tree sampling atomic or solve every exit/PID-ancestry race.Validation at
2154b47on mainff69134:A Windows source CI initially exposed the ended-process assertion while validating an unrelated capture PR. A later local run passed, so the deterministic stale-counter case is kept rather than relying on retrying that integration test. The exact OS counter behind that original run is not claimed as instrumented. See
docs/compiler-memory-accounting.md. No game/runtime files or unrelated scheduler changes are included; three exact-head fork workflows follow.Current-head validation
Current head
a014f6c, based on mainbe541fa. Earlier local/runtime results describe their recorded source hashes.The standalone contribution patch is unchanged after the audited main refresh; exact-head build/source checks are refreshed below. Earlier runtime evidence remains tied to its recorded hash.
Fork runs are separate from upstream Actions approval; no maintainer approval gate is bypassed.