Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 519585

Summary: deadlock detected in org.eclipse.jdt.launching
Product: [Eclipse Project] JDT Reporter: Kevin Tapperson <kevintap>
Component: DebugAssignee: JDT-Debug-Inbox <jdt-debug-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: sarika.sinha
Version: 4.4.2   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard: stalebug

Description Kevin Tapperson CLA 2017-07-12 17:19:32 EDT
The following deadlock can occur in org.eclipse.jdt.launching.  Multiple threads are contending for org.eclipse.jdt.internal.launching.StandardVMType and org.eclipse.jdt.internal.launching.environments.EnvironmentsManager.


Worker-22>Worker-3>Worker-4>Worker-3

Name: Worker-22
State: BLOCKED on org.eclipse.jdt.internal.launching.StandardVMType@20bff4c2 owned by: Worker-3
Total blocked: 8  Total waited: 8

Stack trace:
org.eclipse.jdt.launching.AbstractVMInstallType.findVMInstallByName(AbstractVMInstallType.java:157)
org.eclipse.jdt.internal.launching.JREContainerInitializer.resolveVM(JREContainerInitializer.java:154)
org.eclipse.jdt.internal.launching.JREContainerInitializer.initialize(JREContainerInitializer.java:97)
org.eclipse.jdt.internal.launching.LaunchingPlugin$VMChanges.rebind(LaunchingPlugin.java:365)
org.eclipse.jdt.internal.launching.LaunchingPlugin$VMChanges.access$0(LaunchingPlugin.java:299)
org.eclipse.jdt.internal.launching.LaunchingPlugin$VMChanges$1.run(LaunchingPlugin.java:285)
org.eclipse.jdt.internal.core.BatchOperation.executeOperation(BatchOperation.java:39)
org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:724)
org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2240)
org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2267)
org.eclipse.jdt.core.JavaCore.run(JavaCore.java:5521)
org.eclipse.jdt.internal.launching.LaunchingPlugin$VMChanges.doit(LaunchingPlugin.java:289)
org.eclipse.jdt.internal.launching.LaunchingPlugin$JREUpdateJob.run(LaunchingPlugin.java:386)
org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

Name: Worker-3
State: BLOCKED on org.eclipse.jdt.internal.launching.environments.EnvironmentsManager@2e83bd22 owned by: Worker-4
Total blocked: 100  Total waited: 34

Stack trace:
org.eclipse.jdt.internal.launching.environments.EnvironmentsManager.vmRemoved(EnvironmentsManager.java:394)
org.eclipse.jdt.launching.JavaRuntime.fireVMRemoved(JavaRuntime.java:2402)
org.eclipse.jdt.launching.AbstractVMInstallType.disposeVMInstall(AbstractVMInstallType.java:70)
   - locked org.eclipse.jdt.internal.launching.StandardVMType@20bff4c2
org.eclipse.jdt.internal.launching.StandardVMType.disposeVMInstall(StandardVMType.java:738)
org.eclipse.jdt.internal.launching.LaunchingPlugin.processVMPrefsChanged(LaunchingPlugin.java:699)
org.eclipse.jdt.internal.launching.LaunchingPlugin.preferenceChange(LaunchingPlugin.java:1264)
org.eclipse.core.internal.preferences.EclipsePreferences$2.run(EclipsePreferences.java:848)
org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
org.eclipse.core.internal.preferences.EclipsePreferences.firePreferenceEvent(EclipsePreferences.java:851)
org.eclipse.core.internal.preferences.EclipsePreferences.put(EclipsePreferences.java:863)
org.eclipse.jdt.launching.JavaRuntime.saveVMConfiguration(JavaRuntime.java:1456)
com.ibm.etools.portal.runtime.core.internal.WPSRuntime.getVMInstall(WPSRuntime.java:274)
com.ibm.etools.portal.runtime.core.internal.startup.AbstractWPSStartup$1.run(AbstractWPSStartup.java:128)
org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

Name: Worker-4
State: BLOCKED on org.eclipse.jdt.internal.launching.StandardVMType@20bff4c2 owned by: Worker-3
Total blocked: 70  Total waited: 35

Stack trace:
org.eclipse.jdt.internal.launching.StandardVMType.getLibraryInfo(StandardVMType.java:203)
org.eclipse.jdt.internal.launching.StandardVMType.getVMVersion(StandardVMType.java:244)
org.eclipse.jdt.internal.launching.StandardVM.getJavaVersion(StandardVM.java:56)
org.eclipse.jdt.internal.launching.environments.ExecutionEnvironmentAnalyzer.analyze(ExecutionEnvironmentAnalyzer.java:95)
org.eclipse.jdt.internal.launching.environments.Analyzer.analyze(Analyzer.java:41)
org.eclipse.jdt.internal.launching.environments.EnvironmentsManager.analyze(EnvironmentsManager.java:344)
org.eclipse.jdt.internal.launching.environments.EnvironmentsManager.vmAdded(EnvironmentsManager.java:386)
   - locked org.eclipse.jdt.internal.launching.environments.EnvironmentsManager@2e83bd22
org.eclipse.jdt.internal.launching.environments.EnvironmentsManager.vmChanged(EnvironmentsManager.java:374)
   - locked org.eclipse.jdt.internal.launching.environments.EnvironmentsManager@2e83bd22
org.eclipse.jdt.launching.JavaRuntime.fireVMChanged(JavaRuntime.java:2376)
org.eclipse.jdt.launching.AbstractVMInstall.setInstallLocation(AbstractVMInstall.java:148)
org.eclipse.jdt.launching.VMStandin.convertToRealVM(VMStandin.java:131)
org.eclipse.jdt.internal.launching.LaunchingPlugin.processVMPrefsChanged(LaunchingPlugin.java:707)
org.eclipse.jdt.internal.launching.LaunchingPlugin.preferenceChange(LaunchingPlugin.java:1264)
org.eclipse.core.internal.preferences.EclipsePreferences$2.run(EclipsePreferences.java:848)
org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
org.eclipse.core.internal.preferences.EclipsePreferences.firePreferenceEvent(EclipsePreferences.java:851)
org.eclipse.core.internal.preferences.EclipsePreferences.put(EclipsePreferences.java:863)
org.eclipse.jdt.launching.JavaRuntime.saveVMConfiguration(JavaRuntime.java:1456)
com.ibm.ws.ast.st.core.internal.runtime.WASRuntime.updateVM(WASRuntime.java:307)
com.ibm.ws.ast.st.core.internal.WebSphereCorePlugin$1AddRuntimeLifecycleListenerJob$1.runtimeChanged(WebSphereCorePlugin.java:595)
org.eclipse.wst.server.core.internal.ResourceManager.fireRuntimeEvent(ResourceManager.java:525)
org.eclipse.wst.server.core.internal.ResourceManager.addRuntime(ResourceManager.java:686)
org.eclipse.wst.server.core.internal.Runtime.saveToMetadata(Runtime.java:131)
org.eclipse.wst.server.core.internal.RuntimeWorkingCopy.save(RuntimeWorkingCopy.java:181)
com.ibm.etools.portal.runtime.core.internal.startup.AbstractWPSStartup$1.run(AbstractWPSStartup.java:122)
org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Comment 1 Sarika Sinha CLA 2017-07-13 01:16:03 EDT
Do you have some reproducible scenario so that we can work on it?
Comment 2 Sarika Sinha CLA 2017-07-14 05:38:08 EDT
As I don't have the scenario, going through the code it is a possibility that org.eclipse.jdt.internal.launching.LaunchingPlugin.restoreLibraryInfo() is causing  a locked state.
Comment 3 Eclipse Genie CLA 2020-03-14 19:24:21 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.