vscode: extra terminal processes hanging around on restart
Testing #174837
Regardless of window.experimental.sharedProcessUseUtilityProcess
, for every N
terminals in a window, and R
restarts, there are N * R
processes shown in the activity monitor.
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 28 (23 by maintainers)
Commits related to this issue
- fix #174956 — committed to microsoft/vscode by meganrogge a year ago
- `SIGKILL` terminal processes on macOS/linux (#176819) fix #174956 — committed to microsoft/vscode by meganrogge a year ago
- node-pty@0.11.0-beta31 Fixes #174956 — committed to microsoft/vscode by Tyriar a year ago
The fix has not been merged into
v1.77
, it is available in https://code.visualstudio.com/insiders/ and will be available inv1.78
I can easily reproduce this in a vanilla Ubuntu using bash. The problem is the shell integration shell traps signals and ignores SIGTERM. The SIGKILL signal works just fine. https://github.com/microsoft/vscode/issues/176549
Minimal test case to repro the leak.
@Tyriar I can investigate this today.
Thanks for confirming, the fix will be available with
v1.78
next week.Similar issue on Linux. On Ubuntu 22.04 on macOS Parallels, the shell integration scripts remain after closing code-insiders:
/usr/bin/bash --init-file /usr/share/code-insiders/resources/app/out/vs/workbench/contrib/terminal/browser/media/shellIntegration-bash.sh
. Usingps aux | grep code-insiders
, the status of those processes isSs+
(waiting for an event to complete, and is a “session leader in the foreground process group”). I’m wondering whether something might be causing the shell integration scripts to fail to complete?