Project: Eclipse_Platform_UI
Bug 113582 Deadlock updating marker list during builds.
Reported: 2005-10-24 15:13:12 | Status: verified fixed

I hot a deadlock involving jobs. The only two parties involved appear to be the problems view and the editor being saved. From the stacktrace, It's not obvious to me why the deadlock has occurred. I'm assigning it to Tod since the Problems view is involved but it could also be a problem in the Jobs framework so I've copied John as well. Here's the stacktrace. Full thread dump Java HotSpot(TM) Client VM (1.4.2_10-ea-b01 mixed mode): "org.eclipse.jdt.internal.ui.text.JavaReconciler" daemon prio=2 tid=0x041fbb68 n id=0x9e0 in Object.wait() [5b7f000..5b7fd68] at java.lang.Object.wait(Native Method) at org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread .run(AbstractReconciler.java:176) - locked <0x17197160> (a org.eclipse.jface.text.reconciler.DirtyRegionQu eue) "org.eclipse.jdt.internal.ui.text.JavaReconciler" daemon prio=2 tid=0x046ff530 n id=0xca8 in Object.wait() [5daf000..5dafd68] at java.lang.Object.wait(Native Method) at org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread .run(AbstractReconciler.java:176) - locked <0x16eac480> (a org.eclipse.jface.text.reconciler.DirtyRegionQu eue) "org.eclipse.jface.text.reconciler.MonoReconciler" daemon prio=2 tid=0x041ea010 nid=0x8c8 in Object.wait() [5d6f000..5d6fd68] at java.lang.Object.wait(Native Method) at org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread .run(AbstractReconciler.java:176) - locked <0x16d75488> (a org.eclipse.jface.text.reconciler.DirtyRegionQu eue) "org.eclipse.jface.text.reconciler.MonoReconciler" daemon prio=2 tid=0x0451ad30 nid=0xd7c in Object.wait() [5d2f000..5d2fd68] at java.lang.Object.wait(Native Method) at org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread .run(AbstractReconciler.java:176) - locked <0x16d754e8> (a org.eclipse.jface.text.reconciler.DirtyRegionQu eue) "org.eclipse.jface.text.reconciler.MonoReconciler" daemon prio=2 tid=0x04691d80 nid=0x544 in Object.wait() [583f000..583fd68] at java.lang.Object.wait(Native Method) at org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread .run(AbstractReconciler.java:176) - locked <0x16d75548> (a org.eclipse.jface.text.reconciler.DirtyRegionQu eue) "org.eclipse.jface.text.reconciler.MonoReconciler" daemon prio=2 tid=0x04734928 nid=0x540 in Object.wait() [531f000..531fd68] at java.lang.Object.wait(Native Method) at org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread .run(AbstractReconciler.java:176) - locked <0x16c98228> (a org.eclipse.jface.text.reconciler.DirtyRegionQu eue) "org.eclipse.jface.text.reconciler.MonoReconciler" daemon prio=2 tid=0x0402d8d8 nid=0x208 in Object.wait() [3dff000..3dffd68] at java.lang.Object.wait(Native Method) at org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread .run(AbstractReconciler.java:176) - locked <0x16c98470> (a org.eclipse.jface.text.reconciler.DirtyRegionQu eue) "Worker-779" prio=5 tid=0x04799308 nid=0x5dc in Object.wait() [77df000..77dfd68] at java.lang.Object.wait(Native Method) at org.eclipse.core.internal.jobs.Semaphore.acquire(Semaphore.java:38) - locked <0x1a18c4e8> (a org.eclipse.core.internal.jobs.Semaphore) at org.eclipse.core.internal.jobs.JobManager.join(JobManager.java:611) at org.eclipse.core.internal.jobs.InternalJob.join (InternalJob.java:305) at org.eclipse.core.runtime.jobs.Job.join(Job.java:353) at org.eclipse.ui.views.markers.internal.MarkerView.scheduleCountUpdate ( MarkerView.java:1329) at org.eclipse.ui.views.markers.internal.MarkerAdapter.fetchDeferredChil dren(MarkerAdapter.java:107) at org.eclipse.ui.progress.DeferredTreeContentManager$1.run (DeferredTree ContentManager.java:192) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76) "Worker-775" prio=5 tid=0x04723c08 nid=0x72c in Object.wait() [613f000..613fd68] at java.lang.Object.wait(Native Method) - waiting on <0x16cec7f0> (a org.eclipse.ui.console.IOConsoleInputStream ) at java.lang.Object.wait(Object.java:429) at org.eclipse.ui.console.IOConsoleInputStream.waitForData (IOConsoleInpu tStream.java:147) at org.eclipse.ui.console.IOConsoleInputStream.read (IOConsoleInputStream .java:93) - locked <0x16cec7f0> (a org.eclipse.ui.console.IOConsoleInputStream) at org.eclipse.ui.console.IOConsoleInputStream.read (IOConsoleInputStream .java:118) at org.eclipse.debug.internal.ui.views.console.ProcessConsole$InputReadJ ob.run(ProcessConsole.java:666) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76) "Worker-769" prio=5 tid=0x04859c18 nid=0x44c waiting on condition [779f000..779f d68] at java.lang.Thread.sleep(Native Method) at org.eclipse.ui.internal.decorators.DecorationScheduler$1.run (Decorati onScheduler.java:249) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76) "Java indexing" daemon prio=4 tid=0x03f81de8 nid=0x26c in Object.wait() [571f000 ..571fd68] at java.lang.Object.wait(Native Method) - waiting on <0x138b6f80> (a org.eclipse.jdt.internal.core.search.indexi ng.IndexManager) at java.lang.Object.wait(Object.java:429) at org.eclipse.jdt.internal.core.search.processing.JobManager.run (JobMan ager.java:349) - locked <0x138b6f80> (a org.eclipse.jdt.internal.core.search.indexing.I ndexManager) at java.lang.Thread.run(Thread.java:534) "Start Level Event Dispatcher" daemon prio=5 tid=0x02fa0fb8 nid=0xb98 in Object. wait() [316f000..316fd68] at java.lang.Object.wait(Native Method) - waiting on <0x127b0b08> (a org.eclipse.osgi.framework.eventmgr.EventMa nager$EventThread) at java.lang.Object.wait(Object.java:429) at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.getNextE vent(EventManager.java:349) - locked <0x127b0b08> (a org.eclipse.osgi.framework.eventmgr.EventManage r$EventThread) at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run (Even tManager.java:287) "Framework Event Dispatcher" daemon prio=5 tid=0x00a49c00 nid=0x94c in Object.wa it() [30af000..30afd68] at java.lang.Object.wait(Native Method) - waiting on <0x127a1ad0> (a org.eclipse.osgi.framework.eventmgr.EventMa nager$EventThread) at java.lang.Object.wait(Object.java:429) at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.getNextE vent(EventManager.java:349) - locked <0x127a1ad0> (a org.eclipse.osgi.framework.eventmgr.EventManage r$EventThread) at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run (Even tManager.java:287) "Signal Dispatcher" daemon prio=10 tid=0x009d00c8 nid=0xa94 waiting on condition [0..0] "Finalizer" daemon prio=9 tid=0x009cd700 nid=0x17c in Object.wait() [2d5f000..2d 5fd68] at java.lang.Object.wait(Native Method) at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:111) - locked <0x12778a48> (a java.lang.ref.ReferenceQueue$Lock) at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:127) at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159) "Reference Handler" daemon prio=10 tid=0x009cc378 nid=0xa1c in Object.wait() [2d 1f000..2d1fd68] at java.lang.Object.wait(Native Method) at java.lang.Object.wait(Object.java:429) at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:115) - locked <0x12778ab0> (a java.lang.ref.Reference$Lock) "main" prio=5 tid=0x00034b50 nid=0xc54 runnable [7e000..7fc3c] at java.lang.Object.wait(Native Method) - waiting on <0x16de07e8> (a org.eclipse.core.internal.jobs.ThreadJob) at org.eclipse.core.internal.jobs.ThreadJob.joinRun(ThreadJob.java:183) - locked <0x16de07e8> (a org.eclipse.core.internal.jobs.ThreadJob) at org.eclipse.core.internal.jobs.ImplicitJobs.begin (ImplicitJobs.java:8 8) at org.eclipse.core.internal.jobs.JobManager.beginRule (JobManager.java:1 90) at org.eclipse.core.internal.resources.WorkManager.checkIn (WorkManager.j ava:96) at org.eclipse.core.internal.resources.Workspace.prepareOperation (Worksp ace.java:1663) at org.eclipse.core.internal.resources.Workspace.run (Workspace.java:1703 ) at org.eclipse.ui.actions.WorkspaceModifyOperation.run (WorkspaceModifyOp eration.java:110) - locked <0x1005bb40> (a org.eclipse.ui.actions.WorkspaceModifyDelegatin gOperation) at org.eclipse.ui.internal.editors.text.WorkspaceOperationRunner.run (Wor kspaceOperationRunner.java:73) at org.eclipse.ui.internal.editors.text.WorkspaceOperationRunner.run (Wor kspaceOperationRunner.java:63) at org.eclipse.ui.editors.text.TextFileDocumentProvider.executeOperation (TextFileDocumentProvider.java:447) at org.eclipse.ui.editors.text.TextFileDocumentProvider.saveDocument (Tex tFileDocumentProvider.java:706) at org.eclipse.ui.texteditor.AbstractTextEditor.performSave (AbstractText Editor.java:3758) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.performS ave(CompilationUnitEditor.java:1468) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.doSave (C ompilationUnitEditor.java:1521) - locked <0x17197008> (a org.eclipse.jdt.internal.core.CompilationUnit) at org.eclipse.ui.internal.SaveableHelper$1.run(SaveableHelper.java:95) at org.eclipse.ui.internal.SaveableHelper$2.run (SaveableHelper.java:116) at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalCont ext.java:346) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:291) at org.eclipse.jface.window.ApplicationWindow$1.run (ApplicationWindow.ja va:631) at org.eclipse.swt.custom.BusyIndicator.showWhile (BusyIndicator.java:69) at org.eclipse.jface.window.ApplicationWindow.run (ApplicationWindow.java :628) at org.eclipse.ui.internal.WorkbenchWindow.run (WorkbenchWindow.java:2137 ) at org.eclipse.ui.internal.SaveableHelper.runProgressMonitorOperation (Sa veableHelper.java:122) at org.eclipse.ui.internal.SaveableHelper.savePart (SaveableHelper.java:1 00) at org.eclipse.ui.internal.EditorManager.savePart (EditorManager.java:114 0) at org.eclipse.ui.internal.WorkbenchPage.savePart (WorkbenchPage.java:274 1) at org.eclipse.ui.internal.WorkbenchPage.saveEditor (WorkbenchPage.java:2 754) at org.eclipse.ui.internal.SaveAction.run(SaveAction.java:69) at org.eclipse.jface.action.Action.runWithEvent(Action.java:996) at org.eclipse.jface.commands.ActionHandler.execute (ActionHandler.java:1 17) at org.eclipse.core.commands.Command.execute(Command.java:311) at org.eclipse.core.commands.ParameterizedCommand.execute (ParameterizedC ommand.java:401) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.executeCommand (Workben chKeyboard.java:459) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.press (WorkbenchKeyboar d.java:781) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEvent (Workbe nchKeyboard.java:828) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.filterKeySequenceBindi ngs(WorkbenchKeyboard.java:550) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.access$3 (WorkbenchKeyb oard.java:493) at org.eclipse.ui.internal.keys.WorkbenchKeyboard$KeyDownFilter.handleEv ent(WorkbenchKeyboard.java:117) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Display.filterEvent(Display.java:975) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:892) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:917) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:902) at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:930) at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:926) at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1240) at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:3155) at org.eclipse.swt.widgets.Control.windowProc(Control.java:3056) at org.eclipse.swt.widgets.Display.windowProc(Display.java:3910) at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1697) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2856) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1763) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1727) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench (Workbench.jav a:371) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143) at org.eclipse.ui.internal.ide.IDEApplication.run (IDEApplication.java:10 6) at org.eclipse.core.internal.runtime.PlatformActivator$1.run (PlatformAct ivator.java:226) at org.eclipse.core.runtime.adaptor.EclipseStarter.run (EclipseStarter.ja va:375) at org.eclipse.core.runtime.adaptor.EclipseStarter.run (EclipseStarter.ja va:164) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) 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=5 tid=0x00a0b720 nid=0xaa0 runnable "VM Periodic Task Thread" prio=10 tid=0x00a0c9b0 nid=0x70 waiting on condition "Suspend Checker Thread" prio=10 tid=0x009cf780 nid=0xf24 runnable

Files changed in fix:
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerAdapter.java