Skip to content

extra terminal processes hanging around on restart #174956

Description

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.

processes.mov

Activity

  1. meganrogge commented on Feb 21, 2023

    @meganrogge
    CollaboratorAuthor

    quit and reopened again and now there are 6

    Screenshot 2023-02-21 at 11 24 51 AM

  2. added
    bug
    terminal-persistence
    terminal-process
    on Feb 21, 2023
  3. meganrogge commented on Feb 21, 2023

    @meganrogge
    CollaboratorAuthor

    other info:

    Screenshot 2023-02-21 at 11 29 41 AM

  4. meganrogge commented on Feb 21, 2023

    @meganrogge
    CollaboratorAuthor

    I don't have to even type in/ interact with the terminal for this to happen

  5. bpasero commented on Feb 21, 2023

    @bpasero
    Contributor

    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?

  6. added
    freeze-slow-crash-leak
    on Feb 21, 2023
  7. meganrogge commented on Feb 21, 2023

    @meganrogge
    CollaboratorAuthor

    They're not listed as zombie processes, so I believe they're still running. Reloading neither creates nor destroys processes

    Screenshot 2023-02-21 at 2 09 58 PM

  8. meganrogge commented on Feb 21, 2023

    @meganrogge
    CollaboratorAuthor

    I have to select Force Quit to kill them

  9. rzhao271 commented on Feb 21, 2023

    @rzhao271
    Collaborator

    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?

  10. meganrogge commented on Feb 22, 2023

    @meganrogge
    CollaboratorAuthor

    interesting finding Raymond Zhao (@rzhao271) . just confirmed this doesn't reproduce when I disable shell integration

  11. 30 remaining items

  12. added
    unreleased
    insiders-released
    and removed
    unreleased
    on Mar 27, 2023
  13. rsodre commented on Apr 3, 2023

    @rsodre

    The issue doesn't seem to be resolved in version 1.77, as stated in #176819

  14. deepak1556 commented on Apr 3, 2023

    @deepak1556
    Collaborator

    The fix has not been merged into v1.77, it is available in https://code.visualstudio.com/insiders/ and will be available in v1.78

  15. Varun-garg commented on Apr 22, 2023

    @Varun-garg

    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.

  16. joshstrike commented on Apr 27, 2023

    @joshstrike

    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.

  17. meganrogge commented on Apr 27, 2023

    @meganrogge
    CollaboratorAuthor

    Josh Strike (@joshstrike) thanks for that info. by "quit VS code" I assume you mean via the mac dock?

    Screenshot 2023-04-27 at 1 37 09 PM

  18. joshstrike commented on Apr 27, 2023

    @joshstrike

    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.

  19. joshstrike commented on Apr 28, 2023

    @joshstrike

    Robo (@deepak1556) Issue does not repro on insiders. Insiders version fixes the issue, all terminals / processes correctly exit upon Cmd-Q quit.

  20. deepak1556 commented on Apr 28, 2023

    @deepak1556
    Collaborator

    Thanks for confirming, the fix will be available with v1.78 next week.

  21. locked and limited conversation to collaborators on May 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugconfirmedfreeze-slow-crash-leakinsiders-releasedmacosterminal-persistenceterminal-processterminal-shell-integrationupstreamverified

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions