Community
Participate
Working Groups
M5 + equinox (Linux GTK version) While debugging a runtime workbench, I wanted to display the quick hierarchy (Ctrl+T) and got into an apparent deadlock. That is, all input except for the mouse wheel is blocked, no CPU consumption. The relevant threads from the vm dump: "ModalContext" prio=1 tid=0x08e1ddb8 nid=0x31a2 sleeping[62cde000..62cde854] at java.lang.Thread.sleep(Native Method) at org.eclipse.jdt.internal.core.search.processing.JobManager.performConcurrentJob(JobManager.java:243) at org.eclipse.jdt.internal.core.hierarchy.IndexBasedHierarchyBuilder.searchAllPossibleSubTypes(IndexBasedHierarchyBuilder.java:474) at org.eclipse.jdt.internal.core.hierarchy.IndexBasedHierarchyBuilder.determinePossibleSubTypes(IndexBasedHierarchyBuilder.java:364) at org.eclipse.jdt.internal.core.hierarchy.IndexBasedHierarchyBuilder.build(IndexBasedHierarchyBuilder.java:123) at org.eclipse.jdt.internal.core.hierarchy.TypeHierarchy.compute(TypeHierarchy.java:319) at org.eclipse.jdt.internal.core.hierarchy.TypeHierarchy.refresh(TypeHierarchy.java:1230) - locked <0x4f031d28> (a org.eclipse.jdt.internal.core.hierarchy.TypeHierarchy) at org.eclipse.jdt.internal.core.CreateTypeHierarchyOperation.executeOperation(CreateTypeHierarchyOperation.java:90) at org.eclipse.jdt.internal.core.JavaModelOperation.execute(JavaModelOperation.java:367) at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:706) at org.eclipse.jdt.internal.core.JavaElement.runOperation(JavaElement.java:523) at org.eclipse.jdt.internal.core.SourceType.newTypeHierarchy(SourceType.java:594) at org.eclipse.jdt.internal.ui.typehierarchy.TypeHierarchyLifeCycle.doHierarchyRefresh(TypeHierarchyLifeCycle.java:141) at org.eclipse.jdt.internal.ui.typehierarchy.TypeHierarchyLifeCycle.access$0(TypeHierarchyLifeCycle.java:127) at org.eclipse.jdt.internal.ui.typehierarchy.TypeHierarchyLifeCycle$1.run(TypeHierarchyLifeCycle.java:115) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:101) "main" prio=1 tid=0x08052230 nid=0x31a2 sleeping[bfffa000..bfffb6d8] at java.lang.Thread.sleep(Native Method) at org.eclipse.swt.widgets.Display.sleep(Display.java:2107) at org.eclipse.jface.operation.ModalContext$ModalContextThread.block(ModalContext.java:137) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:261) at org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:444) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:84) at org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:441) at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:1467) at org.eclipse.jdt.internal.ui.typehierarchy.TypeHierarchyLifeCycle.ensureRefreshedTypeHierarchy(TypeHierarchyLifeCycle.java:122) at org.eclipse.jdt.internal.ui.typehierarchy.HierarchyInformationControl.setInput(HierarchyInformationControl.java:325) at org.eclipse.jface.text.AbstractInformationControlManager.internalShowInformationControl(AbstractInformationControlManager.java:698) at org.eclipse.jface.text.AbstractInformationControlManager.presentInformation(AbstractInformationControlManager.java:677) at org.eclipse.jface.text.AbstractInformationControlManager.setInformation(AbstractInformationControlManager.java:240) at org.eclipse.jface.text.information.InformationPresenter.computeInformation(InformationPresenter.java:341) at org.eclipse.jface.text.AbstractInformationControlManager.doShowInformation(AbstractInformationControlManager.java:661) at org.eclipse.jface.text.AbstractInformationControlManager.showInformation(AbstractInformationControlManager.java:651) at org.eclipse.jdt.internal.ui.javaeditor.JavaSourceViewer.doOperation(JavaSourceViewer.java:120) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor$AdaptedSourceViewer.doOperation(CompilationUnitEditor.java:167) at org.eclipse.ui.texteditor.TextOperationAction$1.run(TextOperationAction.java:122) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:84) at org.eclipse.ui.texteditor.TextOperationAction.run(TextOperationAction.java:120) at org.eclipse.ui.texteditor.RetargetTextEditorAction.run(RetargetTextEditorAction.java:239) at org.eclipse.jface.action.Action.runWithEvent(Action.java:842) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:542) at org.eclipse.jface.action.ActionContributionItem.access$4(ActionContributionItem.java:494) at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:466) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:967) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1839) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1619) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1405) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1381) [...]
Note that the UI blocking was "correct" for a blocking modal call - I was even able to push the "stop" button in the status bar's progress monitor - without effect (same thread dump).
Seems like it was still busy indexing... did you get any progress ? Also, did you have anything in the .log ?
Nothing in the log (Only OperationCanceledExceptions from start up, but nothing near where it happened). No progress at all - the progress monitor reported zero percent. No cpu (or noticable disk) activity either. I should add that this has happened twice already. I still have the complete thread dump if that helps anything.
Can you please include the other threads because I cannot see why the JobManager.performConcurrentJob should be blocked.
Created attachment 6970 [details] full vm dump VM dump, taken anytime during the hang. The same dump is produced before and after pressing the stop button.
From the VM dump (Java HotSpot(TM) Client VM (1.4.2_01-b06 mixed mode)): "Java indexing" daemon prio=1 tid=0x08555d40 nid=0x25bd in Object.wait() [6342d000..6342d854] at java.lang.Object.wait(Native Method) - waiting on <0x46b3cd78> (a o.e.j.i.c.search.indexing.IndexManager) at java.lang.Object.wait(Object.java:429) at o.e.j.i.c.search.processing.JobManager.run(JobManager.java:325) - locked <0x46b3cd78> (a o.e.j.i.c.search.indexing.IndexManager) at java.lang.Thread.run(Thread.java:534) The IndexManager is waiting for a job to show up. The JobManager.performConcurrentJob is sleeping for 50ms until indexing jobs finish, but there do not appear to be any pending jobs. Maybe the sleep(50) is not waking up the thread.
Can you reproduce this deadlock? What steps are needed?
No steps. I just invoked quick hierarchy (Ctrl+T), but it is not reproduceable. It seems that it was ususally a problem if some other activity (bg process) was going on, but this is just a guess.
Are you experiencing any other deadlock situations or is this the only one?
this is the only one so far - and I never experienced it today (using I20031126, though).
Tom: I'm going to close this since we had no luck reproducing it. If it happens to you again, let us know.