Public: anyone can read this; the crew can change it.
The memory line says what is held: RSS and its anonymous part, and the allocator's churn as a rate, never "committed 126 GiB" #17667
Merged 12h 21m ago, live in production
The minute line printed process mimalloc committed 126739 MiB (peak 126739 MiB) 22 minutes after production's 20:14 boot, while the process had VmSize 22 GiB, VmData 12.4 GiB and RSS 1.8 GiB (anonymous 1.7 GiB).
-
Reviews
Changes requested — before the latest pushThe direction is right: the line now says RSS and its anonymous part and gives the allocator total only as a rate, and the sentinel evidence follows. Two things to fix in one round.
- The wiring that makes the line is untested.
churnPerMinuteandmemoryLineare unit-tested, but thebeforestate instartMemorySampler(src/boards/memory.ts) is not. No test ticks the sampler twice and checks that the second logged line carriesallocator churn … a minuteand the first does not. Ifbeforewere never updated, or updated before the call, every test would still pass. Add a test that ticks twice and reads the log lines. - The header comment in src/perf/memory_watch.ts is now false. It still says the commit is "printed on the line and is never a part". The commit is no longer printed as a size, and the sentence is split mid-line (
It overlaps the/heaps). Rewrite that paragraph so it says what is true: the total is said only as churn, it overlaps the heaps, and it is never a part.
Security, both doors and dependencies are unaffected:
/proc/self/statusis read with a fixed path and its parse is guarded. The docs are updated in docs/features/memory-growth.md and nothing was added to the README.ApprovedApproved. The earlier head dfb6f2840e26 is not in my clone, so I could not diff against it; I read the change as it stands. The minute line now says RSS and its anonymous part (undefined off Linux, and the line omits it cleanly). The allocator total appears only as a per-minute rate and is undefined for a first reading or a reset, so "committed 126 GiB" cannot print. The tests would fail without the change: the line format,
churnPerMinute, therssAnonparse and failure paths, and a sampler test over three ticks. The how-to in docs/features/memory-growth.md is updated and README is untouched. There is no page or terminal surface, so no second door is needed. The change adds no dependency, and the /proc read is guarded.Two things I would do next:
- Non-blocking:
src/boards/memory.ts:104puts a long spread-and-fields object on one line. Wrap it for readability. - Non-blocking: the 22-minute evidence figure in the code comment is dated 2026-12-02. If the allocator's behaviour changes in a later Bun, say so in the doc so the claim does not go stale.
- The wiring that makes the line is untested.
-
Checks
shipped production is serving it deploy 5fa2c54
-
History
- The memory line says what is held: RSS and its anonymous part, and the allocator's churn as a rate, never "committed 126 GiB" 83b8170
- Game pages: an operator on a phone finds the five things they came for (#17664) 2d0f5f0
- The cost ledger's chain is walked in a worker: a boot no longer holds the loop 0.5-1 s for it (#17638) 7ce8163
- Merge pull request #17665 from sold/game-restore 07ec5c4
- A snapshot's files are cut off the serving thread: an unchanged hosted forge's stream pass holds the loop 0 ms, not 0.8 s (#17622) 574b021
- Merge main into sold/game-restore dffb002
- A game box's snapshot comes back as a game box, not a forge on its worlds (#17625) 275aa3a
- A machine says what it boots: a forge, a game box or services (#17662) f1cc743
- A search that finds nothing is sent to the crew on Enter (#17648) bd828f9
- A pull that lands while its check runs keeps the check, and a red it ends with is main's, said on the home's first line (#17632) f270a47
- Merge pull request #17649 from sold/game-token 6e291aa
- Games: a player asks the forge in game and is answered from its own data (#17641) 4f237e3
- A machine says what it boots: a forge, a game box or services (#17625) 70e4ecc
- Full suite red: 2 files in check run 01m8w6hr59j962wx5rp8ngjz3e (#17655) 4128d1b
- Keep the last two tokens: a restored forge still answers the box e817733
- Talk: a draft change's Undo stands on its own line, and the words name it Undo, never Restore (#17652) 93367a1
- Merge pull request #17650 from sold/game-proxy bbe14be
- First-time studio owner: a cloud bill, an app's deploy and its undo are hard to find (#17640) 1c6bd9c
- Merge pull request #17644 from sold/services-design fe35fac
- A game box's boot token is spent at its first sync 5d3c497
The minute line printed
process mimalloc committed 126739 MiB (peak 126739 MiB)22 minutes after production's 20:14 boot, while the process had VmSize 22 GiB, VmData 12.4 GiB and RSS 1.8 GiB (anonymous 1.7 GiB). Bun'sjsc.memoryUsage().currentCommitonly grows on Linux (peak always equal to it, about 5 GiB a minute), so it is what mimalloc committed since the process began: churn, not memory. A wear figure that reads as a 126 GiB leak is wrong.Now:
memory main: rss 1844 MiB (anonymous 1662 MiB), heap 539 MiB, allocator churn 5120 MiB a minute, database caches up to 1536 MiB, up 22 min. Anonymous RSS is the kernel's ownRssAnon(/proc/self/status; left out where there is none); churn is the total's change since the last minute (none on the first, nor across a reset). A memory-growth finding quotesmemory anonymous rss (process): first hour, trip, nowwhere it quoted the commit. The total is kept on the reading ascommittedSoFar, read only as a rate.On runner-6, against the kernel's figures: the line said rss 91.7 MiB (anonymous 67.9 MiB) where /proc/self/status said VmRSS 98,856 kB and RssAnon 69,580 kB, a second apart, after 800 MiB of 4 MiB buffers turned over.
test/memory-watch.test.ts: the line with and without anonymous RSS and churn, the total never said as a size, the rate (first reading and a reset give none), RssAnon read from the kernel's line and absent where it is not; sentinel-memory-evidence quotes the anonymous RSS. docs/features/ memory-growth.md says the same. 91 pass across the memory test files. Try: the preview's /system log a minute after it boots: the
memory main:line names rss, anonymous and churn a minuteCo-Authored-By: Claude Fable 5 <[email protected]>
🤖 Generated with Claude Code