Bug 240286 - Problems encountered while deleting resources
Summary: Problems encountered while deleting resources
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4.1   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: test
Depends on:
Blocks:
 
Reported: 2008-07-10 03:25 EDT by Dani Megert CLA
Modified: 2008-08-14 09:41 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dani Megert CLA 2008-07-10 03:25:24 EDT
M20080709-0800.
http://download.eclipse.org/eclipse/downloads/drops/M20080709-0800/testresults/html/org.eclipse.jdt.ui.tests_win32.win32.x86_5.0.html

JDT UI did not contribute any code to 3.4.x yet but now for the very first time we got JME on org.eclipse.jdt.core.ISourceManipulation.delete(boolean, IProgressMonitor) on one of our tests:
http://download.eclipse.org/eclipse/downloads/drops/M20080709-0800/testresults/html/org.eclipse.jdt.ui.tests_win32.win32.x86_5.0.html

At other places in our tests we protected deletion code by retrying several times but so far it was not needed for this test. Can JDT Core check their latest contributions to 3.4.x regarding longer locking of resources or changes to the delete code? If nothing suspicious is found, please move back to JDT UI, so that we can fix it on our side.



Problems encountered while deleting resources.

Java Model Exception: Core Exception [code 273] Problems encountered while deleting resources.
at org.eclipse.jdt.internal.core.MultiOperation.processElements(MultiOperation.java:175)
at org.eclipse.jdt.internal.core.MultiOperation.executeOperation(MultiOperation.java:90)
at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:709)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1800)
at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:775)
at org.eclipse.jdt.internal.core.JavaModel.delete(JavaModel.java:135)
at org.eclipse.jdt.internal.core.CompilationUnit.delete(CompilationUnit.java:457)
at org.eclipse.jdt.ui.tests.core.source.GenerateHashCodeEqualsTest.testInsertAt(GenerateHashCodeEqualsTest.java:1352)
at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
at junit.extensions.TestSetup.run(TestSetup.java:25)
at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
at junit.extensions.TestSetup.run(TestSetup.java:25)
at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
at junit.extensions.TestSetup.run(TestSetup.java:25)
at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
at junit.extensions.TestSetup.run(TestSetup.java:25)
at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:354)
at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:206)
at org.eclipse.test.UITestApplication$3.run(UITestApplication.java:195)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:133)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3800)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3425)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2382)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2198)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:488)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
at org.eclipse.test.UITestApplication.runApplication(UITestApplication.java:138)
at org.eclipse.test.UITestApplication.run(UITestApplication.java:60)
at org.eclipse.test.UITestApplication.start(UITestApplication.java:210)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:382)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
at org.eclipse.equinox.launcher.Main.main(Main.java:1212)
at org.eclipse.core.launcher.Main.main(Main.java:30)
Caused by: org.eclipse.core.internal.resources.ResourceException: Problems encountered while deleting resources.
at org.eclipse.core.internal.resources.Resource.delete(Resource.java:719)
at org.eclipse.jdt.internal.core.JavaModelOperation.deleteResource(JavaModelOperation.java:327)
at org.eclipse.jdt.internal.core.DeleteResourceElementsOperation.processElement(DeleteResourceElementsOperation.java:107)
at org.eclipse.jdt.internal.core.MultiOperation.processElements(MultiOperation.java:163)
Caused by: org.eclipse.core.internal.resources.ResourceException: Problems encountered while deleting resources.
at org.eclipse.core.internal.resources.Resource.delete(Resource.java:719)
at org.eclipse.jdt.internal.core.JavaModelOperation.deleteResource(JavaModelOperation.java:327)
at org.eclipse.jdt.internal.core.DeleteResourceElementsOperation.processElement(DeleteResourceElementsOperation.java:107)
at org.eclipse.jdt.internal.core.MultiOperation.processElements(MultiOperation.java:163)
at org.eclipse.jdt.internal.core.MultiOperation.executeOperation(MultiOperation.java:90)
at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:709)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1800)
at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:775)
at org.eclipse.jdt.internal.core.JavaModel.delete(JavaModel.java:135)
at org.eclipse.jdt.internal.core.CompilationUnit.delete(CompilationUnit.java:457)
at org.eclipse.jdt.ui.tests.core.source.GenerateHashCodeEqualsTest.testInsertAt(GenerateHashCodeEqualsTest.java:1352)
at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
at junit.extensions.TestSetup.run(TestSetup.java:25)
at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
at junit.extensions.TestSetup.run(TestSetup.java:25)
at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
at junit.extensions.TestSetup.run(TestSetup.java:25)
at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
at junit.extensions.TestSetup.run(TestSetup.java:25)
at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:354)
at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:206)
at org.eclipse.test.UITestApplication$3.run(UITestApplication.java:195)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:133)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3800)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3425)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2382)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2198)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:488)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
at org.eclipse.test.UITestApplication.runApplication(UITestApplication.java:138)
at org.eclipse.test.UITestApplication.run(UITestApplication.java:60)
at org.eclipse.test.UITestApplication.start(UITestApplication.java:210)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:382)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
at org.eclipse.equinox.launcher.Main.main(Main.java:1212)
at org.eclipse.core.launcher.Main.main(Main.java:30)
Contains: Could not delete 'C:\buildtest\M20080709-0800\eclipse-testing\test-eclipse\eclipse\jdt_folder\DummyProject\src\p\A.java'.
Comment 1 Frederic Fusier CLA 2008-07-10 08:47:49 EDT
I cannot see one of the changes of the JavaModel done in R3_4_maintenance which could explain this failure:
- bug 235778: Potential race condition while resolving classpath
- bug 222665: CCE while computing non Java resources
- 2 other bugs around binding keys
...but of course, I may be wrong.

So, the best thing to do until Jerome comes back from vacations is to make the test safe and retry if the resource is not deleted.

Note that all JDT/Core tests files/directories deletions are done using utils method retrying until the resources are really deleted. So, I'm not sure there's really something to do on our side for this kind of issue, but Jerome will confirm or infirm this assumption...
Comment 2 Dani Megert CLA 2008-07-10 08:59:08 EDT
Good. Just wanted to be sure as this happened in 3.4.x stream. We've added the panic code on our side for 3.4.1. Please close once Jérome confirmed this.
Comment 3 Jerome Lanneluc CLA 2008-08-14 06:55:51 EDT
Correct. One cannot assume that a delete or a move will always succeed (many reasons can explain the failure to delete/move, the most common being another thread holding a lock on the resource, e.g. the indexer).
Retrying is the best to do in a test suite.
Moving to JDT/UI to dispose.
Comment 4 Dani Megert CLA 2008-08-14 09:40:43 EDT
Got fixed a while ago for 3.5 and 3.4.1.
Comment 5 Dani Megert CLA 2008-08-14 09:41:27 EDT
Verified in code of M20080813-0800.