You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2022/11/11 13:41:40 UTC
[GitHub] [lucene] LuXugang opened a new issue, #11920: Test testDeleteUnusedFiles() failed in TestIndexWriter
LuXugang opened a new issue, #11920:
URL: https://github.com/apache/lucene/issues/11920
### Description
Hi, when I try to run `./gradlew check` on my new PC (Windows11), I got this failure below:
> java.lang.AssertionError
> at __randomizedtesting.SeedInfo.seed([AA29B0F0EB295A9A:151FE27F8371F775]:0)
> at org.junit.Assert.fail(Assert.java:87)
> at org.junit.Assert.assertTrue(Assert.java:42)
> at org.junit.Assert.assertTrue(Assert.java:53)
> at org.apache.lucene.index.TestIndexWriter.testDeleteUnusedFiles(TestIndexWriter.java:1334)
> at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
> at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.base/java.lang.reflect.Method.invoke(Method.java:568)
> at com.carrotsearch.randomizedtesting.RandomizedRunner.invoke(RandomizedRunner.java:1758)
> at com.carrotsearch.randomizedtesting.RandomizedRunner$8.evaluate(RandomizedRunner.java:946)
> at com.carrotsearch.randomizedtesting.RandomizedRunner$9.evaluate(RandomizedRunner.java:982)
> at com.carrotsearch.randomizedtesting.RandomizedRunner$10.evaluate(RandomizedRunner.java:996)
> at org.apache.lucene.tests.util.TestRuleSetupTeardownChained$1.evaluate(TestRuleSetupTeardownChained.java:48)
> at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
> at org.apache.lucene.tests.util.TestRuleThreadAndTestName$1.evaluate(TestRuleThreadAndTestName.java:45)
> at org.apache.lucene.tests.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:60)
> at org.apache.lucene.tests.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:44)
> at org.junit.rules.RunRules.evaluate(RunRules.java:20)
> at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
> at com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:390)
> at com.carrotsearch.randomizedtesting.ThreadLeakControl.forkTimeoutingTask(ThreadLeakControl.java:843)
> at com.carrotsearch.randomizedtesting.ThreadLeakControl$3.evaluate(ThreadLeakControl.java:490)
> at com.carrotsearch.randomizedtesting.RandomizedRunner.runSingleTest(RandomizedRunner.java:955)
> at com.carrotsearch.randomizedtesting.RandomizedRunner$5.evaluate(RandomizedRunner.java:840)
> at com.carrotsearch.randomizedtesting.RandomizedRunner$6.evaluate(RandomizedRunner.java:891)
> at com.carrotsearch.randomizedtesting.RandomizedRunner$7.evaluate(RandomizedRunner.java:902)
> at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
> at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
> at org.apache.lucene.tests.util.TestRuleStoreClassName$1.evaluate(TestRuleStoreClassName.java:38)
> at com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40)
> at com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40)
> at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
> at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
> at org.apache.lucene.tests.util.TestRuleAssertionsRequired$1.evaluate(TestRuleAssertionsRequired.java:53)
> at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
> at org.apache.lucene.tests.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:44)
> at org.apache.lucene.tests.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:60)
> at org.apache.lucene.tests.util.TestRuleIgnoreTestSuites$1.evaluate(TestRuleIgnoreTestSuites.java:47)
> at org.junit.rules.RunRules.evaluate(RunRules.java:20)
> at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
> at com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:390)
> at com.carrotsearch.randomizedtesting.ThreadLeakControl.lambda$forkTimeoutingTask$0(ThreadLeakControl.java:850)
> at java.base/java.lang.Thread.run(Thread.java:833)
2> NOTE: reproduce with: gradlew test --tests TestIndexWriter.testDeleteUnusedFiles -Dtests.seed=AA29B0F0EB295A9A -Dtests.locale=zh-Hans-SG -Dtests.timezone=Europe/Gibraltar -Dtests.asserts=true -Dtests.file.encoding=UTF-8
2> NOTE: leaving temporary files on disk at: C:\project\lucene\lucene_candidate\lucene\core\build\tmp\tests-tmp\lucene.index.TestIndexWriter_AA29B0F0EB295A9A-001
2> NOTE: test params are: codec=Asserting(Lucene94): {=BlockTreeOrds(blocksize=128), a=PostingsFormat(name=Direct), c=TestBloomFilteredLucenePostings(BloomFilteringPostingsFormat(Lucene90)), string=TestBloomFilteredLucenePostings(BloomFilteringPostingsFormat(Lucene90)), foo=Lucene90, f1=TestBloomFilteredLucen
ePostings(BloomFilteringPostingsFormat(Lucene90)), f2=BlockTreeOrds(blocksize=128), body=Lucene90, version=BlockTreeOrds(blocksize=128), content=PostingsFormat(name=Direct), str=PostingsFormat(name=Direct), tvtest=BlockTreeOrds(blocksize=128), field=Lucene90, str3=Lucene90, content4=PostingsFormat(name=Direct),
str2=PostingsFormat(name=Direct), content1=BlockTreeOrds(blocksize=128), binary=TestBloomFilteredLucenePostings(BloomFilteringPostingsFormat(Lucene90)), id=TestBloomFilteredLucenePostings(BloomFilteringPostingsFormat(Lucene90)), myfield=Lucene90}, docValues:{binarydv=DocValuesFormat(name=Lucene90), my_deletes=
DocValuesFormat(name=Lucene90), dv_field=DocValuesFormat(name=Asserting), dv=DocValuesFormat(name=Lucene90), sortedsetdv=DocValuesFormat(name=Asserting), sortednumericdv=DocValuesFormat(name=Lucene90), soft_deletes=DocValuesFormat(name=Lucene90), numericdv=DocValuesFormat(name=Asserting), soft_delete=DocValuesF
ormat(name=Lucene90), num=DocValuesFormat(name=Lucene90), sorteddv=DocValuesFormat(name=Lucene90), soft_deletes_1=DocValuesFormat(name=Lucene90)}, maxPointsInLeafNode=62, maxMBSortInHeap=5.7372394908236455, sim=Asserting(RandomSimilarity(queryNorm=false): {=IB SPL-L2, c=IB LL-LZ(0.3), string=DFR I(n)L1, f1=DFR I(n)BZ(0.3), f2=DFR I(n)L1, body=IB LL-L1, content=DFI(ChiSquared), str=DFR I(ne)B1, tvtest=DFR I(ne)BZ(0.3), field=LM Dirichlet(2000.000000), content4=DFR I(n)B1, str2=DFR GL3(800.0), content1=F1EXP, binary=F2LOG, id=DFR I(F)BZ(0.3), myfield=DFR I(F)B3(800.0)}), locale=zh-Hans-SG, timezone=Europe/Gibraltar
2> NOTE: Windows 11 10.0 amd64/Oracle Corporation 17.0.4 (64-bit)/cpus=24,threads=1,free=195910696,total=268435456
2> NOTE: All tests run in this JVM: [TestCachingTokenFilter, TestStandardFactories, TestHighCompressionMode, TestLucene90PostingsFormat, TestPerFieldKnnVectorsFormat, TestFloatRange, TestLatLonPoint, TestManyKnnDocs, TestXYShape, TestSimpleWKTShapeParsing, Test2BPostings, TestApproximatePriorityQueue, TestConsistentFieldNumbers, TestDocInverterPerFieldErrorInfo, TestExceedMaxTermLength, TestFlushByRamOrCountsPolicy, TestIndexWriter]
Util these two `assertTrue` were remove below, I finally got SUCCESSFUL:
<img width="462" alt="11" src="https://user-images.githubusercontent.com/6985548/201351706-1c06ad50-2b54-4e27-a19b-1546158f23eb.png">
By the way, my new PC's performance is so awsome, `./gradlew check` only takes 1m 42s :
<img width="326" alt="22" src="https://user-images.githubusercontent.com/6985548/201351738-4b179f44-c412-484d-bdf5-a7d9ac250eac.png">
### Gradle command to reproduce
gradlew test --tests TestIndexWriter.testDeleteUnusedFiles -Dtests.seed=AA29B0F0EB295A9A -Dtests.locale=zh-Hans-SG -Dtests.timezone=Europe/Gibraltar -Dtests.asserts=true -Dtests.file.encoding=UTF-8
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [I] Test testDeleteUnusedFiles() failed in TestIndexWriter [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on issue #11920:
URL: https://github.com/apache/lucene/issues/11920#issuecomment-2860504381
Hi,
Since Jenkins was updated to Windows 11 every build fails with same message.
My local box is also Windows 11 and fails in same way.
We should fix this. The problem does not appear on Windows 10, only on Windows 11.
Uwe
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [I] Test testDeleteUnusedFiles() failed in TestIndexWriter [lucene]
Posted by "dweiss (via GitHub)" <gi...@apache.org>.
dweiss commented on issue #11920:
URL: https://github.com/apache/lucene/issues/11920#issuecomment-2861906753
> By the way, my new PC's performance is so awsome, ./gradlew check only takes 1m 42s
It also shows that something has gone terribly wrong with gradle... Eh.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [I] Test testDeleteUnusedFiles() failed in TestIndexWriter [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on issue #11920:
URL: https://github.com/apache/lucene/issues/11920#issuecomment-2860543452
I think the problem is that Windows 11 changed semantics and allows to delete open files under some circumstances.
The windows emulation is not enabled on Windows 11 so this test fails. We can either fix the classical Windows emulation to be used also for Windows 11 or disable the test for now.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [I] Test testDeleteUnusedFiles() failed in TestIndexWriter [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler closed issue #11920: Test testDeleteUnusedFiles() failed in TestIndexWriter
URL: https://github.com/apache/lucene/issues/11920
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [I] Test testDeleteUnusedFiles() failed in TestIndexWriter [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on issue #11920:
URL: https://github.com/apache/lucene/issues/11920#issuecomment-2862905437
Fixed. The issue was that file keys are optional in the java file attributes.
Adding a fallback to the path makes WindowsFS also work on Windows so we can apply WindowsFS also for Windows to add back legacy behaviour of previous windows versions.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [I] Test testDeleteUnusedFiles() failed in TestIndexWriter [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on issue #11920:
URL: https://github.com/apache/lucene/issues/11920#issuecomment-2860592088
On GitHub it does not fail as "windows-latedt" Tag is Windows Server 2022, which is basically Windows 10 kernel.
To reproduce on GitHub we need to change job config to use windiws-2024 runner.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [I] Test testDeleteUnusedFiles() failed in TestIndexWriter [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler closed issue #11920: Test testDeleteUnusedFiles() failed in TestIndexWriter
URL: https://github.com/apache/lucene/issues/11920
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [I] Test testDeleteUnusedFiles() failed in TestIndexWriter [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on issue #11920:
URL: https://github.com/apache/lucene/issues/11920#issuecomment-2862190434
I was able to fix the whole test by doing the following:
- In WindowsFS fall back to path as key, if the file key isn't available. I have no yet figured out if this brings other issues, e.g. when renaming files
- Change the IndexWriter tests to no longer setup a special test setup on windows, just use NIOFSDirectory everywhere (MMapDir does not work).
The reason why the test is failing is indeed: In Windows 11 (or Windows Server 2024) you can delete files that you have created on your own.
Anyways we should keep Windows FS emulation available, as the kernel of Windows 10 is still hevily used in Windows Server installations. At some point we can for sure cleanup our code and remove the Windows legacy behaviour.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [I] Test testDeleteUnusedFiles() failed in TestIndexWriter [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on issue #11920:
URL: https://github.com/apache/lucene/issues/11920#issuecomment-2862240965
If we fallback to the path, we do not need to add special cases for file renames. The current code checks if the filekey has changed after rename and fixes its internal structures.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [I] Test testDeleteUnusedFiles() failed in TestIndexWriter [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on issue #11920:
URL: https://github.com/apache/lucene/issues/11920#issuecomment-2862170475
I am debugging. The reason for the whole failure is some spaghetti conditions that are hard to understand.
Actually WindowsFS does not work with windows, as the Windows implementation has no "file key" (e.g., an Inode). So basically WindowsFS never tracks anything and cannot emulate legacy Windows behaviour on Windows.
The fix is to fall back to filename path on windows as key and remove the conditions and use NIOFSDirectory for this test.
I am investigating more....
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [I] Test testDeleteUnusedFiles() failed in TestIndexWriter [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on issue #11920:
URL: https://github.com/apache/lucene/issues/11920#issuecomment-2862192925
@rmuir do you have any other ideas - you were writing WindowsFS.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [I] Test testDeleteUnusedFiles() failed in TestIndexWriter [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on issue #11920:
URL: https://github.com/apache/lucene/issues/11920#issuecomment-2862308528
Here is a PR that uses toRealPath as key if the fileKey is not provided (null). I was able to remove all "does not work on Windows assumes" in TestIndexWriter.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org