Bun process.memoryUsage Fails to Track Live Typed-Array Storage
Is it fixed? Not yet.
Ongoing since Nov 15, 05:01 UTC. First reported Nov 15, 05:01 UTC.
What happened
On Bun canary 1.4.5-canary.1+358bd97ee on macOS arm64, process.memoryUsage fails to track live typed-array storage (such as Uint8Array or Buffer.alloc) in external and arrayBuffers until a full garbage collection or direct .buffer access occurs. Explicitly created ArrayBuffers are counted immediately. The issue affects developers relying on process.memoryUsage for accurate memory monitoring.
What caused it?
Under active investigation. No report has identified a root cause yet.
No verified workaround yet
None of the linked reports describe a mitigation. This page updates when one appears.
Official fixTimeline
- Investigating(current)
- Workaround available(upcoming)
- Resolved(upcoming)
- First report on GitHub issue
process.memoryUsage misses live typed-array storage until GC or .buffer access
Source
Evidence
1 report · 1 GitHubShow
- [1]GitHub First reportprocess.memoryUsage misses live typed-array storage until GC or .buffer access(opens GitHub issue in a new tab)
On canary 1.4.5-canary.1+358bd97ee (macOS arm64), a live 4 MiB Uint8Array or Buffer.alloc inside a worker initially adds zero to both external and arrayBuffers. After a full GC, external includes the allocation but arrayBuffers still does not. Accessing .buffer makes it appear in arrayBuffers. This also reproduces on the main thread and with Buffer.allocUnsafe and Buffer.allocUnsafeSlow. Explicit new ArrayBuffer(4 1024 1024) is counted immediately. The distinction is whether the typed array…
by steipete 0upvotes 1comments
FAQ
What happened in the Bun issue?
On Bun canary 1.4.5-canary.1+358bd97ee on macOS arm64, process.memoryUsage fails to track live typed-array storage (such as Uint8Array or Buffer.alloc) in external and arrayBuffers until a full garbage collection or direct .buffer access occurs. Explicitly created ArrayBuffers are counted immediately. The issue affects developers relying on process.memoryUsage for accurate memory monitoring.
What is affected by the Bun issue?
Bun (versions: 1.4.5-canary.1+358bd97ee).
When did the Bun issue start and end?
It started Nov 15, 05:01 UTC and is still ongoing (3 d 23 h so far). This page updates as it develops.
How do I get alerts for Bun?
Subscribe to the Bun RSS feed for every new Bun incident, or connect an AI assistant to WhatBrokeToday over MCP and ask whether Bun is down. Bun feed
Where does this information come from?
WhatBrokeToday collects public status pages, developer community reports and security advisories, groups the ones about the same problem, and links every report under Evidence on this page. This one has 1 report from 1 independent source.