Repository navigation
Description
Operating system
macOS
Orca version
1.4.156
Details
Short summary
A high-CPU Next.js 16 Turbopack process inside an Orca-managed terminal causes Orca's resource accounting to attribute an impossible 54-120 GB to that terminal process tree. Orca then becomes unresponsive and requires a force quit.
The child process did consume substantial resources, but its measured RSS was approximately 1.3 GB, not tens of gigabytes. The host has 51.5 GB physical RAM.
This reproduced twice. The second reproduction required force-quitting Orca.
Environment
- macOS
- Orca 1.4.156
- Node 24.18.0
- pnpm 10.33.4
- Next.js 16.2.11
- Local Orca-managed terminal
- 51.5 GB physical memory
- No swap or compression pressure before reproduction
Steps to reproduce
-
Open a Next.js 16 application in an Orca-managed worktree terminal.
-
Run a development script that resolves to:
next dev --port 3001Next reports
Next.js 16.2.11 (Turbopack). -
Request several application routes so Turbopack starts compiling them.
-
Observe the Next process and
orca diagnostics memory --json.
No Turbopack trace is attached because reproducing the issue again risks another forced restart.
Actual behavior
During the captured reproduction:
next-serverRSS: approximately 1.33 GBnext-serverCPU: approximately 356%- Orca attribution for the terminal: 54.23 GB memory and 904.5% CPU
- Orca attribution for the worktree: 54.65 GB
- Orca diagnostics reported the 51.5 GB host at 99.69% used
- The user subsequently observed approximately 120 GB attributed during the repeated incident
- Orca became unresponsive and had to be force-quit
After restarting Orca, its app memory returned to approximately 1.65 GB and the host returned to normal.
The 54-120 GB values cannot represent resident memory on this host. This looks like process-tree double counting, virtual-memory/footprint accounting, or another runaway attribution path. It is unclear whether the same accounting result also drives a renderer allocation or resource-manager feedback loop.
Control comparison
The same application, Node version, terminal ownership, and routes were tested with:
next dev --webpack --port 3001
Results after compilation:
next-serverRSS: approximately 1.78 GB- CPU settled near 1%
- Orca attributed approximately 2.20 GB to the entire terminal
- Orca stayed responsive
- Closing the terminal removed the process tree and released port 3001
This indicates that Turbopack's sustained compile load is a reliable trigger, but the impossible memory attribution and Orca failure are Orca-side behavior.
Expected behavior
- A busy child process must not make Orca attribute more memory than exists on the host.
- Resource Manager and
orca diagnostics memoryshould report a non-duplicated resident/footprint measurement with documented semantics. - Orca should remain responsive enough to stop the offending terminal.
- If a terminal exceeds a safe resource threshold, Orca should surface the actual child process and allow bounded termination rather than entering a state that requires force quit.
Workaround
All affected local applications now explicitly use next dev --webpack and pin Node 24. This avoids the known trigger but does not repair Orca's accounting/failure behavior.
Related recent work
v1.4.156 includes renderer OOM diagnostics (#9984). The broad memory-bounding change #10179 was included and then reverted in the same release. This incident still reproduces on the released 1.4.156 build.
Activity
nwparker commentedon Jul 27, 2026
I investigated this against the current collector and reproduced both the accounting behavior and the Next.js trigger.
There are two separate effects here:
The 54–120 GB terminal value has misleading macOS RSS semantics. Orca runs
ps -eo pid=,ppid=,pcpu=,rss=, converts RSS from KiB to bytes, walks each PTY subtree, and globally deduplicates PIDs. This rules out the same PID being counted repeatedly by the tree walk. However, macOS RSS is not a unique physical-footprint measurement: aliased/shared resident pages can be counted repeatedly, and summing RSS across a process tree compounds that. In a controlled test, mapping one 64 MB backing file 800 times produced about 52.5 GiB ofpsRSS and 50–53 GiB of Orca attribution whilevmmapreported only about 26–28 MB of physical footprint.The host percentage is also not a memory-pressure reading: Orca currently reports
os.totalmem() - os.freemem()as used memory. On macOS that excludes important available/reclaimable-memory semantics and can read near 100% without meaning the same thing as Memory Pressure.Next.js 16.2.11 also has a real native runaway that can exhaust the machine. I pinned the public
intoRandom/next-global-not-found-import-bugreproduction to Next 16.2.11 and triggered it by requesting/,/path, and several unmatched routes including/nope.png. The bounded run reached roughly 1,034% CPU. At capture time thenext-serverprocess had 24,047,488 KiB RSS, whilevmmapreported an 18.2 G physical footprint (19.8 G peak) and 25.0 G resident regions. Sampling showed the active path insidenext-swc.darwin-arm64.node. Orca's corresponding worktree sample was 25,426,755,584 bytes. Stopping the terminal released roughly 25 GB of host memory.This closely matches vercel/next.js#92256, including the global-not-found import trigger, sustained native CPU loop, Next 16.2.11, and the webpack control. The reporter there found the issue appears fixed in
16.3.0-preview.9. Related native/worker growth is also documented in #92055, #91585, #92978, and #95108.I also exercised the real Resource Manager collector and open popover under a synthetic 131-session load. Snapshot IPC remained 33–45 ms, peak renderer timer lag was 8.4 ms, post-GC renderer heap growth was 1.65–4.06 MB, and there was no
render-process-gone. The renderer replaces each snapshot and the collector retains at most 60 numeric history samples, so I found no path where a large displayed number creates a proportional renderer allocation. Retained crash reports/traces likewise did not show a matching renderer V8 OOM.Current conclusion: Orca's displayed values need corrected/documented macOS accounting semantics, but the force-quit incident is best explained by Orca becoming collateral damage when the Next/Turbopack native loop consumes cores and real system memory. The huge displayed value itself is not causing a Resource Manager allocation feedback loop.
Workarounds: use
next dev --webpack, remove imports from the affectedglobal-not-found.tsx, or move to a Next 16.3 build containing the upstream correction once an appropriate version is available.I'm keeping this issue open because the Orca accounting defect remains. I will address that in a separate PR, isolated from unrelated work.
nwparker commentedon Jul 27, 2026
the tl;dr BTW is that we will change the way we count.
But the unresponsiveness as far as I can tell was your whole computer slowing down
nwparker commentedon Jul 27, 2026
Will leave this open for 3 days!
I merged some accounting changes above ^
nwparker commentedon Jul 27, 2026
Repro status: cannot_repro (cannot safely force host OOM)
Attempt
Report: Next.js Turbopack ~1.3 GB RSS attributed as 54–120 GB, freezing Orca.
What we checked
Memory collector (
src/main/memory/collector.ts) usespsRSS with subtree walk and a claimed-pid set to avoid double-counting shared ancestors. Host metric uses free-memory / memory_pressure. No obvious code path that multiplies RSS by ~40× without a bad sample or host metric misread.Conclusion
Cannot reproduce the 54–120 GB figure without re-running the high-CPU Turbopack workload to OOM risk. If reproducible, capture
orca diagnostics memory --json+ps -o pid,rss,command -p <next-pid>side-by-side at peak.nwparker commentedon Aug 1, 2026