Renderer and NodeService memory growth causes repeated Linux OOM kills and V8 OOM crash (code 132) during long Copilot Agent sessions
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.4k
- PR merge metrics
- PR metrics pending
Description
### Additional data point
This appears closely related to #315630 and #311225. The problem is still reproducible on VS Code 1.134.0.
Does this issue occur when all extensions are disabled?: **Unknown**. The failure is intermittent and generally takes several hours. GitHub Copilot is bundled with this VS Code build.
### Environment
- VS Code: 1.134.0
- Commit: 110a328ea54b42367b803ec53ee0bf52ef26b419
- Package: 1.134.0-1787078834, amd64
- Electron: 42.8.1
- Chromium: 148.0.7778.280
- Node.js: 24.18.1
- V8: 14.8.178.38-electron.0
- Bundled GitHub Copilot: 0.62.0
- OS: Ubuntu 24.04.4 LTS, x86_64
- Kernel: 6.17.0-1022-azure
- Desktop/session: XFCE, X11 via xrdp
- CPU: 4 vCPU, Intel Xeon Platinum 8370C
- Memory: 15 GiB, no swap
- Installed extensions: 99
### Usage pattern
1. Open multiple local VS Code windows containing large Python/TypeScript workspaces.
2. Use Copilot Agent for tool-heavy, long-running sessions.
3. Keep the windows open for several hours.
4. Renderer memory grows until the kernel kills the process or V8 terminates it.
The exact action that triggers the final allocation failure is not yet known.
### Crash evidence
`main.log` shows four renderer losses in one session:
~~~text
2026-08-20 16:59:47.877 [error] CodeWindow: renderer process gone (reason: killed, code: 9)
2026-08-20 17:03:11.206 [error] CodeWindow: renderer process gone (reason: killed, code: 9)
2026-08-20 21:57:21.059 [error] CodeWindow: renderer process gone (reason: killed, code: 9)
2026-08-21 04:22:24.800 [error] CodeWindow: renderer process gone (reason: crashed, code: 132)
~~~
The first three events match Linux kernel OOM-killer records:
~~~text
Out of memory: Killed process 640503 (code), anon-rss: 4365680 kB
Out of memory: Killed process 655846 (code), anon-rss: 3995044 kB
Out of memory: Killed process 639699 (code), anon-rss: 4081976 kB
~~~
The code-132 crash matches a kernel native trap:
~~~text
2026-08-21 04:22:23 kernel: traps: code[676025] trap invalid opcode ... in code
~~~
Crashpad completed report `5270b517-eafe-4eb5-9d82-24339c7a0a8b` identifies the crashed process as `renderer` and contains V8 OOM data:
~~~text
heap.used: 1617648408
Heap: used=1542.7MB limit=4096.0MB
Mark-Compact (reduce) 1542.7 -> 1542.7 MB
current mu = 0.000
allocation failure; GC in old space requested
~~~
A second completed report, `7cd6127b-844d-4df7-b025-db7505eb97b4`, was generated on 2026-08-19. It identifies `node.mojom.NodeService` as the failed utility process:
~~~text
heap.used: 3501854508
electron.v8-oom.location: CALL_AND_RETRY_LAST
Mark-Compact (reduce) 3339.6 -> 3339.6 MB
current mu = 0.000
~~~
After the renderer crash, the extension host reports that the renderer closed its MessagePort and then exits normally with code 0. This suggests the extension-host shutdown is a consequence rather than the initial crash.
A current post-crash snapshot shows 44 VS Code processes using approximately 12.91 GiB aggregate RSS on a 15 GiB machine.
### Expected behavior
Renderer, Copilot Agent, and utility-process memory should remain bounded. Long-running sessions should not exhaust system memory or terminate workspace windows.
### Crash dumps
Both minidumps are retained locally and can be provided privately to maintainers. I am not attaching them publicly because they contain recoverable Copilot session content and local filesystem paths.
Contributor guide
Assessment
This issue has not been assessed yet.