apache / lucene

Apache Lucene open-source search software
https://lucene.apache.org/
Apache License 2.0
2.63k stars 1.02k forks source link

TestDirectIODirectory fails on Windows Server 2019 [LUCENE-10169] #11206

Open asfimport opened 3 years ago

asfimport commented 3 years ago

This is actually a reproducible error - took advantage of Apache's MSDN licenses and installed a virtualbox-hosted Windows Server 2019. The test does fail all the time there with exactly the same assertions as in #11204.


Migrated from LUCENE-10169 by Dawid Weiss (@dweiss) Linked issues:

asfimport commented 3 years ago

Dawid Weiss (@dweiss) (migrated from JIRA)

I added Windows and MacOS to the job matrix but this results in odd errors, like this one from Windows Server 2019:

org.apache.lucene.misc.store.TestDirectIODirectory > testDeleteFile FAILED
344    java.lang.AssertionError
345        at __randomizedtesting.SeedInfo.seed([7EC297CB9412B507:155080758322F0EC]:0)
346        at org.junit.Assert.fail(Assert.java:87)
347        at org.junit.Assert.assertTrue(Assert.java:42)
348        at org.junit.Assert.assertFalse(Assert.java:65)
349        at org.junit.Assert.assertFalse(Assert.java:75)
350        at org.apache.lucene.store.BaseDirectoryTestCase.testDeleteFile(BaseDirectoryTestCase.java:123) 

or:

org.apache.lucene.misc.store.TestDirectIODirectory > testCreateOutputForExistingFile FAILED
392    java.nio.file.AccessDeniedException: D:\a\lucene\lucene\lucene\misc\build\tmp\tests-tmp\lucene.misc.store.TestDirectIODirectory_7EC297CB9412B507-001\tempDir-005\file
393        at __randomizedtesting.SeedInfo.seed([7EC297CB9412B507:F43630B8F8DD222E]:0)
394        at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:89)
395        at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
396        at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108)
397        at java.base/sun.nio.fs.WindowsFileSystemProvider.newFileChannel(WindowsFileSystemProvider.java:120)
398        at org.apache.lucene.mockfile.FilterFileSystemProvider.newFileChannel(FilterFileSystemProvider.java:200)
399        at org.apache.lucene.mockfile.DisableFsyncFS.newFileChannel(DisableFsyncFS.java:44)
400        at org.apache.lucene.mockfile.FilterFileSystemProvider.newFileChannel(FilterFileSystemProvider.java:200)
401        at org.apache.lucene.mockfile.HandleTrackingFS.newFileChannel(HandleTrackingFS.java:171)
402        at org.apache.lucene.mockfile.HandleTrackingFS.newFileChannel(HandleTrackingFS.java:171)
403        at org.apache.lucene.mockfile.FilterFileSystemProvider.newFileChannel(FilterFileSystemProvider.java:200)
404        at java.base/java.nio.channels.FileChannel.open(FileChannel.java:292)
405        at java.base/java.nio.channels.FileChannel.open(FileChannel.java:345)
406        at org.apache.lucene.misc.store.DirectIODirectory$DirectIOIndexOutput.<init>(DirectIODirectory.java:220)
407        at org.apache.lucene.misc.store.DirectIODirectory.createOutput(DirectIODirectory.java:179)
408        at org.apache.lucene.store.BaseDirectoryTestCase.testCreateOutputForExistingFile(BaseDirectoryTestCase.java:1217) 

These don't reproduce for me on Windows 10. 

asfimport commented 3 years ago

Dawid Weiss (@dweiss) (migrated from JIRA)

Uwe, what do you think we should do? :)