Remote SSH: oom Issue in versions newer than 1.120.0 when connected via ssh
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.4k
- PR merge metrics
- PR metrics pending
Description
VS Code Version:
- Working Version: 1.120.0
- Issue Observed: All versions greater than 1.120.0 example 1.127.0
- Remote-SSH Extension: Remote - SSH: Editing Configuration Files; Microsoft; 0.87.0
OS Version:
Local Machine: Windows 11; 64-bit
Remote Machine:
- Ubuntu; VERSION=20.04.6
- 16 Core
- Remote connection via SSH
Steps to Reproduce:
1. Launch Visual Studio Code version 1.127.0 (greater than 1.120.0).
2. Connect to a remote Linux machine using the Remote-SSH extension.
3. Open the same workspace/repository that works correctly with VS Code 1.120.0.
4. Allow the workspace and extensions to initialize.
5. Observe increasing CPU and memory consumption on the remote
host by VS Code related processes.
6. Monitor the remote machine using:
top
ps -ef
7. One or more processes named "MainThread" begin consuming excessive
CPU resources (up to ~100% CPU).
8. VS Code becomes sluggish/unresponsive and eventually encounters
memory-related instability/OOM symptoms.
9. Repeat the same steps using VS Code 1.120.0.
10. Observe that the issue does not occur and the remote session remains stable.
Expected Result:
- Remote-SSH connection should remain stable.
- VS Code should operate normally without excessive CPU or memory consumption.
- Behavior should be consistent with VS Code 1.120.0.
Actual Result:
- (reason: 'oom', code:'-536870904')Issue occurs only in VS Code versions newer than 1.120.0.
- High CPU utilization observed on the remote machine.
- Processes displayed as "MainThread" consume significant CPU resources (up to ~100%).
- Remote development experience becomes progressively slower.
- Memory consumption increases over time, eventually resulting in
OOM-related behavior or VS Code instability.
- Issue is reproducible and does not occur with VS Code 1.120.0.
Troubleshooting Performed:
- Deleted ~/.vscode-server and allowed server reinstallation.
- Cleared VS Code caches.
- Modified settings.json using various recommended workarounds.
- Reproduced using the same remote host and workspace.
- Verified sufficient memory availability on the remote machine.
- Verified issue is specific to Remote-SSH usage.
- Verified issue is not reproducible in VS Code 1.120.0.
Additional Information:
top output on remote machine during issue:
Mem: 40960 MiB total
Free: 21806 MiB
Available: 31099 MiB
The remote system is not under memory pressure when the issue starts.
Observed process:
PID 82202
COMMAND: MainThread
CPU: ~99.7%
RES: ~832 MB
Another MainThread process:
PID 82190
CPU: ~3.3%
RES: ~690 MB
This indicates the problem is not caused by insufficient RAM on
the remote host but appears to be a regression introduced after
VS Code 1.120.0 during Remote-SSH operation.
Regression:
VS Code 1.120.0 → No issue
VS Code > 1.120.0 → High CPU / memory growth / eventual OOM behavior
Contributor guide
Research direction
No source file or test is identified in the report. First reproduce the regression through the Remote-SSH extension on Ubuntu 20.04.6, comparing VS Code 1.120.0 with 1.127.0 while monitoring with top and ps -ef; done means the remote session remains stable without MainThread CPU or memory growth.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- devtools, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100