Community
Participate
Working Groups
Deadlock occurs during workbench shutdown as JobManager and Device are aquiring and waiting for deviceLock and JobManager#lock. Thread [Worker-0] (Suspended) owns: Object (id=133) waiting for: Object (id=132) Display(Device).isDisposed() line: 300 JobManagerAdapter.done(IJobChangeEvent) line: 119 JobListeners$3.notify(IJobChangeListener, IJobChangeEvent) line: 39 JobListeners.doNotify(JobListeners$IListenerDoit, IJobChangeEvent) line: 96 JobListeners.done(Job, IStatus, boolean) line: 152 JobManager.endJob(InternalJob, IStatus, boolean) line: 646 JobManager.startJob() line: 1483 WorkerPool.startJob(Worker) line: 218 Worker.run() line: 50 Daemon Thread [UIThread [1m4l2ysrx0k1vz52o0aige08m]] (Suspended) owns: Object (id=132) owns: UIThread (id=32) waiting for: Object (id=133) JobManager.select(Object, int) line: 1158 JobManager.select(Object) line: 1148 JobManager.cancel(Object) line: 333 QueryResultPane(AbstractEditorPane).dispose() line: 162 MultiPaneEditor$8.run() line: 637 SafeRunner.run(ISafeRunnable) line: 42 HeapEditor(MultiPaneEditor).disposePart(IWorkbenchPart) line: 633 HeapEditor.disposePart(IWorkbenchPart) line: 378 HeapEditor(MultiPaneEditor).dispose() line: 433 HeapEditor.dispose() line: 223 EditorReference(WorkbenchPartReference).doDisposePart() line: 730 EditorReference.doDisposePart() line: 301 EditorReference(WorkbenchPartReference).dispose() line: 681 WorkbenchPage.disposePart(WorkbenchPartReference) line: 1586 WorkbenchPage.handleDeferredEvents() line: 1344 WorkbenchPage.deferUpdates(boolean) line: 1328 WorkbenchPage.closeEditors(IEditorReference[], boolean) line: 1302 WorkbenchPage.closeAllEditors(boolean) line: 1125 WorkbenchPage.dispose() line: 1636 WorkbenchWindow.closeAllPages() line: 810 WorkbenchWindow.hardClose() line: 1635 WorkbenchWindow.busyClose() line: 683 WorkbenchWindow.access$0(WorkbenchWindow) line: 659 WorkbenchWindow$2.run() line: 775 BusyIndicator.showWhile(Display, Runnable) line: 66 WorkbenchWindow.close() line: 773 WindowManager.close() line: 109 Workbench$13.run() line: 861 SafeRunner.run(ISafeRunnable) line: 42 Workbench.busyClose(boolean) line: 858 Workbench.access$12(Workbench, boolean) line: 781 Workbench$21.run() line: 1047 BusyIndicator.showWhile(Display, Runnable) line: 66 Workbench.close(int, boolean) line: 1045 Workbench.close() line: 1007 Workbench$ShutdownHandler.handleEvent(Event) line: 131 Display.sendDisposeEvent() line: 714 Display.release() line: 693 Display(Device).dispose() line: 282 Application.start(IApplicationContext) line: 33 EntrypointApplicationWrapper.createUI() line: 27 EntryPointManager.createUI(String) line: 92 RWTLifeCycle.createUI() line: 245 RWTLifeCycle$UIThreadController.run() line: 114 UIThread(Thread).run() line: 619 [local variables unavailable] UIThread.run() line: 102 Will try to come up with a simple project to reproduce.
I ran into the same deadlock today, thread dump is attached.
Created attachment 182346 [details] deadlock thread dump
Created attachment 205970 [details] Proposed fix for HEAD We are still not able to reproduce this dead lock. However, in JobManagerAdapter#done(), there is a code passage that attempts to acquire a Display-lock while holding a JobManager-lock. The patch moves the acquisition of the Display-lock outside the block that is guarded by the JobManager-lock. If this patch solves the deadlock please report here.
Just to let you know that we encountered the same deadlock and that the patch supplied by Herrmann did fix the problem. We don't have much more information as to why this happens but if you have questions, don't hesitate to ask.
With some more testing and the feedback from comment #4 I am confident that the patch from attachment 205970 [details] solves this bug and doesn't introduce other issues. Applied to CVS HEAD.
*** Bug 366517 has been marked as a duplicate of this bug. ***
Ruediger, does this patch fit (suitable) for the 1.4 maintenance branch?
We have been using this patch in our application (1.4.0) for about a month (~6000 Sessions since then) and have not noticed any sideeffects other than not having that deadlock any more.
(In reply to comment #7) > Ruediger, does this patch fit (suitable) for the 1.4 maintenance branch? If the patch itself applies without conflicts, it is safe to commit it to 1.4
Created attachment 210031 [details] Adopted patch (attachment 205970 [details]) for 14_Maintenance branch
Applied patch to v14_Maintenance branch.