Bug 403309 - Test failure: CVSMergeSubscriberTest#testLocalScrub
Summary: Test failure: CVSMergeSubscriberTest#testLocalScrub
Status: RESOLVED WORKSFORME
Alias: None
Product: Platform
Classification: Eclipse Project
Component: CVS (show other bugs)
Version: 4.3   Edit
Hardware: All All
: P3 minor (vote)
Target Milestone: 4.4 M6   Edit
Assignee: Szymon Ptaszkiewicz CLA
QA Contact:
URL:
Whiteboard:
Keywords: investigate, test
: 403308 (view as bug list)
Depends on: 407162
Blocks:
  Show dependency tree
 
Reported: 2013-03-14 06:16 EDT by Malgorzata Janczarska CLA
Modified: 2014-03-05 08:35 EST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Malgorzata Janczarska CLA 2013-03-14 06:16:26 EDT
Problems encountered while deleting resources. 

org.eclipse.core.internal.resources.ResourceException: Problems encountered while deleting resources.
at org.eclipse.core.internal.resources.Resource.delete(Resource.java:816)
at org.eclipse.core.internal.resources.Resource.delete(Resource.java:769)
at org.eclipse.team.tests.ccvs.core.subscriber.CVSMergeSubscriberTest.testLocalScrub(CVSMergeSubscriberTest.java:352)
at org.eclipse.team.tests.ccvs.core.EclipseTest.runTest(EclipseTest.java:1448)
at org.eclipse.team.tests.ccvs.core.EclipseTest.runBare(EclipseTest.java:1295)
at junit.extensions.TestDecorator.basicRun(TestDecorator.java:23)
at junit.extensions.TestSetup$1.protect(TestSetup.java:23)
at junit.extensions.TestSetup.run(TestSetup.java:27)
at junit.extensions.TestDecorator.basicRun(TestDecorator.java:23)
at junit.extensions.TestSetup$1.protect(TestSetup.java:23)
at junit.extensions.TestSetup.run(TestSetup.java:27)
at junit.extensions.TestDecorator.basicRun(TestDecorator.java:23)
at junit.extensions.TestSetup$1.protect(TestSetup.java:23)
at junit.extensions.TestSetup.run(TestSetup.java:27)
at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:655)
at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:310)
at org.eclipse.test.UITestApplication$2.run(UITestApplication.java:197)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4145)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3762)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1108)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:992)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:137)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:600)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:555)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
at org.eclipse.test.UITestApplication.runApplication(UITestApplication.java:140)
at org.eclipse.test.UITestApplication.run(UITestApplication.java:62)
at org.eclipse.test.UITestApplication.start(UITestApplication.java:212)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
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:354)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
at org.eclipse.core.launcher.Main.main(Main.java:34)
Contains: Could not delete 'C:\hb\workspace\ep4-unit-win32\workarea\I20130313-2000\eclipse-testing\test-eclipse\eclipse\cvs_sniff_folder\testLocalScrub-1363241317646\file2.txt'.
org.eclipse.core.runtime.CoreException: Problems encountered while deleting files.
at org.eclipse.core.internal.filesystem.local.LocalFile.delete(LocalFile.java:131)
at org.eclipse.core.internal.resources.ResourceTree.internalDeleteFile(ResourceTree.java:304)
at org.eclipse.core.internal.resources.ResourceTree.standardDeleteFile(ResourceTree.java:785)
at org.eclipse.team.internal.ccvs.core.util.MoveDeleteHook$1.run(MoveDeleteHook.java:62)
at org.eclipse.team.internal.ccvs.core.resources.EclipseSynchronizer.performMoveDelete(EclipseSynchronizer.java:1704)
at org.eclipse.team.internal.ccvs.core.util.MoveDeleteHook.deleteFile(MoveDeleteHook.java:57)
at org.eclipse.team.internal.core.MoveDeleteManager.deleteFile(MoveDeleteManager.java:50)
at org.eclipse.core.internal.resources.Resource.unprotectedDelete(Resource.java:1972)
at org.eclipse.core.internal.resources.Resource.delete(Resource.java:803)
at org.eclipse.core.internal.resources.Resource.delete(Resource.java:769)
at org.eclipse.team.tests.ccvs.core.subscriber.CVSMergeSubscriberTest.testLocalScrub(CVSMergeSubscriberTest.java:352)
at org.eclipse.team.tests.ccvs.core.EclipseTest.runTest(EclipseTest.java:1448)
at org.eclipse.team.tests.ccvs.core.EclipseTest.runBare(EclipseTest.java:1295)
at junit.extensions.TestDecorator.basicRun(TestDecorator.java:23)
at junit.extensions.TestSetup$1.protect(TestSetup.java:23)
at junit.extensions.TestSetup.run(TestSetup.java:27)
at junit.extensions.TestDecorator.basicRun(TestDecorator.java:23)
at junit.extensions.TestSetup$1.protect(TestSetup.java:23)
at junit.extensions.TestSetup.run(TestSetup.java:27)
at junit.extensions.TestDecorator.basicRun(TestDecorator.java:23)
at junit.extensions.TestSetup$1.protect(TestSetup.java:23)
at junit.extensions.TestSetup.run(TestSetup.java:27)
at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:655)
at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:310)
at org.eclipse.test.UITestApplication$2.run(UITestApplication.java:197)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4145)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3762)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1108)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:992)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:137)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:600)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:555)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
at org.eclipse.test.UITestApplication.runApplication(UITestApplication.java:140)
at org.eclipse.test.UITestApplication.run(UITestApplication.java:62)
at org.eclipse.test.UITestApplication.start(UITestApplication.java:212)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
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:354)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
at org.eclipse.core.launcher.Main.main(Main.java:34)
Contains: Could not delete: C:\hb\workspace\ep4-unit-win32\workarea\I20130313-2000\eclipse-testing\test-eclipse\eclipse\cvs_sniff_folder\testLocalScrub-1363241317646\file2.txt.
Comment 1 Malgorzata Janczarska CLA 2013-03-14 06:24:31 EDT
*** Bug 403308 has been marked as a duplicate of this bug. ***
Comment 2 Malgorzata Janczarska CLA 2013-03-14 06:29:26 EDT
Looks like resources cannot be deleted. Let's see if deleting force will help.
Comment 3 Dani Megert CLA 2013-03-21 04:20:24 EDT
(In reply to comment #2)
> Looks like resources cannot be deleted. Let's see if deleting force will
> help.

Did you already make that change? If so, it did not help:
http://download.eclipse.org/eclipse/downloads/drops4/N20130320-2000/testresults/html/org.eclipse.team.tests.cvs.core_win32.win32.x86_7.0.html
Comment 4 Malgorzata Janczarska CLA 2013-03-21 04:44:22 EDT
(In reply to comment #3)
> (In reply to comment #2)
> > Looks like resources cannot be deleted. Let's see if deleting force will
> > help.
> 
> Did you already make that change?

Unfortunately yes. This bug will require some more debugging to see what's holding the file.
Comment 5 Malgorzata Janczarska CLA 2013-03-29 05:46:36 EDT
(In reply to comment #4)
> Unfortunately yes. This bug will require some more debugging to see what's holding the file.
I did not manage to reproduce it on my local machine despite running it in a loop 1000 times overnight. The file that causes problems is created in this test, so I ruled out the the possibility that some process from previous tests is holding it. In case there is something outside of Eclipse messing with this file I added a project refresh.
Comment 8 Dani Megert CLA 2013-05-01 04:20:24 EDT
Fixed with http://git.eclipse.org/c/platform/eclipse.platform.team.git/commit/?id=688c909262be4125519f167e1ce5b5d99ddca0f2

Let's see whether this fixes the issue.
Comment 9 Dani Megert CLA 2013-05-02 05:10:05 EDT
(In reply to comment #8)
> Fixed with
> http://git.eclipse.org/c/platform/eclipse.platform.team.git/commit/
> ?id=688c909262be4125519f167e1ce5b5d99ddca0f2
> 
> Let's see whether this fixes the issue.

This did not help either :-(.
Comment 10 Dani Megert CLA 2013-05-03 08:28:12 EDT
To rule out file clashes, I renamed 'file2.txt' to 'works.txt'. Let's see how this goes. Plus, we log all properties to the console.

In addition, I requested to install a utility that detects who locks a file (see bug 407162).
Comment 11 Dani Megert CLA 2013-05-06 03:52:22 EDT
(In reply to comment #10)
> To rule out file clashes, I renamed 'file2.txt' to 'works.txt'. Let's see
> how this goes. Plus, we log all properties to the console.

This did the trick and indicates, that there's some collision with a previously running test.

We can investigate further once bug 407162 is fixed.
Comment 12 Dani Megert CLA 2013-05-06 05:36:28 EDT
(In reply to comment #11)
> (In reply to comment #10)
> > To rule out file clashes, I renamed 'file2.txt' to 'works.txt'. Let's see
> > how this goes. Plus, we log all properties to the console.
> 
> This did the trick and indicates, that there's some collision with a
> previously running test.

Oh boy! It failed again. Increased the max retry count. Let's see...
Comment 13 Malgorzata Janczarska CLA 2013-05-06 06:06:57 EDT
(In reply to comment #11)
> This did the trick and indicates, that there's some collision with a
> previously running test.

This file is created in the first lines of this test. How can it locked by a previous test?
Comment 14 Dani Megert CLA 2013-05-06 06:09:05 EDT
(In reply to comment #13)
> (In reply to comment #11)
> > This did the trick and indicates, that there's some collision with a
> > previously running test.
> 
> This file is created in the first lines of this test. How can it locked by a
> previous test?

It could be some cache that only works on the name (not path), like e.g. a decorator. But, as we can see, it did not do the trick :-(.
Comment 15 Dani Megert CLA 2013-05-13 05:50:32 EDT
(In reply to comment #12)
> (In reply to comment #11)
> > (In reply to comment #10)
> > > To rule out file clashes, I renamed 'file2.txt' to 'works.txt'. Let's see
> > > how this goes. Plus, we log all properties to the console.
> > 
> > This did the trick and indicates, that there's some collision with a
> > previously running test.
> 
> Oh boy! It failed again. Increased the max retry count. Let's see...

Finally! The test is now no longer failing.

I've now reduced the retry count again, to see whether it was actually the changes made in bug 407162 comment 5 that did the trick.
Comment 16 Dani Megert CLA 2013-05-14 08:01:24 EDT
(In reply to comment #15)
> I've now reduced the retry count again, to see whether it was actually the
> changes made in bug 407162 comment 5 that did the trick.

The test still passes fine and there is no message in the .log about deletion failures.
Comment 17 Dani Megert CLA 2013-05-17 08:45:40 EDT
(In reply to comment #16)
> (In reply to comment #15)
> > I've now reduced the retry count again, to see whether it was actually the
> > changes made in bug 407162 comment 5 that did the trick.
> 
> The test still passes fine and there is no message in the .log about
> deletion failures.

And here we go again:
http://download.eclipse.org/eclipse/downloads/drops4/I20130516-2200/testresults/html/org.eclipse.team.tests.cvs.core_win32.win32.x86_7.0.html

I've asked in bug 407162 whether there's still only on executor. If so, I'll have to increase the count again :-(.
Comment 18 Dani Megert CLA 2013-05-22 03:27:23 EDT
(In reply to comment #17)
> (In reply to comment #16)
> > (In reply to comment #15)
> > > I've now reduced the retry count again, to see whether it was actually the
> > > changes made in bug 407162 comment 5 that did the trick.
> > 
> > The test still passes fine and there is no message in the .log about
> > deletion failures.
> 
> And here we go again:
> http://download.eclipse.org/eclipse/downloads/drops4/I20130516-2200/
> testresults/html/org.eclipse.team.tests.cvs.core_win32.win32.x86_7.0.html
> 
> I've asked in bug 407162 whether there's still only on executor. If so, I'll
> have to increase the count again :-(.

There's still only one executor, hence increased the retry count again.
Comment 19 Thanh Ha CLA 2013-05-22 10:19:43 EDT
(In reply to comment #5)
> (In reply to comment #4)
> > Unfortunately yes. This bug will require some more debugging to see what's holding the file.
> I did not manage to reproduce it on my local machine despite running it in a
> loop 1000 times overnight. The file that causes problems is created in this
> test, so I ruled out the the possibility that some process from previous
> tests is holding it. In case there is something outside of Eclipse messing
> with this file I added a project refresh.

Don't know if it matters but when you ran your local machine tests were you a privileged user?

The hudsonbuild user is unprivileged on the windows slave.


I'd like to clone this test and see if I can reproduce it. Which test is this on Hudson?
Comment 20 Dani Megert CLA 2013-05-22 10:29:34 EDT
(In reply to comment #19)
> Don't know if it matters but when you ran your local machine tests were you
> a privileged user?

Yes.

> I'd like to clone this test and see if I can reproduce it. Which test is
> this on Hudson?

Not sure which one it is on hudson, but in Git it in:
http://git.eclipse.org/c/platform/eclipse.platform.team.git/tree/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/CVSMergeSubscriberTest.java

However, running just the test might not work due to the missing setup around it.

David, do you have the pointer to the test on Hudson?
Comment 21 Thanh Ha CLA 2013-05-22 11:05:03 EDT
I think I found it if I'm not incorrect it's the ep4-unit-win32 job on Hudson?

https://hudson.eclipse.org/hudson/job/ep4-unit-win32


and if I understand the test correctly, the test failure doesn't cause the Hudson Job to fail?

(I ask because it seems to me Hudson says the job ran successfully the past several times)
Comment 22 Dani Megert CLA 2013-05-22 11:15:50 EDT
(In reply to comment #21)
> I think I found it if I'm not incorrect it's the ep4-unit-win32 job on
> Hudson?
> 
> https://hudson.eclipse.org/hudson/job/ep4-unit-win32
> 
> 
> and if I understand the test correctly, the test failure doesn't cause the
> Hudson Job to fail?

Correct, the problem we try to solve is the following test failure:

https://hudson.eclipse.org/hudson/job/ep4-unit-win32/lastCompletedBuild/testReport/org.eclipse.team.tests.ccvs.core.subscriber/CVSMergeSubscriberTest/testLocalScrub/
Comment 23 Malgorzata Janczarska CLA 2013-05-23 07:59:19 EDT
(In reply to comment #19)
> Don't know if it matters but when you ran your local machine tests were you
> a privileged user?

Yes, I was a privileged user on Windows.
Comment 24 Dani Megert CLA 2014-01-29 03:24:26 EST
The test was passing for quite a while now. But now it failed again:

http://download.eclipse.org/eclipse/downloads/drops4/I20140128-0800/testresults/html/org.eclipse.team.tests.cvs.core_macosx.cocoa.x86_5.0.html

The following warnings were reported while performing the "cvs commit" command.

org.eclipse.team.internal.ccvs.core.CVSException: The following warnings were reported while performing the "cvs commit" command.
at org.eclipse.team.internal.ccvs.ui.operations.CVSOperation.asException(CVSOperation.java:157)
at org.eclipse.team.internal.ccvs.ui.operations.CVSOperation.handleErrors(CVSOperation.java:200)
at org.eclipse.team.internal.ccvs.ui.operations.CVSOperation.endOperation(CVSOperation.java:95)
at org.eclipse.team.internal.ccvs.ui.operations.RepositoryProviderOperation.endOperation(RepositoryProviderOperation.java:218)
at org.eclipse.team.internal.ccvs.ui.operations.CVSOperation.run(CVSOperation.java:80)
at org.eclipse.team.tests.ccvs.core.EclipseRunnable.run(EclipseRunnable.java:30)
at java.lang.Thread.run(Thread.java:724)
Contains: The modification timestamp was changed for '/testLocalScrub-1390933236027/file1.txt' but the contents match that of the server. The timestamp has been reset.
Contains: The modification timestamp was changed for '/testLocalScrub-1390933236027/works.txt' but the contents match that of the server. The timestamp has been reset.
Comment 27 Dani Megert CLA 2014-02-04 11:15:21 EST
(In reply to Szymon Ptaszkiewicz from comment #26)
> Failed again:
> 
> http://download.eclipse.org/eclipse/downloads/drops4/N20140203-2000/
> testresults/html/org.eclipse.team.tests.cvs.core_macosx.cocoa.x86_5.0.html

Szymon, would you have time to look into this? It could be related to this change:
http://git.eclipse.org/c/platform/eclipse.platform.team.git/commit/?id=14a32ee6d3f278e07227201d038fc9a10e214dd0
Comment 28 Szymon Ptaszkiewicz CLA 2014-02-04 11:55:24 EST
(In reply to Dani Megert from comment #27)
> (In reply to Szymon Ptaszkiewicz from comment #26)
> > Failed again:
> > 
> > http://download.eclipse.org/eclipse/downloads/drops4/N20140203-2000/
> > testresults/html/org.eclipse.team.tests.cvs.core_macosx.cocoa.x86_5.0.html
> 
> Szymon, would you have time to look into this? It could be related to this
> change:
> http://git.eclipse.org/c/platform/eclipse.platform.team.git/commit/
> ?id=14a32ee6d3f278e07227201d038fc9a10e214dd0

I will look at it.
Comment 29 Dani Megert CLA 2014-02-05 03:39:24 EST
All CVS tests passed in N20140204-2000. Looks like there was something wrong on the test machine that caused this.
Comment 30 Szymon Ptaszkiewicz CLA 2014-02-06 04:26:00 EST
Failed again in N20140205-2000 and again only Mac.
Comment 31 Szymon Ptaszkiewicz CLA 2014-02-06 04:35:28 EST
(In reply to Szymon Ptaszkiewicz from comment #30)
> Failed again in N20140205-2000 and again only Mac.

And also in M20140205-0800 only Mac.
Comment 32 Dani Megert CLA 2014-02-10 04:47:34 EST
Both, failed and passed again in the past days. We should stabilize or remove that noisy test.
Comment 33 Szymon Ptaszkiewicz CLA 2014-02-10 04:52:41 EST
Interesting thing is that it fails only on Mac recently. David, were there any changes on the Mac machine that could cause this?
Comment 34 Szymon Ptaszkiewicz CLA 2014-03-05 08:28:16 EST
Failures that started in comment 24 happened only on Mac and never on any other machine. I have been observing test results and for the past month this test consistently passes. Marking FIXED since there is nothing more to do now.

The failure from comment 24 is different than the original one in comment 0, so in case the test fails again in future, we should open a separate bug to track it since the original problem is fixed.
Comment 35 Szymon Ptaszkiewicz CLA 2014-03-05 08:35:59 EST
Actually, WORKSFORME is better because there was no change to "fix" it.