[ https://issues.apache.org/jira/browse/LUCENE-10264?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17450248#comment-17450248 ]
ASF subversion and git services commented on LUCENE-10264: ---------------------------------------------------------- Commit 634c22c527ef72b1d400bb8284cff6b9971766c1 in lucene's branch refs/heads/main from Ignacio Vera [ https://gitbox.apache.org/repos/asf?p=lucene.git;h=634c22c ] LUCENE-10264: Clone index input when creating a PointTree in SimpleTextBKDReader (#478) Fixes a race condition introduced in LUCENE-9820. > Test errors in SimpleTextBKDReader > ---------------------------------- > > Key: LUCENE-10264 > URL: https://issues.apache.org/jira/browse/LUCENE-10264 > Project: Lucene - Core > Issue Type: Bug > Reporter: Ignacio Vera > Priority: Major > Time Spent: 10m > Remaining Estimate: 0h > > I noticed a couple of errors in CI regarding the SimpleTextBKDReader which > are introduced by LUCENE-9820. I had a look and indeed the problem is that we > are not cloning the index input when creating a PointTree and therefore if > there are two threads accessing the same PointValue instance (e.g a search > request and a background merge), then we have troubles. > Reproduce with: > > {noformat} > ./gradlew test --tests TestSimpleTextPointsFormat.testWithExceptions > -Dtests.seed=56F6BF03D7871A6D -Dtests.multiplier=3 -Dtests.slow=true > -Dtests.locale=ses -Dtests.timezone=Asia/Ho_Chi_Minh -Dtests.asserts=true > -Dtests.file.encoding=UTF-8 > {noformat} > > Error: > {noformat} > Stack Trace: > java.lang.AssertionError > at > __randomizedtesting.SeedInfo.seed([56F6BF03D7871A6D:F4A5237F58095597]:0) > at > org.apache.lucene.codecs.simpletext.SimpleTextBKDReader$SimpleTextPointTree.parseInt(SimpleTextBKDReader.java:387) > at > org.apache.lucene.codecs.simpletext.SimpleTextBKDReader$SimpleTextPointTree.readDocIDs(SimpleTextBKDReader.java:374) > at > org.apache.lucene.codecs.simpletext.SimpleTextBKDReader$SimpleTextPointTree.visitDocValues(SimpleTextBKDReader.java:345) > at > org.apache.lucene.codecs.simpletext.SimpleTextBKDReader$SimpleTextPointTree.visitDocValues(SimpleTextBKDReader.java:362) > at > org.apache.lucene.codecs.PointsWriter$1$1$1.visitDocValues(PointsWriter.java:142) > at > org.apache.lucene.codecs.simpletext.SimpleTextPointsWriter.writeField(SimpleTextPointsWriter.java:95) > at > org.apache.lucene.codecs.PointsWriter.mergeOneField(PointsWriter.java:57) > at org.apache.lucene.codecs.PointsWriter.merge(PointsWriter.java:231) > at > org.apache.lucene.index.SegmentMerger.mergePoints(SegmentMerger.java:184) > at > org.apache.lucene.index.SegmentMerger.mergeWithLogging(SegmentMerger.java:291) > at org.apache.lucene.index.SegmentMerger.merge(SegmentMerger.java:144) > at > org.apache.lucene.index.IndexWriter.addIndexes(IndexWriter.java:3190) > at > org.apache.lucene.index.RandomIndexWriter.addIndexes(RandomIndexWriter.java:320) > at > org.apache.lucene.index.BasePointsFormatTestCase.switchIndex(BasePointsFormatTestCase.java:1118) > at > org.apache.lucene.index.BasePointsFormatTestCase.verify(BasePointsFormatTestCase.java:779) > at > org.apache.lucene.index.BasePointsFormatTestCase.testWithExceptions(BasePointsFormatTestCase.java:247) > at > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.base/java.lang.reflect.Method.invoke(Method.java:566) > at > com.carrotsearch.randomizedtesting.RandomizedRunner.invoke(RandomizedRunner.java:1754) > at > com.carrotsearch.randomizedtesting.RandomizedRunner$8.evaluate(RandomizedRunner.java:942) > at > com.carrotsearch.randomizedtesting.RandomizedRunner$9.evaluate(RandomizedRunner.java:978) > at > com.carrotsearch.randomizedtesting.RandomizedRunner$10.evaluate(RandomizedRunner.java:992) > at > org.apache.lucene.util.TestRuleSetupTeardownChained$1.evaluate(TestRuleSetupTeardownChained.java:44) > at > org.apache.lucene.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43) > at > org.apache.lucene.util.TestRuleThreadAndTestName$1.evaluate(TestRuleThreadAndTestName.java:45) > at > org.apache.lucene.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:60) > at > org.apache.lucene.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:370) > at > com.carrotsearch.randomizedtesting.ThreadLeakControl.forkTimeoutingTask(ThreadLeakControl.java:819) > at > com.carrotsearch.randomizedtesting.ThreadLeakControl$3.evaluate(ThreadLeakControl.java:470) > at > com.carrotsearch.randomizedtesting.RandomizedRunner.runSingleTest(RandomizedRunner.java:951) > at > com.carrotsearch.randomizedtesting.RandomizedRunner$5.evaluate(RandomizedRunner.java:836) > at > com.carrotsearch.randomizedtesting.RandomizedRunner$6.evaluate(RandomizedRunner.java:887) > at > com.carrotsearch.randomizedtesting.RandomizedRunner$7.evaluate(RandomizedRunner.java:898) > at > org.apache.lucene.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43) > at > com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36) > at > org.apache.lucene.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.util.TestRuleAssertionsRequired$1.evaluate(TestRuleAssertionsRequired.java:53) > at > org.apache.lucene.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43) > at > org.apache.lucene.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:44) > at > org.apache.lucene.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:60) > at > org.apache.lucene.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:370) > at > com.carrotsearch.randomizedtesting.ThreadLeakControl.lambda$forkTimeoutingTask$0(ThreadLeakControl.java:826) > at java.base/java.lang.Thread.run(Thread.java:829){noformat} -- This message was sent by Atlassian Jira (v8.20.1#820001) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org