You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
extra terminal processes hanging around on restart #174956
bugIssue identified by VS Code Team member as probable bugconfirmedIssue has been confirmed by VS Code Team memberfreeze-slow-crash-leakVS Code crashing, performance, freeze and memory leak issuesinsiders-releasedPatch has been released in VS Code InsidersmacosIssues with VS Code on MAC/OS Xterminal-persistenceRelating to process reconnection or process reviveterminal-processProblems launching processes, managing ptys, exiting, process leaks, etc.terminal-shell-integrationShell integration infrastructure, command decorations, etc.upstreamIssue identified as 'upstream' component related (exists outside of VS Code)verifiedVerification succeeded
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.
Are the processes really still running or some zombie processes simply not cleaned up? I remember having seen that on Linux from time to time, but not on macOS.
Also, does this reproduce when you reload the window instead of restart?
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.
Using ps aux | grep code-insiders, the status of those processes is Ss+ (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?
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. Using ps aux | grep code-insiders, the status of those processes is Ss+ (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?
On Gnome, this also causes a massive lag during the shutdown. Stale shellIntegration-bash.sh, also ignores SIGTERM sent during the shutdown, which waits for two minutes and finally sends SIGKILL. Hopefully, 1.78 will fix this as well.
Per #180894 :
On MacOS the processes are properly killed when explicitly closing the workspace window, but remain running if you simply quit VSCode without closing the window.
This behavior is the same even with terminal.integrated.enablePersistentSessions set to false. It is the same in all three modes of terminal.integrated.persistentSessionReviveProcess.
Megan Rogge (@meganrogge)
Quitting via Cmd-Q. But the same happens when quitting via the dock.
Cmd-Shift-W to close the window terminates all running shells.
bugIssue identified by VS Code Team member as probable bugconfirmedIssue has been confirmed by VS Code Team memberfreeze-slow-crash-leakVS Code crashing, performance, freeze and memory leak issuesinsiders-releasedPatch has been released in VS Code InsidersmacosIssues with VS Code on MAC/OS Xterminal-persistenceRelating to process reconnection or process reviveterminal-processProblems launching processes, managing ptys, exiting, process leaks, etc.terminal-shell-integrationShell integration infrastructure, command decorations, etc.upstreamIssue identified as 'upstream' component related (exists outside of VS Code)verifiedVerification succeeded
Activity
meganrogge commentedon Feb 21, 2023
quit and reopened again and now there are 6
meganrogge commentedon Feb 21, 2023
other info:
meganrogge commentedon Feb 21, 2023
I don't have to even type in/ interact with the terminal for this to happen
bpasero commentedon Feb 21, 2023
Are the processes really still running or some zombie processes simply not cleaned up? I remember having seen that on Linux from time to time, but not on macOS.
Also, does this reproduce when you reload the window instead of restart?
meganrogge commentedon Feb 21, 2023
They're not listed as zombie processes, so I believe they're still running. Reloading neither creates nor destroys processes
meganrogge commentedon Feb 21, 2023
I have to select
Force Quitto kill themrzhao271 commentedon Feb 21, 2023
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.Using
ps 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?
meganrogge commentedon Feb 22, 2023
interesting finding Raymond Zhao (@rzhao271) . just confirmed this doesn't reproduce when I disable shell integration
30 remaining items
rsodre commentedon Apr 3, 2023
The issue doesn't seem to be resolved in version 1.77, as stated in #176819
deepak1556 commentedon Apr 3, 2023
The fix has not been merged into
v1.77, it is available in https://code.visualstudio.com/insiders/ and will be available inv1.78Varun-garg commentedon Apr 22, 2023
On Gnome, this also causes a massive lag during the shutdown. Stale
shellIntegration-bash.sh, also ignores SIGTERM sent during the shutdown, which waits for two minutes and finally sends SIGKILL. Hopefully, 1.78 will fix this as well.joshstrike commentedon Apr 27, 2023
Per #180894 :
On MacOS the processes are properly killed when explicitly closing the workspace window, but remain running if you simply quit VSCode without closing the window.
This behavior is the same even with
terminal.integrated.enablePersistentSessionsset to false. It is the same in all three modes ofterminal.integrated.persistentSessionReviveProcess.meganrogge commentedon Apr 27, 2023
Josh Strike (@joshstrike) thanks for that info. by "quit VS code" I assume you mean via the mac dock?
joshstrike commentedon Apr 27, 2023
Megan Rogge (@meganrogge)
Quitting via Cmd-Q. But the same happens when quitting via the dock.
Cmd-Shift-W to close the window terminates all running shells.
deepak1556 commentedon Apr 27, 2023
Josh Strike (@joshstrike) does the issue repro on insiders as well https://code.visualstudio.com/insiders ?
joshstrike commentedon Apr 28, 2023
Robo (@deepak1556) Issue does not repro on insiders. Insiders version fixes the issue, all terminals / processes correctly exit upon Cmd-Q quit.
deepak1556 commentedon Apr 28, 2023
Thanks for confirming, the fix will be available with
v1.78next week.