Terminal memory leak (oom-kill)
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.4k
- PR merge metrics
- PR metrics pending
Description
Does this issue occur when all extensions are disabled?: Yes/No
- VS Code Version: `1.136.1`
- OS Version: Arch Linux (rolling)
Steps to Reproduce:
1. Run processes in terminal like terraform for example or systemd journal.
2. Occasionally the terminal will flash and the process is killed by oom-kill.
journal:
`Sep 01 23:05:24 ben-pc4 kernel: oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=user.slice,mems_allowed=0,global_oom,task_memcg=/user.slice/user-1000.slice/user@1000.service/app.slice/app-code-2365.scope,task=rg,pid=419562,uid=1000
Sep 01 23:05:24 ben-pc4 kernel: Out of memory: Killed process 419562 (rg) total-vm:13676836kB, anon-rss:10938524kB, file-rss:8kB, shmem-rss:0kB, UID:1000 pgtables:24868kB oom_score_adj:200`
terminal.log:
`2026-09-07 21:57:48.002 [info] Latency measurements for local backend
window<->ptyhost (message port): 0.10ms
window<->ptyhostservice<->ptyhost: 0.60ms
ptyhostservice<->ptyhost: 0.25ms []
2026-09-07 22:35:07.476 [error] The terminal's pty host process exited, the connection to all terminal processes was lost []
`
main.log:
`2026-09-07 21:57:40.344 [info] StorageMainService: creating application shared storage
2026-09-07 21:57:40.382 [info] [shared storage] Creating shared storage database at '/home/ben/.vscode-shared/sharedStorage/state.vscdb' (wasCreated: false)
2026-09-07 21:57:40.382 [info] [shared storage] Initializing fallback application storage (path: /home/ben/.config/Code/User/globalStorage/state.vscdb)
2026-09-07 21:57:40.386 [info] [shared storage] Fallback application storage initialized with 136 items
2026-09-07 21:57:40.600 [info] update#disable - updates are disabled by user preference
2026-09-07 21:57:40.600 [info] update#setState disabled
2026-09-07 22:35:06.935 [error] [UtilityProcess type: shared-process, pid: 320816]: crashed with code 15 and reason 'killed'
2026-09-07 22:35:06.952 [error] ptyHost terminated unexpectedly with code 15
2026-09-07 22:35:06.954 [warning] [UtilityProcess type: ptyHost, pid: 321170]: unable to kill the process
2026-09-07 22:35:06.961 [info] Extension host with pid 320780 exited with code: 15, signal: unknown.
2026-09-07 22:35:06.962 [error] [UtilityProcess id: 1, type: extensionHost, pid: 320780]: crashed with code 15 and reason 'killed'
2026-09-07 22:35:06.969 [error] [UtilityProcessWorker]: terminated unexpectedly with code 15, signal: unknown
2026-09-07 22:35:07.709 [info] Extension host with pid 344301 exited with code: 0, signal: unknown.
`
Note: The last number of minor changes introduced this, potentially `1.134.0`.
Contributor guide
Assessment
This issue has not been assessed yet.