Community
Participate
Working Groups
Using Windows Vista Ultimate version and Eclipse build I20061129-1340, I20061205-1200. Create a new workpsace and check-out following projects in it: - org.eclipse.jdt.core - org.eclipse.jdt.core.tests.compiler Run JUnit test case org.eclipse.jdt.core.tests.compiler.regression.TestAll. After a while you got several errors NPE, FileNotFoundException (Access Denied) on some tests (I'll attach an example of these failures)... Note that if you run the failing JUnit tests case classes individually, you cannot reproduce these failures. Running whole tests again do not produce exactly same errors but similar ones... I've run these tests using different VMs: + Sun: 1.4.2_13-b06, 1.5.0_10-b02, 1.6.0-rc-b104 + IBM: build 1.4.2, J2RE 1.4.2 IBM Windows 32 build cn142-20040828 (JIT enabled: jitc)
Unfortunately my Vista box just crashed :-( and so, I won't be able to attach failures I got with all these VMs...
Created attachment 55152 [details] Patch to reduce the number of errors Fortunately, I saved my patches on my thinkpad... :-) This patch retries the operation when directory/file creation/deletion failed for an unknown reason and also prints log in console when it happens. I succeeded to pass all JDT/Core tests (and so compiler ones) without any error with this patch (but it happens only once!). I have some other patches to test variations on these changes but unfortunately I cannot get any interesting conclusions before my box was broken...
Created attachment 55199 [details] Failures while running tests Hopefully, my Vista box magically restarts this morning and I retrieved my logs... :-) There are 4 files in this zip each one contains failures list while running tests with different VMs. You can see that if these failures are similar, they are not exactly the same ones...
Created attachment 55967 [details] Proposed patch for 3.3 With this patch I do not get any failures while running JDT/Core tests without any change in org.eclipse.jdt.core project, but only in org.eclipse.jdt.core.tests.* ones... To summarize: tests do not use any longer java.io.File.delete() directly but org.eclipse.jdt.core.tests.util.Util.delete(File) instead. This method _systematically_ verifies that file has been *really* deleted from file system before returns. In case not, it waits and retry to delete if the file exists while 10 seconds maximum. Note that when this happens, debug information may be available in console if tracing has been activated on org.eclipse.jdt.core.tests plugin. Also maximum time to wait before give up while deleting may be changed from 1 second to 1 minute using the debug/delete/wait value in this plugin .options file...
Released for 3.3 M5 in HEAD stream.
Need also to be fixed in R3_2_maintenance stream
Created attachment 55972 [details] Proposed patch for 3.2.2
Released for 3.2.2 in R3_2_maintenance stream.
Sorry for offtopic, does comment 4 mean, that anybody who uses java.io.File.delete() on Vista, MUST verify & then retry delete()? Is it caused by new bug/feature of Vista, some kind of "delayed/async" delete?
(In reply to comment #9) > Sorry for offtopic, does comment 4 mean, that anybody who uses > java.io.File.delete() on Vista, MUST verify & then retry delete()? > > Is it caused by new bug/feature of Vista, some kind of "delayed/async" delete? > I'm not a Vista specialist and cannot really answer this question, but using Process Monitor (procmon.exe) while running our tests shows that tons of DELETE PENDING appears rapidly and explains our troubles... The measure I've done showed that most of times, the file really disappear after between 10 and 50ms. So, you'll face this problem if you try to recreate the same file before this delay expired. This test case should not be so common, but may sometime happens - as for us. Note that we currently are the only eclipse component which such problems on Vista... Note also that it may be dependent on test box, but I really had not enough to continue the investigation deeper, only wrote a workaround to be sure our test will ever pass... I did not see any similar issue on Vista forums (but perhaps missed them...), but if you have any other information, they will be welcomed :-)
Verified for 3.2.2 using build M20070112-1200.
Created attachment 62475 [details] Proposed patch for 3.0.2 This patch can be applied on top of R3_0_2
(In reply to comment #12) > Created an attachment (id=62475) [details] > Proposed patch for 3.0.2 > > This patch can be applied on top of R3_0_2 > This patch has been released in R3_0_2_patches branch which has been versionned as v_454a_R30x.
(In reply to comment #12) > Created an attachment (id=62475) [details] > Proposed patch for 3.0.2 > > This patch can be applied on top of R3_0_2 > This patch has been also released in R3_0_maintenance stream.
Created attachment 62679 [details] Proposed patch for 3.1.2 R3_1_2_patches branch has been created, patch released in this branch and versionned as v_585a_R312x. Patch also released in R3_1_maintenance stream.