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
IDEWorkbenchMessages.DeleteResourceAction_readOnlyQuestion);
        checker.setIgnoreLinkedResources(true);
        return checker.checkReadOnlyResources(resources);
    }
    /**
     * The <code>DeleteResourceAction</code> implementation of this
     * <code>SelectionListenerAction</code> method disables the action
     * if the selection contains phantom resources or non-resources
     */
    protected boolean updateSelection(IStructuredSelection selection) {
        return super.updateSelection(selection)
                && canDelete(getSelectedResourcesArray());
    }
    /**
     * Ask the user whether the given resource should be deleted
     * despite being out of sync with the file system.
     * @param resource the out of sync resource
     * @return One of the IDialogConstants constants indicating which
     * 	of the Yes, Yes to All, No, Cancel options has been selected by 
     * 	the user.
     */
    private int queryDeleteOutOfSync(IResource resource) {
        final MessageDialog dialog = new MessageDialog(
                shell,
                IDEWorkbenchMessages.DeleteResourceAction_messageTitle,
                null,
                NLS.bind(IDEWorkbenchMessages.DeleteResourceAction_outOfSyncQuestion, resource.getName()),
                MessageDialog.QUESTION, new String[] {
                        IDialogConstants.YES_LABEL,
                        IDialogConstants.YES_TO_ALL_LABEL,