Steve Rowe created SOLR-9983: -------------------------------- Summary: TestManagedSchemaThreadSafety.testThreadSafety() failures Key: SOLR-9983 URL: https://issues.apache.org/jira/browse/SOLR-9983 Project: Solr Issue Type: Bug Security Level: Public (Default Security Level. Issues are Public) Components: Schema and Analysis Affects Versions: master (7.0) Reporter: Steve Rowe
I set up a Jenkins job to hammer all tests on the {{jira/solr-5944}} branch, and at least four times this test failed (none of the seeds reproduce for me): [http://jenkins.sarowe.net/job/Solr-tests-SOLR-5944/155/], [http://jenkins.sarowe.net/job/Solr-tests-SOLR-5944/167/], [http://jenkins.sarowe.net/job/Solr-tests-SOLR-5944/106/], [http://jenkins.sarowe.net/job/Solr-tests-SOLR-5944/332/]. My email search didn't turn up any failures on ASF or Policeman Jenkins. Here's the output from one of the above runs: {noformat} [junit4] 2> NOTE: reproduce with: ant test -Dtestcase=TestManagedSchemaThreadSafety -Dtests.method=testThreadSafety -Dtests.seed=3DB2B79301AA806B -Dtests.slow=true -Dtests.locale=lt -Dtests.timezone=Asia/Anadyr -Dtests.asserts=true -Dtests.file.encoding=US-ASCII [junit4] ERROR 4.37s J4 | TestManagedSchemaThreadSafety.testThreadSafety <<< [junit4] > Throwable #1: java.util.concurrent.ExecutionException: java.lang.RuntimeException: org.apache.solr.common.SolrException: Error loading solr config from solrconfig.xml [junit4] > at __randomizedtesting.SeedInfo.seed([3DB2B79301AA806B:A7F8A3CBD235329D]:0) [junit4] > at java.util.concurrent.FutureTask.report(FutureTask.java:122) [junit4] > at java.util.concurrent.FutureTask.get(FutureTask.java:192) [junit4] > at org.apache.solr.schema.TestManagedSchemaThreadSafety.testThreadSafety(TestManagedSchemaThreadSafety.java:126) [junit4] > at java.lang.Thread.run(Thread.java:745) [junit4] > Caused by: java.lang.RuntimeException: org.apache.solr.common.SolrException: Error loading solr config from solrconfig.xml [junit4] > at org.apache.solr.schema.TestManagedSchemaThreadSafety.lambda$indexSchemaLoader$0(TestManagedSchemaThreadSafety.java:159) [junit4] > at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [junit4] > at java.util.concurrent.FutureTask.run(FutureTask.java:266) [junit4] > at org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor.lambda$execute$0(ExecutorUtil.java:229) [junit4] > at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [junit4] > at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [junit4] > ... 1 more [junit4] > Caused by: org.apache.solr.common.SolrException: Error loading solr config from solrconfig.xml [junit4] > at org.apache.solr.core.SolrConfig.readFromResourceLoader(SolrConfig.java:187) [junit4] > at org.apache.solr.schema.TestManagedSchemaThreadSafety.lambda$indexSchemaLoader$0(TestManagedSchemaThreadSafety.java:152) [junit4] > ... 6 more [junit4] > Caused by: java.lang.NullPointerException [junit4] > at org.apache.solr.cloud.ZkSolrResourceLoader.openResource(ZkSolrResourceLoader.java:99) [junit4] > at org.apache.solr.core.SolrResourceLoader.openConfig(SolrResourceLoader.java:361) [junit4] > at org.apache.solr.core.Config.<init>(Config.java:120) [junit4] > at org.apache.solr.core.Config.<init>(Config.java:90) [junit4] > at org.apache.solr.core.SolrConfig.<init>(SolrConfig.java:202) [junit4] > at org.apache.solr.core.SolrConfig.readFromResourceLoader(SolrConfig.java:179) [junit4] > ... 7 more {noformat} Looks to me like this is a test bug: the test mocks {{ZkController}}, but the mock returns null for (the uninitialized {{cc}} returned by) {{getCoreContainer()}}, which is called when the ZK session expires in {{ZkSolrResourceLoader.openResource()}}. The NPE is triggered when {{isShutdown()}} is called on the null core container: {code:java|title=ZkSolrResourceLoader.java} 97: } catch (KeeperException.SessionExpiredException e) { 98: exception = e; 99: if (!zkController.getCoreContainer().isShutDown()) { 100: // Retry in case of session expiry {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org