Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server processes not cleaned up on exit #1244

Closed
radu-matei opened this issue Aug 25, 2019 · 5 comments
Closed

Server processes not cleaned up on exit #1244

radu-matei opened this issue Aug 25, 2019 · 5 comments

Comments

@radu-matei
Copy link

@radu-matei radu-matei commented Aug 25, 2019

#203, #699, and #726 all reported some instance of the server processes not being terminated on exit, and have all been closed.

However, I still see the same behaviour on 1.38 Insiders with WSL2 - after closing all VS Code windows, the server processes are not cleaned up, and I constantly have to pkill any VS Code process from my Linux environment.

Version: 1.38.0-insider (user setup)
Commit: 0f73473c08055054f317c1c94502f7f39fdbb164
Date: 2019-08-23T05:39:22.818Z
Electron: 4.2.9
Chrome: 69.0.3497.128
Node.js: 10.11.0
V8: 6.9.427.31-electron.0
OS: Windows_NT x64 10.0.18965

ps ax
  PID TTY      STAT   TIME COMMAND
    1 ?        Sl     0:00 /init
    9 ?        Ss     0:00 /init
   11 pts/0    Ss+    0:01 zsh
  390 ?        S      0:00 /init
  391 pts/1    Ss+    0:00 sh -c "$(wslpath -u 'c:/Users/root/.vscode-insiders/extensions/ms-vscode-remote.remote-wsl-0.
  393 pts/1    S+     0:00 sh /mnt/c/Users/root/.vscode-insiders/extensions/ms-vscode-remote.remote-wsl-0.39.3/scripts/w
  412 pts/1    S+     0:00 sh /home/radu/.vscode-server-insiders/bin/0f73473c08055054f317c1c94502f7f39fdbb164/server.sh
  414 pts/1    Sl+    0:01 /home/radu/.vscode-server-insiders/bin/0f73473c08055054f317c1c94502f7f39fdbb164/node /home/ra
 1274 pts/2    R+     0:00 ps ax

Edit: there seems to be a behaviour related to #203 (comment) - some instances are closed after a while, but this doesn't seem to be consistent.
It would be really nice if this was configurable (if it is indeed an intended behaviour).

Also, thanks for the work here, this enabled the best developer experience I've had on Windows, by far!

@aeschli

This comment has been minimized.

Copy link

@aeschli aeschli commented Aug 26, 2019

There's a timeout of 5 minutes until the server shuts down.

@davidwin

This comment has been minimized.

Copy link

@davidwin davidwin commented Sep 30, 2019

There's a timeout of 5 minutes until the server shuts down.

I can't see that the timeout is working on 1.38.1 stable, Remote WSL 0.39.5 on WSL 1 (Windows 10 1709). Node processes are left running indefinitely.

@aeschli aeschli added this to the November 2019 milestone Oct 29, 2019
@aeschli

This comment has been minimized.

Copy link

@aeschli aeschli commented Oct 29, 2019

I want to go away from the timeout and actively kill the servers when the last window is closed. We already do that for WSL1 but it should also be possible for WSL2.

@aeschli

This comment has been minimized.

Copy link

@aeschli aeschli commented Nov 26, 2019

Fixed in Remote-WSL 0.41.0 (requires VSCode Insiders 1.41)

@aeschli aeschli closed this Nov 26, 2019
@aeschli

This comment has been minimized.

Copy link

@aeschli aeschli commented Dec 3, 2019

Verify on WSL2:

  • have pne or more remote winding into a WSL distro
  • on the command line use ps -ax to see the vscode server running
  • close the last window
  • use ps -ax to see that the vscode server is terminated after 3 seconds.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.