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
language server processes doesn't get shutdown properly in VSCode #636
Describe the bug
Dave observed a number of zombie language server processes, probably after using VSCode. The thread dumps of the VSCode processes look okay, nothing serious in there, but the shutdown process must have gone wrong somewhere.
To Reproduce
We need to investigate this, use VSCode for a while and see if language server processes are shutdown properly or not.
Happens to me on MacOS 11.3.1 and VSCode 1.56.2. I start my VSCode using this command: code --user-data-dir ~/.vscode_MyApp/user-data --extensions-dir ~/.vscode_MyApp/exts MyApp.code-workspace
I enabled logging through the properties file: ~/.vscode_MyApp/exts/pivotal.vscode-spring-boot-1.25.1/language-server/BOOT-INF/classes/application.properties
I removed the # from these lines and restarted VSCode. #logging.level.org.springframework.ide.vscode.commons.languageserver.util.SimpleLanguageServer=debug #logging.level.org.springframework.ide.vscode.boot.java.utils.SpringIndexerJava=debug #logging.level.org.springframework.ide.vscode.boot.app.SpringSymbolIndex=debug #logging.level.org.springframework.ide.vscode.commons.boot.app.cli.SpringBootApp=off
Those log levels are for the Spring Boot language server itself, but the exthost.log output seems to be from VSCode directly, not the Spring Boot language server.
I found, that there is a logs folder in ~/.vscode_MyApp/user-data/. After enabling the Spring Boot logging through the application.properties file I realized, that some log entries ended up in the exthost.log file located in ~/.vscode_MyApp/user-data/logs/yyyyMMddTHHmmss/exthost1 folder.
I am sure there are still a few cases in which the process is not stopped accordingly. If you still observe dangling BootLanguageServerApp processes, it would be great if you could share some details how you got to that point, so that I can follow the steps precisely to reproduce this.
Seems to be working now. I'm not sure if it is a problem, but with this new version there is no org.springframework.ide.vscode.boot.app.BootLanguagServerBootApp in my ps ax list while VSCode is running. Plugin seems to work as intended.
Activity
andriassundskard commentedon May 14, 2021
Happens to me on MacOS 11.3.1 and VSCode 1.56.2. I start my VSCode using this command:
code --user-data-dir ~/.vscode_MyApp/user-data --extensions-dir ~/.vscode_MyApp/exts MyApp.code-workspaceMyApp.code-workspace
{"folders":[{"path":"."}],"settings":{"[yaml]":{"editor.insertSpaces":true,"editor.detectIndentation":false,"editor.tabSize":2,"editor.autoIndent":"advanced","editor.quickSuggestions":{"other":true,"comments":false,"strings":true}},"[java],[xml]":{"editor.suggest.snippetsPreventQuickSuggestions":false,"editor.tabSize":4,"editor.insertSpaces":false,"editor.detectIndentation":false},"java.configuration.updateBuildConfiguration":"automatic","java.completion.enabled":true,"java.format.enabled":true,"java.format.settings.profile":"GoogleStyle","java.format.settings.url":"/eclipse-java-google-style.xml","java.autobuild.enabled":true,"java.saveActions.organizeImports":true,"gradle.autoDetect":"on","editor.autoIndent":"full","spring.initializr.defaultLanguage":"Java","files.exclude":{"**/.classpath":true,"**/.project":true,"**/.settings":true,"**/.factorypath":true,"**/.gradle":true},"java.dependency.packagePresentation":"flat"},"extensions":{"recommendations":["vscjava.vscode-java-pack","GabrielBB.vscode-lombok","richardwillis.vscode-gradle","alphabotsec.vscode-eclipse-keybindings","vscjava.vscode-spring-initializr","Pivotal.vscode-spring-boot","vscjava.vscode-spring-boot-dashboard","ms-azuretools.vscode-docker","adamhartford.vscode-base64","redhat.vscode-xml"]},"launch":{"configurations":[{"type":"java","name":"Launch MyApp","request":"launch","mainClass":"com.example.MyApp","projectName":"MyApp"}],"compounds":[]}}Running
ps ax | grep java | grep language-serverafter closing VSCode gives this:andriassundskard commentedon May 17, 2021
exthost.log
I managed to get some kind of debug log out of the system. Hopefully it is of some help!
martinlippert commentedon May 18, 2021
@andriassundskard Thanks for the additional details, much appreciated. How did you get these debug log output?
andriassundskard commentedon May 19, 2021
I enabled logging through the properties file:
~/.vscode_MyApp/exts/pivotal.vscode-spring-boot-1.25.1/language-server/BOOT-INF/classes/application.propertiesI removed the # from these lines and restarted VSCode.
#logging.level.org.springframework.ide.vscode.commons.languageserver.util.SimpleLanguageServer=debug #logging.level.org.springframework.ide.vscode.boot.java.utils.SpringIndexerJava=debug #logging.level.org.springframework.ide.vscode.boot.app.SpringSymbolIndex=debug #logging.level.org.springframework.ide.vscode.commons.boot.app.cli.SpringBootApp=offmartinlippert commentedon May 19, 2021
Those log levels are for the Spring Boot language server itself, but the
exthost.logoutput seems to be from VSCode directly, not the Spring Boot language server.andriassundskard commentedon May 19, 2021
I found, that there is a
logsfolder in~/.vscode_MyApp/user-data/. After enabling the Spring Boot logging through theapplication.propertiesfile I realized, that some log entries ended up in theexthost.logfile located in~/.vscode_MyApp/user-data/logs/yyyyMMddTHHmmss/exthost1folder.Artur- commentedon May 21, 2021
I guess this is also what I see on Big Sur
zlargon commentedon May 21, 2021
I also see this on my mac.
Mac: macOS Catalina 10.15.7
VSCode: 1.56.2 (Universal)
martinlippert commentedon May 25, 2021
I think I can reproduce this on my local machine, seems a more general issue here. Will investigate further.
martinlippert commentedon May 26, 2021
I implemented some improvements here, so feel free to manually install the latest CI build as VSIX file from here: http://dist.springsource.com/snapshot/STS4/nightly-distributions.html - and let me know if this is better now.
I am sure there are still a few cases in which the process is not stopped accordingly. If you still observe dangling BootLanguageServerApp processes, it would be great if you could share some details how you got to that point, so that I can follow the steps precisely to reproduce this.
andriassundskard commentedon May 27, 2021
Seems to be working now. I'm not sure if it is a problem, but with this new version there is no
org.springframework.ide.vscode.boot.app.BootLanguagServerBootAppin myps axlist while VSCode is running. Plugin seems to work as intended.martinlippert commentedon May 27, 2021
@andriassundskard The name has changed, we fixed the typo, it is now
BootLanguageServerBootAppandriassundskard commentedon May 27, 2021
Ok.
ps ax | grep BootLanguageServerBootAppis also empty, so it seems that your solution works!martinlippert commentedon May 27, 2021
@andriassundskard great to hear that and thanks for checking it out. Much appreciated. Closing this now.