vscode-pde
vscode-pde copied to clipboard
Bundles contributed to JDT-LS runtime fail to stop gracefully
I open a project like eclipse.jdt.ls or even something like lemminx which is unrelated (no javaConfig.json). Everything works fine, but on shutdown, I notice that the JDT-LS standard client doesn't shutdown immediately. That's odd. On a "simpler" project I tried and none of this seems to happen (shuts off immediately). So now it's just time for the parent process watcher to trigger and handle the cleanup. When it does, I see the following in the logs.
stacktrace
!ENTRY org.eclipse.jdt.ls.core 1 0 2022-05-26 15:28:47.388
!MESSAGE Parent process stopped running, forcing server exit
!ENTRY org.eclipse.jdt.ls.core 1 0 2022-05-26 15:28:47.389
!MESSAGE Shutdown received... waking up main thread
!ENTRY org.eclipse.jdt.ls.core 1 0 2022-05-26 15:28:47.399
!MESSAGE class org.eclipse.jdt.ls.core.internal.JavaLanguageServerPlugin is stopping:
!ENTRY org.eclipse.core.resources 2 10035 2022-05-26 15:28:48.009
!MESSAGE The workspace will exit with unsaved changes in this session.
!ENTRY org.eclipse.pde.core 4 0 2022-05-26 15:28:48.058
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Exception in org.eclipse.pde.internal.core.PDECore.stop() of bundle org.eclipse.pde.core.
at org.eclipse.osgi.internal.framework.BundleContextImpl.stop(BundleContextImpl.java:895)
at org.eclipse.osgi.internal.framework.EquinoxBundle.stopWorker0(EquinoxBundle.java:1046)
at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.stopWorker(EquinoxBundle.java:376)
at org.eclipse.osgi.container.Module.doStop(Module.java:660)
at org.eclipse.osgi.container.Module.stop(Module.java:521)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.decStartLevel(ModuleContainer.java:1888)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1763)
at org.eclipse.osgi.container.SystemModule.stopWorker(SystemModule.java:275)
at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule.stopWorker(EquinoxBundle.java:208)
at org.eclipse.osgi.container.Module.doStop(Module.java:660)
at org.eclipse.osgi.container.Module.stop(Module.java:521)
at org.eclipse.osgi.container.SystemModule.stop(SystemModule.java:207)
at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule$1.run(EquinoxBundle.java:226)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: org.eclipse.core.runtime.AssertionFailedException: assertion failed: The application has not been initialized.
at org.eclipse.core.runtime.Assert.isTrue(Assert.java:113)
at org.eclipse.core.internal.runtime.InternalPlatform.assertInitialized(InternalPlatform.java:139)
at org.eclipse.core.internal.runtime.InternalPlatform.getStateLocation(InternalPlatform.java:472)
at org.eclipse.core.runtime.Plugin.getStateLocation(Plugin.java:259)
at org.eclipse.pde.internal.core.JavaElementChangeListener.getDirectory(JavaElementChangeListener.java:164)
at org.eclipse.pde.internal.core.JavaElementChangeListener.save(JavaElementChangeListener.java:155)
at org.eclipse.pde.internal.core.JavaElementChangeListener.shutdown(JavaElementChangeListener.java:57)
at org.eclipse.pde.internal.core.PDECore.stop(PDECore.java:358)
at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:875)
at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1)
at java.base/java.security.AccessController.doPrivileged(Unknown Source)
at org.eclipse.osgi.internal.framework.BundleContextImpl.stop(BundleContextImpl.java:867)
... 13 more
Root exception:
org.eclipse.core.runtime.AssertionFailedException: assertion failed: The application has not been initialized.
at org.eclipse.core.runtime.Assert.isTrue(Assert.java:113)
at org.eclipse.core.internal.runtime.InternalPlatform.assertInitialized(InternalPlatform.java:139)
at org.eclipse.core.internal.runtime.InternalPlatform.getStateLocation(InternalPlatform.java:472)
at org.eclipse.core.runtime.Plugin.getStateLocation(Plugin.java:259)
at org.eclipse.pde.internal.core.JavaElementChangeListener.getDirectory(JavaElementChangeListener.java:164)
at org.eclipse.pde.internal.core.JavaElementChangeListener.save(JavaElementChangeListener.java:155)
at org.eclipse.pde.internal.core.JavaElementChangeListener.shutdown(JavaElementChangeListener.java:57)
at org.eclipse.pde.internal.core.PDECore.stop(PDECore.java:358)
at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:875)
at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1)
at java.base/java.security.AccessController.doPrivileged(Unknown Source)
at org.eclipse.osgi.internal.framework.BundleContextImpl.stop(BundleContextImpl.java:867)
at org.eclipse.osgi.internal.framework.EquinoxBundle.stopWorker0(EquinoxBundle.java:1046)
at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.stopWorker(EquinoxBundle.java:376)
at org.eclipse.osgi.container.Module.doStop(Module.java:660)
at org.eclipse.osgi.container.Module.stop(Module.java:521)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.decStartLevel(ModuleContainer.java:1888)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1763)
at org.eclipse.osgi.container.SystemModule.stopWorker(SystemModule.java:275)
at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule.stopWorker(EquinoxBundle.java:208)
at org.eclipse.osgi.container.Module.doStop(Module.java:660)
at org.eclipse.osgi.container.Module.stop(Module.java:521)
at org.eclipse.osgi.container.SystemModule.stop(SystemModule.java:207)
at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule$1.run(EquinoxBundle.java:226)
at java.base/java.lang.Thread.run(Unknown Source)
!ENTRY org.eclipse.team.core 4 0 2022-05-26 15:28:48.059
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Exception in org.eclipse.team.internal.core.TeamPlugin.stop() of bundle org.eclipse.team.core.
at org.eclipse.osgi.internal.framework.BundleContextImpl.stop(BundleContextImpl.java:895)
at org.eclipse.osgi.internal.framework.EquinoxBundle.stopWorker0(EquinoxBundle.java:1046)
at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.stopWorker(EquinoxBundle.java:376)
at org.eclipse.osgi.container.Module.doStop(Module.java:660)
at org.eclipse.osgi.container.Module.stop(Module.java:521)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.decStartLevel(ModuleContainer.java:1888)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1763)
at org.eclipse.osgi.container.SystemModule.stopWorker(SystemModule.java:275)
at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule.stopWorker(EquinoxBundle.java:208)
at org.eclipse.osgi.container.Module.doStop(Module.java:660)
at org.eclipse.osgi.container.Module.stop(Module.java:521)
at org.eclipse.osgi.container.SystemModule.stop(SystemModule.java:207)
at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule$1.run(EquinoxBundle.java:226)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: org.eclipse.core.runtime.AssertionFailedException: assertion failed: The application has not been initialized.
at org.eclipse.core.runtime.Assert.isTrue(Assert.java:113)
at org.eclipse.core.internal.runtime.InternalPlatform.assertInitialized(InternalPlatform.java:139)
at org.eclipse.core.internal.runtime.InternalPlatform.getInstanceLocation(InternalPlatform.java:334)
at org.eclipse.core.runtime.Plugin.savePluginPreferences(Plugin.java:341)
at org.eclipse.team.core.Team.shutdown(Team.java:477)
at org.eclipse.team.internal.core.TeamPlugin.stop(TeamPlugin.java:120)
at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:875)
at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1)
at java.base/java.security.AccessController.doPrivileged(Unknown Source)
at org.eclipse.osgi.internal.framework.BundleContextImpl.stop(BundleContextImpl.java:867)
... 13 more
Root exception:
org.eclipse.core.runtime.AssertionFailedException: assertion failed: The application has not been initialized.
at org.eclipse.core.runtime.Assert.isTrue(Assert.java:113)
at org.eclipse.core.internal.runtime.InternalPlatform.assertInitialized(InternalPlatform.java:139)
at org.eclipse.core.internal.runtime.InternalPlatform.getInstanceLocation(InternalPlatform.java:334)
at org.eclipse.core.runtime.Plugin.savePluginPreferences(Plugin.java:341)
at org.eclipse.team.core.Team.shutdown(Team.java:477)
at org.eclipse.team.internal.core.TeamPlugin.stop(TeamPlugin.java:120)
at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:875)
at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1)
at java.base/java.security.AccessController.doPrivileged(Unknown Source)
at org.eclipse.osgi.internal.framework.BundleContextImpl.stop(BundleContextImpl.java:867)
at org.eclipse.osgi.internal.framework.EquinoxBundle.stopWorker0(EquinoxBundle.java:1046)
at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.stopWorker(EquinoxBundle.java:376)
at org.eclipse.osgi.container.Module.doStop(Module.java:660)
at org.eclipse.osgi.container.Module.stop(Module.java:521)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.decStartLevel(ModuleContainer.java:1888)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1763)
at org.eclipse.osgi.container.SystemModule.stopWorker(SystemModule.java:275)
at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule.stopWorker(EquinoxBundle.java:208)
at org.eclipse.osgi.container.Module.doStop(Module.java:660)
at org.eclipse.osgi.container.Module.stop(Module.java:521)
at org.eclipse.osgi.container.SystemModule.stop(SystemModule.java:207)
at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule$1.run(EquinoxBundle.java:226)
at java.base/java.lang.Thread.run(Unknown Source)
I can try to reproduce this after we solve https://github.com/redhat-developer/vscode-java/issues/2471 . It could be a symptom of the language server not shutting down immediately.
The stacktrace from above still happens on shutdown. Only this time it is preceded by a proper shutdown.
!ENTRY org.eclipse.jdt.ls.core 1 0 2022-05-27 16:27:23.059
!MESSAGE >> shutdown
!ENTRY org.eclipse.jdt.ls.core 1 0 2022-05-27 16:27:24.061
!MESSAGE >> exit
!ENTRY org.eclipse.jdt.ls.core 1 0 2022-05-27 16:27:24.062
!MESSAGE Shutdown received... waking up main thread
I tried eclipse.jdt.ls project with vscode-pde and the latest vscode-java pre-release version v1.7.2022052804
, closing VS Code window and I only see a shutdown message in .log. No exit message and other exceptions.
!ENTRY org.eclipse.jdt.ls.core 1 0 2022-05-29 21:38:54.013
!MESSAGE >> shutdown