Bug 4365 Deadlock on save
D:\devel\sdk203>.\jre\bin\java -verify -cp startup.jar org.eclipse.core.launcher .UIMain -application org.eclipse.ui.workbench -ws win32 -platform d:\workspaces\ eclipse-sh1\plugins Full thread dump Classic VM (J2RE 1.3.0 IBM build cn130-20010502, native threads ): "org.eclipse.jface.text.reconciler.MonoReconciler" (TID:0x2c8bee8, sys_threa d_t:0x13d10ab0, state:CW, native ID:0x424) prio=1 at java.lang.Object.wait(Native Method) at java.lang.Object.wait(Object.java:421) at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:138) at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:1 8) at org.eclipse.swt.widgets.Display.syncExec(Display.java:1572) at org.eclipse.jdt.ui.JavaElementContentProvider.postRunnable(JavaElemen tContentProvider.java:277) at org.eclipse.jdt.ui.JavaElementContentProvider.postRefresh(JavaElement ContentProvider.java:242) at org.eclipse.jdt.ui.JavaElementContentProvider.processDelta(JavaElemen tContentProvider.java:143) at org.eclipse.jdt.ui.JavaElementContentProvider.elementChanged(JavaElem entContentProvider.java:82) at org.eclipse.jdt.internal.core.JavaModelManager.fire(JavaModelManager. java:255) at org.eclipse.jdt.internal.core.WorkingCopy.reconcile(WorkingCopy.java: 250) at org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy.reconci le(JavaReconcilingStrategy.java:39) at org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy.reconci le(JavaReconcilingStrategy.java:51) at org.eclipse.jface.text.reconciler.MonoReconciler.process(MonoReconcil er.java:66) at org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread .run(AbstractReconciler.java:153) "HelpServer" (TID:0x1fb7320, sys_thread_t:0x13b5c698, state:R, native ID:0x6 74) prio=5 at java.net.PlainSocketImpl.socketAccept(Native Method) at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:430) at java.net.ServerSocket.implAccept(ServerSocket.java:255) at java.net.ServerSocket.accept(ServerSocket.java:234) at org.eclipse.help.internal.server.HelpServer.run(HelpServer.java:127) "Java indexing: org.eclipse.jdt.internal.core.search.indexing.IndexManager" (TID:0x8e6ad0, sys_thread_t:0x123ca2a0, state:CW, native ID:0x6c8) prio=5 at java.lang.Thread.sleep(Native Method) at org.eclipse.jdt.internal.core.search.processing.JobManager.run(JobMan ager.java(Compiled Code)) at java.lang.Thread.run(Thread.java:498) "Finalizer" (TID:0x8e8708, sys_thread_t:0x86b710, state:CW, native ID:0x4c0) prio=8 at java.lang.Object.wait(Native Method) at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java(Compiled Code )) at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java(Compiled Code )) at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java(Compiled C ode)) "Reference Handler" (TID:0x8e8750, sys_thread_t:0x839cc0, state:CW, native I D:0x668) prio=10 at java.lang.Object.wait(Native Method) at java.lang.Object.wait(Object.java:421) at java.lang.ref.Reference$ReferenceHandler.run(Reference.java(Compiled Code)) "Signal dispatcher" (TID:0x8e8798, sys_thread_t:0x835310, state:R, native ID :0x5dc) prio=5 "main" (TID:0x8e87e0, sys_thread_t:0x2355d8, state:CW, native ID:0x58c) prio =5 at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.doSave(C ompilationUnitEditor.java:252) at org.eclipse.ui.internal.EditorManager$9.run(EditorManager.java:776) at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalCont ext.java:296) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:249) at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDi alog.java:335) at org.eclipse.ui.internal.EditorManager.runProgressMonitorOperation(Edi torManager.java:634) at org.eclipse.ui.internal.EditorManager.saveEditor(EditorManager.java:7 81) at org.eclipse.ui.internal.WorkbenchPage.saveEditor(WorkbenchPage.java:1 173) at org.eclipse.ui.internal.SaveAction.run(SaveAction.java:31) at org.eclipse.jface.action.Action.runWithEvent(Action.java:451) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent(Act ionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0(ActionContri butionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handle Event(ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:645) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1359) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1160) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:675) at org.eclipse.ui.internal.Workbench.run(Workbench.java:658) at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoa der.java:820) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:285) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:502) at org.eclipse.core.launcher.UIMain.main(UIMain.java:52) Monitor pool info: Initial monitor count: 32 Minimum number of free monitors before expansion: 5 Pool will next be expanded by: 16 Current total number of monitors: 32 Current number of free monitors: 9 Monitor Pool Dump (inflated object-monitors): sys_mon_t:0x00234ec0 infl_mon_t: 0x00234ab0: java.lang.ref.Reference$Lock@8F1738/8F1740: <unowned> Waiting to be notified: "Reference Handler" (0x839cc0) sys_mon_t:0x00234f10 infl_mon_t: 0x00234af0: java.lang.ref.ReferenceQueue$Lock@8F4350/8F4358: <unowned> Waiting to be notified: "Finalizer" (0x86b710) sys_mon_t:0x002351e8 infl_mon_t: 0x00000000: org.eclipse.jdt.internal.core.WorkingCopy@2DAF488/2DAF490: <unowned> Waiting to be notified: "main" (0x2355d8) sys_mon_t:0x00235210 infl_mon_t: 0x00234d50: org.eclipse.swt.widgets.RunnableLock@43C6310/43C6318: <unowned> Waiting to be notified: "org.eclipse.jface.text.reconciler.MonoReconciler" (0x13d10ab0) JVM System Monitor Dump (registered monitors): ACS Heap lock: <unowned> System Heap lock: <unowned> Sleep lock: <unowned> Waiting to be notified: "Java indexing: org.eclipse.jdt.internal.core.search.indexing.IndexM anager" (0x123ca2a0) Method trace lock: <unowned> UTF8 Cache lock: <unowned> Heap lock: <unowned> Rewrite Code lock: <unowned> Monitor Cache lock: owner "Signal dispatcher" (0x835310) 1 entry JNI Pinning lock: <unowned> JNI Global Reference lock: <unowned> Classloader lock: <unowned> Linking class lock: <unowned> Binclass lock: <unowned> Monitor Registry lock: owner "Signal dispatcher" (0x835310) 1 entry Thread queue lock: owner "Signal dispatcher" (0x835310) 1 entry Thread identifiers (as used in flat monitors): ident 13 "org.eclipse.jface.text.reconciler.MonoReconciler" (0x13d10ab0) ee 0x13d108e0 ident 7 "HelpServer" (0x13b5c698) ee 0x13b5c4c8 ident 6 "Java indexing: org.eclipse.jdt.internal.core.search.indexing.IndexM anager" (0x123ca2a0) ee 0x123ca0d0 ident 5 "Finalizer" (0x86b710) ee 0x0086b540 ident 4 "Reference Handler" (0x839cc0) ee 0x00839af0 ident 3 "Signal dispatcher" (0x835310) ee 0x00835140 ident 2 "main" (0x2355d8) ee 0x00235408 Java Object Monitor Dump (flat & inflated object-monitors): java.lang.ref.Reference$Lock@8F1738/8F1740 locknflags 80000200 Monitor inflated infl_mon 0x00234ab0 java.lang.ref.ReferenceQueue$Lock@8F4350/8F4358 locknflags 80000400 Monitor inflated infl_mon 0x00234af0 java.net.PlainSocketImpl@1142FB8/1142FC0 locknflags 00070000 Flat locked by threadIdent 7. Entrycount 1 org.eclipse.jdt.internal.core.WorkingCopy@2DAF488/2DAF490 locknflags 00130000 Flat locked by threadIdent 13. Entrycount 1 Writing java dump to D:\devel\sdk203/javacore764.1002803130.txt... OK
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaElementContentProvider.java
else 
				postRemove(resource);
		}
		if ((status & IResourceDelta.ADDED) != 0) {
			if (parent instanceof IPackageFragment) 
				
				postRefresh(internalGetParent(parent));
			else
				postAdd(parent, resource);
		}
		int changeFlags= delta.getFlags();
		IResourceDelta[] affectedChildren= delta.getAffectedChildren();
		
		if (affectedChildren.length > 1) {
			
			postRefresh(resource);
			return;
		}
		for (int i= 0; i < affectedChildren.length; i++)
			processResourceDelta(affectedChildren[i], resource);
	}
	
	private void postRefresh(final Object root) {
		postRunnable(new Runnable() {
			public void run() {
				
				Control ctrl= fViewer.getControl();
				if (ctrl != null && !ctrl.isDisposed()) 
					fViewer.refresh(root);
			}