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

orphan vscode extension processes left running #704

Closed
tigerinus opened this issue Nov 10, 2021 · 3 comments
Closed

orphan vscode extension processes left running #704

tigerinus opened this issue Nov 10, 2021 · 3 comments
Labels
for: vscode something that is specific for VSCode status: needs-investigation type: bug

Comments

@tigerinus
Copy link

tigerinus commented Nov 10, 2021

Describe the bug
I use remote SSH for Spring/Java development. Overtime there are more than 1 orphan processes left running, even vscode has exited.

To Reproduce
Setup remote SSH development in VSCode. Do regular code development work for few days without restarting the server.

Sample

opc      2985806  0.0  0.7 9836608 171648 ?      Sl   Nov01   3:57 /home/opc/.local/graalvm-ce-java17-21.3.0/bin/java -cp /home/opc/.vscode-server/extensions/pivotal.vscode-spring-boot-1.28.0/language-server/BOOT-INF/classes:/home/opc/.
opc      3019867  0.0  1.0 9836992 236800 ?      Sl   Nov01   3:41 /home/opc/.local/graalvm-ce-java17-21.3.0/bin/java -cp /home/opc/.vscode-server/extensions/pivotal.vscode-spring-boot-1.28.0/language-server/BOOT-INF/classes:/home/opc/.
opc      3230030  0.0  0.3 9831296 72704 ?       Sl   Nov03   3:03 /home/opc/.local/graalvm-ce-java17-21.3.0/bin/java -cp /home/opc/.vscode-server/extensions/pivotal.vscode-spring-boot-1.28.0/language-server/BOOT-INF/classes:/home/opc/.
opc      3261228  0.0  1.2 9835776 287424 ?      Sl   Nov03   3:31 /home/opc/.local/graalvm-ce-java17-21.3.0/bin/java -cp /home/opc/.vscode-server/extensions/pivotal.vscode-spring-boot-1.28.0/language-server/BOOT-INF/classes:/home/opc/.
opc      3607826  0.0  0.9 9838208 232704 ?      Sl   Nov05   2:09 /home/opc/.local/graalvm-ce-java17-21.3.0/bin/java -cp /home/opc/.vscode-server/extensions/pivotal.vscode-spring-boot-1.28.0/language-server/BOOT-INF/classes:/home/opc/.
opc      3620371  0.0  1.6 9833472 390528 ?      Sl   Nov05   2:04 /home/opc/.local/graalvm-ce-java17-21.3.0/bin/java -cp /home/opc/.vscode-server/extensions/pivotal.vscode-spring-boot-1.28.0/language-server/BOOT-INF/classes:/home/opc/.
opc      4029171  0.0  0.1 9687936 24192 ?       Sl   Nov09   0:49 /home/opc/.local/graalvm-ce-java17-21.3.0/bin/java -cp /home/opc/.vscode-server/extensions/pivotal.vscode-spring-boot-1.28.0/language-server/BOOT-INF/classes:/home/opc/.
opc      4117547  0.0  0.1 9473152 42816 ?       Sl   Nov09   0:28 /home/opc/.local/graalvm-ce-java17-21.3.0/bin/java -cp /home/opc/.vscode-server/extensions/pivotal.vscode-spring-boot-1.28.0/language-server/BOOT-INF/classes:/home/opc/.
opc      4122489  0.0  0.4 9608320 104256 ?      Sl   Nov09   0:27 /home/opc/.local/graalvm-ce-java17-21.3.0/bin/java -cp /home/opc/.vscode-server/extensions/pivotal.vscode-spring-boot-1.28.0/language-server/BOOT-INF/classes:/home/opc/.
opc      4139846  0.0  0.4 9405568 111552 ?      Sl   Nov09   0:27 /home/opc/.local/graalvm-ce-java17-21.3.0/bin/java -cp /home/opc/.vscode-server/extensions/pivotal.vscode-spring-boot-1.28.0/language-server/BOOT-INF/classes:/home/opc/.
opc         9136  0.1  1.5 9774208 378368 ?      Sl   14:03   0:52 /home/opc/.local/graalvm-ce-java17-21.3.0/bin/java -cp /home/opc/.vscode-server/extensions/pivotal.vscode-spring-boot-1.28.0/language-server/BOOT-INF/classes:/home/opc/.
@martinlippert
Copy link
Member

Maybe this is related? #741

@tigerinus
Copy link
Author

It's related but a different level of issue.

This is one is about that there should not be any orphans process at all after exiting vscode. The processes should automatically go away eventually.

Issue #741 is about one or more orphan process cannot be easily terminated when trying to do so manually.

@BoykoAlex
Copy link
Contributor

Fixed with a588354. See #741 comments.
When VSCode shuts down, extensions are deactivated. Deactivation of an extension has at most 5 (or perhaps less) sec to deactivate. It appears that this time isn't enough for vscode-languageclient to send a shutdown request to the language server process (see microsoft/vscode-languageserver-node#905). Redhat Java extension and XML extensions for VSCode faced exactly the same issue and implemented "parent process watcher" to shut down language server process if its parent shell process goes down after 30 sec timeout. The same has been implemented for Spring language servers (i.e. all Spring VSCode extensions)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for: vscode something that is specific for VSCode status: needs-investigation type: bug
Projects
None yet
Development

No branches or pull requests

3 participants