[ https://issues.apache.org/jira/browse/SOLR-17392?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gus Heck updated SOLR-17392: ---------------------------- Affects Version/s: main (10.0) > Reproducing failure in TestExportWriter (bits = null NPE) > --------------------------------------------------------- > > Key: SOLR-17392 > URL: https://issues.apache.org/jira/browse/SOLR-17392 > Project: Solr > Issue Type: Bug > Security Level: Public(Default Security Level. Issues are Public) > Affects Versions: main (10.0) > Reporter: Gus Heck > Priority: Major > > While running the test suite locally I came across the NPE below. I notice > that there are a couple other issues out there that hit NPE in > BitsetIterator<init> as well. There might be some need for static analysis to > flag any case where the constructor might be passed a null bitset (The > constructor calls .length() blindly on whatever is passed in) > 2> 4915 INFO > (TEST-TestExportWriter.testRandomNumerics-seed#[4D8B4D17DC5E971F]) [n: c: s: > r: x: t:] o.a.s.SolrTestCaseJ4 ###Ending testRandomNumerics > > java.io.IOException: java.lang.NullPointerException: Cannot invoke > "org.apache.lucene.util.BitSet.length()" because "bits" is null > > at > __randomizedtesting.SeedInfo.seed([4D8B4D17DC5E971F:7E9A173E1EE4C6F2]:0) > > at > org.apache.solr.handler.export.ExportWriter$SegmentIterator.topDocs(ExportWriter.java:840) > > at > org.apache.solr.handler.export.ExportWriter$SegmentIterator.<init>(ExportWriter.java:782) > > at > org.apache.solr.handler.export.ExportWriter.getMergeIterator(ExportWriter.java:754) > > at > org.apache.solr.handler.export.ExportBuffers.<init>(ExportBuffers.java:97) > > at > org.apache.solr.handler.export.ExportWriter.writeDocs(ExportWriter.java:395) > > at > org.apache.solr.handler.export.ExportWriter.lambda$_write$1(ExportWriter.java:344) > > at > org.apache.solr.common.util.JsonTextWriter.writeIterator(JsonTextWriter.java:150) > > at > org.apache.solr.common.util.TextWriter.writeIterator(TextWriter.java:260) > > at > org.apache.solr.common.util.TextWriter.writeVal(TextWriter.java:86) > > at > org.apache.solr.response.TextResponseWriter.writeVal(TextResponseWriter.java:213) > > at > org.apache.solr.common.util.TextWriter.writeVal(TextWriter.java:48) > > at > org.apache.solr.common.util.JsonTextWriter$2.put(JsonTextWriter.java:187) > > at > org.apache.solr.handler.export.ExportWriter.lambda$_write$2(ExportWriter.java:344) > > at > org.apache.solr.common.util.JsonTextWriter.writeMap(JsonTextWriter.java:174) > > at > org.apache.solr.common.util.TextWriter.writeMap(TextWriter.java:251) > > at > org.apache.solr.common.util.TextWriter.writeVal(TextWriter.java:88) > > at > org.apache.solr.response.TextResponseWriter.writeVal(TextResponseWriter.java:213) > > at > org.apache.solr.common.util.TextWriter.writeVal(TextWriter.java:48) > > at > org.apache.solr.common.util.JsonTextWriter$2.put(JsonTextWriter.java:187) > > at > org.apache.solr.handler.export.ExportWriter.lambda$_write$3(ExportWriter.java:339) > > at > org.apache.solr.common.util.JsonTextWriter.writeMap(JsonTextWriter.java:174) > > at > org.apache.solr.handler.export.ExportWriter._write(ExportWriter.java:336) > > at > org.apache.solr.handler.export.ExportWriter.write(ExportWriter.java:195) > > at org.apache.solr.core.SolrCore$3.write(SolrCore.java:3045) > > at org.apache.solr.util.TestHarness.query(TestHarness.java:361) > > at org.apache.solr.util.TestHarness.query(TestHarness.java:333) > > at > org.apache.solr.handler.export.TestExportWriter.doTestQuery(TestExportWriter.java:1483) > > at > org.apache.solr.handler.export.TestExportWriter.testRandomNumerics(TestExportWriter.java:1108) > > 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:569) > > 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 > com.carrotsearch.randomizedtesting.rules.SystemPropertiesRestoreRule$1.evaluate(SystemPropertiesRestoreRule.java:80) > > at org.junit.rules.RunRules.evaluate(RunRules.java:20) > > 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 > 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.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43) > > at > com.carrotsearch.randomizedtesting.rules.SystemPropertiesRestoreRule$1.evaluate(SystemPropertiesRestoreRule.java:80) > > at org.junit.rules.RunRules.evaluate(RunRules.java:20) > > 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:840) > > > > Caused by: > > java.lang.NullPointerException: Cannot invoke > "org.apache.lucene.util.BitSet.length()" because "bits" is null > > at > org.apache.lucene.util.BitSetIterator.<init>(BitSetIterator.java:63) > > at > org.apache.solr.handler.export.ExportWriter$SegmentIterator.topDocs(ExportWriter.java:817) > > ... 73 more > 2> NOTE: reproduce with: gradlew test --tests > TestExportWriter.testRandomNumerics -Dtests.seed=4D8B4D17DC5E971F > -Dtests.locale=ak-GH -Dtests.timezone=Asia/Ulaanbaatar -Dtests.asserts=true > -Dtests.file.encoding=UTF-8 > -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org