Project: Eclipse_Platform_UI
Bug 118414 [WorkingSets] Deadlock on each startup caused by AbstractWorkingSetManager
Reported: 2005-11-29 09:06:14 | Status: verified fixed

I20051129-0800 I always get a deadlock caused by AbstractWorkingSetManager when starting an existing workspace: Full thread dump Java HotSpot(TM) Client VM (1.5.0_05-b03 mixed mode): "Java indexing" daemon prio=4 tid=0x02e3f338 nid=0x28c in Object.wait() [0x0492f000..0x0492fb68] at java.lang.Object.wait(Native Method) - waiting on <0x12dd1b00> (a org.eclipse.jdt.internal.core.search.indexing.IndexManager) at java.lang.Object.wait(Object.java:474) at org.eclipse.jdt.internal.core.search.processing.JobManager.run(JobManager.java:349) - locked <0x12dd1b00> (a org.eclipse.jdt.internal.core.search.indexing.IndexManager) at java.lang.Thread.run(Thread.java:595) "Worker-3" daemon prio=5 tid=0x03907ca0 nid=0x948 in Object.wait() [0x03d8f000..0x03d8fbe8] at java.lang.Object.wait(Native Method) - waiting on <0x11b4ff60> (a org.eclipse.core.internal.jobs.WorkerPool) at org.eclipse.core.internal.jobs.WorkerPool.sleep(WorkerPool.java:173) - locked <0x11b4ff60> (a org.eclipse.core.internal.jobs.WorkerPool) at org.eclipse.core.internal.jobs.WorkerPool.startJob(WorkerPool.java:205) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:51) "Worker-2" daemon prio=5 tid=0x0377d0a8 nid=0x11e0 in Object.wait() [0x03d4f000..0x03d4fc68] at java.lang.Object.wait(Native Method) - waiting on <0x11b4ff60> (a org.eclipse.core.internal.jobs.WorkerPool) at org.eclipse.core.internal.jobs.WorkerPool.sleep(WorkerPool.java:173) - locked <0x11b4ff60> (a org.eclipse.core.internal.jobs.WorkerPool) at org.eclipse.core.internal.jobs.WorkerPool.startJob(WorkerPool.java:205) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:51) "Worker-1" daemon prio=5 tid=0x0371f570 nid=0x988 in Object.wait() [0x0350f000..0x0350fce8] at java.lang.Object.wait(Native Method) - waiting on <0x11b4ff60> (a org.eclipse.core.internal.jobs.WorkerPool) at org.eclipse.core.internal.jobs.WorkerPool.sleep(WorkerPool.java:173) - locked <0x11b4ff60> (a org.eclipse.core.internal.jobs.WorkerPool) at org.eclipse.core.internal.jobs.WorkerPool.startJob(WorkerPool.java:205) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:51) "Worker-0" daemon prio=5 tid=0x036d4408 nid=0x1430 in Object.wait() [0x034cf000..0x034cfd68] at java.lang.Object.wait(Native Method) - waiting on <0x11b4ff60> (a org.eclipse.core.internal.jobs.WorkerPool) at org.eclipse.core.internal.jobs.WorkerPool.sleep(WorkerPool.java:173) - locked <0x11b4ff60> (a org.eclipse.core.internal.jobs.WorkerPool) at org.eclipse.core.internal.jobs.WorkerPool.startJob(WorkerPool.java:205) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:51) "Start Level Event Dispatcher" daemon prio=5 tid=0x02dc7870 nid=0x1428 in Object.wait() [0x0344f000..0x0344fae8] at java.lang.Object.wait(Native Method) - waiting on <0x11b364a8> (a org.eclipse.osgi.framework.eventmgr.EventManager$EventThread) at java.lang.Object.wait(Object.java:474) at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.getNextEvent(EventManager.java:349) - locked <0x11b364a8> (a org.eclipse.osgi.framework.eventmgr.EventManager$EventThread) at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:287) "State Saver" prio=5 tid=0x02dc57b0 nid=0xea4 in Object.wait() [0x0340f000..0x0340fb68] at java.lang.Object.wait(Native Method) - waiting on <0x11b365f8> (a org.eclipse.osgi.internal.resolver.SystemState) at org.eclipse.core.runtime.adaptor.EclipseAdaptor$StateSaver.run(EclipseAdaptor.java:929) - locked <0x11b365f8> (a org.eclipse.osgi.internal.resolver.SystemState) at java.lang.Thread.run(Thread.java:595) "Framework Event Dispatcher" daemon prio=5 tid=0x02dd8560 nid=0xa80 in Object.wait() [0x033cf000..0x033cfbe8] at java.lang.Object.wait(Native Method) - waiting on <0x13113e28> (a org.eclipse.swt.widgets.RunnableLock) at java.lang.Object.wait(Object.java:474) at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:169) - locked <0x13113e28> (a org.eclipse.swt.widgets.RunnableLock) at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:28) at org.eclipse.swt.widgets.Display.syncExec(Display.java:3656) at org.eclipse.ui.internal.AbstractWorkingSetManager.firePropertyChange(AbstractWorkingSetManager.java:301) at org.eclipse.ui.internal.AbstractWorkingSetManager.getUpdater(AbstractWorkingSetManager.java:585) at org.eclipse.ui.internal.AbstractWorkingSetManager.bundleChanged(AbstractWorkingSetManager.java:546) - locked <0x12d83968> (a org.eclipse.ui.internal.WorkingSetManager) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:1205) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:189) at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:291) "Low Memory Detector" daemon prio=5 tid=0x00a92fd0 nid=0x1768 runnable [0x00000000..0x00000000] "CompilerThread0" daemon prio=10 tid=0x00a91ba8 nid=0xe6c waiting on condition [0x00000000..0x02d0f6cc] "Signal Dispatcher" daemon prio=10 tid=0x00a90f98 nid=0xe1c waiting on condition [0x00000000..0x00000000] "Finalizer" daemon prio=9 tid=0x00a48850 nid=0x1774 in Object.wait() [0x02c8f000..0x02c8fa68] at java.lang.Object.wait(Native Method) - waiting on <0x11af0310> (a java.lang.ref.ReferenceQueue$Lock) at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116) - locked <0x11af0310> (a java.lang.ref.ReferenceQueue$Lock) at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132) at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159) "Reference Handler" daemon prio=10 tid=0x00a87b58 nid=0x15c0 in Object.wait() [0x02c4f000..0x02c4fae8] at java.lang.Object.wait(Native Method) - waiting on <0x11af0070> (a java.lang.ref.Reference$Lock) at java.lang.Object.wait(Object.java:474) at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116) - locked <0x11af0070> (a java.lang.ref.Reference$Lock) "main" prio=7 tid=0x00036d78 nid=0xd50 waiting for monitor entry [0x0007e000..0x0007fc3c] at org.eclipse.core.commands.common.EventManager.addListenerObject(EventManager.java:56) - waiting to lock <0x12d83968> (a org.eclipse.ui.internal.WorkingSetManager) at org.eclipse.ui.internal.AbstractWorkingSetManager.addPropertyChangeListener(AbstractWorkingSetManager.java:272) at org.eclipse.jdt.internal.ui.workingsets.WorkingSetFilterActionGroup.<init>(WorkingSetFilterActionGroup.java:89) at org.eclipse.jdt.internal.ui.browsing.JavaBrowsingPart.createActions(JavaBrowsingPart.java:578) at org.eclipse.jdt.internal.ui.browsing.PackagesView.createActions(PackagesView.java:426) at org.eclipse.jdt.internal.ui.browsing.JavaBrowsingPart.createPartControl(JavaBrowsingPart.java:352) at org.eclipse.ui.internal.ViewReference.createPartHelper(ViewReference.java:305) at org.eclipse.ui.internal.ViewReference.createPart(ViewReference.java:180) at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:552) at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:285) at org.eclipse.ui.internal.ViewPane.setVisible(ViewPane.java:503) at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:140) at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:263) at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65) at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:394) at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1140) at org.eclipse.ui.internal.PartStack.createControl(PartStack.java:621) at org.eclipse.ui.internal.PartStack.createControl(PartStack.java:530) at org.eclipse.ui.internal.PartSashContainer.createControl(PartSashContainer.java:557) at org.eclipse.ui.internal.PerspectiveHelper.activate(PerspectiveHelper.java:227) at org.eclipse.ui.internal.Perspective.onActivate(Perspective.java:813) at org.eclipse.ui.internal.WorkbenchPage.onActivate(WorkbenchPage.java:2217) at org.eclipse.ui.internal.WorkbenchWindow$6.run(WorkbenchWindow.java:2461) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69) at org.eclipse.ui.internal.WorkbenchWindow.setActivePage(WorkbenchWindow.java:2443) at org.eclipse.ui.internal.WorkbenchWindow.restoreState(WorkbenchWindow.java:1893) at org.eclipse.ui.internal.Workbench.doRestoreState(Workbench.java:2644) at org.eclipse.ui.internal.Workbench.access$14(Workbench.java:2593) at org.eclipse.ui.internal.Workbench$17.run(Workbench.java:1542) at org.eclipse.ui.internal.Workbench.runStartupWithProgress(Workbench.java:1287) at org.eclipse.ui.internal.Workbench.restoreState(Workbench.java:1540) at org.eclipse.ui.internal.Workbench.access$12(Workbench.java:1519) at org.eclipse.ui.internal.Workbench$15.run(Workbench.java:1402) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.core.runtime.Platform.run(Platform.java:785) at org.eclipse.ui.internal.Workbench.restoreState(Workbench.java:1346) at org.eclipse.ui.internal.WorkbenchConfigurer.restoreState(WorkbenchConfigurer.java:183) at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:700) at org.eclipse.ui.internal.Workbench.init(Workbench.java:1074) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1696) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:396) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:106) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:109) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:167) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.eclipse.core.launcher.Main.invokeFramework(Main.java:338) at org.eclipse.core.launcher.Main.basicRun(Main.java:282) at org.eclipse.core.launcher.Main.run(Main.java:977) at org.eclipse.core.launcher.Main.main(Main.java:952) "VM Thread" prio=10 tid=0x0003f2a0 nid=0x9dc runnable "VM Periodic Task Thread" prio=10 tid=0x00a8f3d0 nid=0xeec waiting on condition

Files changed in fix:
bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/AbstractWorkingSetManager.java