Bug 131476 freeze due to IO in the UI thread
I was running i0309 and deleting some large number of resrouces from my workspace. There were likely other things going on (e.g., build, indexing, ...). After hitting the delete the UI went unresponsive for about a minute. During that time I hit ctrl-break and got the stack dump below that shows some sort of read-only checking going on in the UI thread. 3XMTHREADINFO "main" (TID:0x0012E800, sys_thread_t:0x000350DC, state:CW, native ID:0x00000DEC) prio=6 4XESTACKTRACE at org/eclipse/core/internal/filesystem/local/LocalFileNatives.internalGetFileInfoW(Native Method) 4XESTACKTRACE at org/eclipse/core/internal/filesystem/local/LocalFileNatives.fetchFileInfo(LocalFileNatives.java:60(Compiled Code)) 4XESTACKTRACE at org/eclipse/core/internal/filesystem/local/LocalFile.fetchInfo(LocalFile.java:121(Compiled Code)) 4XESTACKTRACE at org/eclipse/core/filesystem/provider/FileStore.fetchInfo(FileStore.java:255(Compiled Code)) 4XESTACKTRACE at org/eclipse/core/internal/localstore/FileSystemResourceManager.attributes(FileSystemResourceManager.java:122(Compiled Code)) 4XESTACKTRACE at org/eclipse/core/internal/resources/Resource.getResourceAttributes(Resource.java:1042(Compiled Code)) 4XESTACKTRACE at org/eclipse/ui/actions/ReadOnlyStateChecker.checkReadOnlyResources(ReadOnlyStateChecker.java:156(Compiled Code)) 4XESTACKTRACE at org/eclipse/ui/actions/ReadOnlyStateChecker.checkAcceptedResource(ReadOnlyStateChecker.java:79(Compiled Code)) 4XESTACKTRACE at org/eclipse/ui/actions/ReadOnlyStateChecker.checkReadOnlyResources(ReadOnlyStateChecker.java:180(Compiled Code)) 4XESTACKTRACE at org/eclipse/ui/actions/ReadOnlyStateChecker.checkAcceptedResource(ReadOnlyStateChecker.java:79(Compiled Code)) 4XESTACKTRACE at org/eclipse/ui/actions/ReadOnlyStateChecker.checkReadOnlyResources(ReadOnlyStateChecker.java:180(Compiled Code)) 4XESTACKTRACE at org/eclipse/ui/actions/ReadOnlyStateChecker.checkAcceptedResource(ReadOnlyStateChecker.java:79(Compiled Code)) 4XESTACKTRACE at org/eclipse/ui/actions/ReadOnlyStateChecker.checkReadOnlyResources(ReadOnlyStateChecker.java:180(Compiled Code)) 4XESTACKTRACE at org/eclipse/ui/actions/ReadOnlyStateChecker.checkAcceptedResource(ReadOnlyStateChecker.java:79(Compiled Code)) 4XESTACKTRACE at org/eclipse/ui/actions/ReadOnlyStateChecker.checkReadOnlyResources(ReadOnlyStateChecker.java:180(Compiled Code)) 4XESTACKTRACE at org/eclipse/ui/actions/ReadOnlyStateChecker.checkAcceptedResource(ReadOnlyStateChecker.java:79(Compiled Code)) 4XESTACKTRACE at org/eclipse/ui/actions/ReadOnlyStateChecker.checkReadOnlyResources(ReadOnlyStateChecker.java:180(Compiled Code)) 4XESTACKTRACE at org/eclipse/ui/actions/ReadOnlyStateChecker.checkAcceptedResource(ReadOnlyStateChecker.java:79(Compiled Code)) 4XESTACKTRACE at org/eclipse/ui/actions/ReadOnlyStateChecker.checkReadOnlyResources(ReadOnlyStateChecker.java:180(Compiled Code)) 4XESTACKTRACE at org/eclipse/ui/actions/ReadOnlyStateChecker.checkAcceptedResource(ReadOnlyStateChecker.java:79(Compiled Code)) 4XESTACKTRACE at org/eclipse/ui/actions/ReadOnlyStateChecker.checkReadOnlyResources(ReadOnlyStateChecker.java:180(Compiled Code)) 4XESTACKTRACE at org/eclipse/ui/actions/ReadOnlyStateChecker.checkAcceptedResource(ReadOnlyStateChecker.java:79(Compiled Code)) 4XESTACKTRACE at org/eclipse/ui/actions/ReadOnlyStateChecker.checkReadOnlyResources(ReadOnlyStateChecker.java:180) 4XESTACKTRACE at org/eclipse/ui/actions/ReadOnlyStateChecker.checkAcceptedResource(ReadOnlyStateChecker.java:79) 4XESTACKTRACE at org/eclipse/ui/actions/ReadOnlyStateChecker.checkReadOnlyResources(ReadOnlyStateChecker.java:180) 4XESTACKTRACE at org/eclipse/ui/actions/ReadOnlyStateChecker.checkReadOnlyResources(ReadOnlyStateChecker.java:109) 4XESTACKTRACE at org/eclipse/ui/actions/DeleteResourceAction.getResourcesToDelete(DeleteResourceAction.java:583) 4XESTACKTRACE at org/eclipse/ui/actions/DeleteResourceAction.run(DeleteResourceAction.java:511) 4XESTACKTRACE at org/eclipse/jdt/internal/ui/refactoring/reorg/DeleteAction.run(DeleteAction.java:79) 4XESTACKTRACE at org/eclipse/jdt/ui/actions/SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:267) 4XESTACKTRACE at org/eclipse/jdt/ui/actions/SelectionDispatchAction.run(SelectionDispatchAction.java:243) 4XESTACKTRACE at org/eclipse/jface/action/Action.runWithEvent(Action.java:499) 4XESTACKTRACE at org/eclipse/jface/action/ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:539)
bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/DeleteResourceAction.java
if (!result.isOK()) {
				throw new CoreException(result);
			}
        } finally {
        	monitor.done();
        }
    }
    /**
     * Deletes the given resource.
     */
    private void delete(IResource resourceToDelete, IProgressMonitor monitor)
            throws CoreException {
        boolean force = false; 
        try {
            if (resourceToDelete.getType() == IResource.PROJECT) {
                
                IProject project = (IProject) resourceToDelete;
                project.delete(deleteContent, force, monitor);
            } else {
                
                resourceToDelete.delete(IResource.KEEP_HISTORY, monitor);
            }
        } catch (CoreException exception) {
            if (resourceToDelete.getType() == IResource.FILE) {
                IStatus[] children = exception.getStatus().getChildren();
                if (children.length == 1
                        && children[0].getCode() == IResourceStatus.OUT_OF_SYNC_LOCAL) {
                    if (forceOutOfSyncDelete) {
                        resourceToDelete.delete(IResource.KEEP_HISTORY
                                | IResource.FORCE, monitor);