lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hoss Man (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (SOLR-8295) collapse parser can trigger NPE when a segment has empty DocValues for collapse field (ie: no doc in segment has a value)
Date Mon, 16 Nov 2015 22:38:11 GMT

     [ https://issues.apache.org/jira/browse/SOLR-8295?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Hoss Man updated SOLR-8295:
---------------------------
    Description: When collapsing on a field that doesn't exist for all documents, the existence
of a segment that does not contain any documents that have a value can cause an NPE as the
collapse parser assumes the DocValues for a segment will always be non-null.  (was: From https://builds.apache.org/job/Lucene-Solr-Tests-trunk-Java8/629/
- reproduces for me:
{noformat}
   [junit4]   2> NOTE: reproduce with: ant test  -Dtestcase=TestRandomCollapseQParserPlugin
-Dtests.method=testRandomCollpaseWithSort -Dtests.seed=EB40CE4410753BB -Dtests.multiplier=2
-Dtests.slow=true -Dtests.locale=es_PY -Dtests.timezone=Asia/Oral -Dtests.asserts=true -Dtests.file.encoding=US-ASCII
   [junit4] ERROR   11.7s J2 | TestRandomCollapseQParserPlugin.testRandomCollpaseWithSort
<<<
   [junit4]    > Throwable #1: org.apache.solr.client.solrj.SolrServerException: org.apache.solr.client.solrj.SolrServerException:
java.lang.NullPointerException
   [junit4]    > 	at __randomizedtesting.SeedInfo.seed([EB40CE4410753BB:B097F2D6AAF6048]:0)
   [junit4]    > 	at org.apache.solr.client.solrj.embedded.EmbeddedSolrServer.request(EmbeddedSolrServer.java:240)
   [junit4]    > 	at org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:150)
   [junit4]    > 	at org.apache.solr.client.solrj.SolrClient.query(SolrClient.java:943)
   [junit4]    > 	at org.apache.solr.client.solrj.SolrClient.query(SolrClient.java:958)
   [junit4]    > 	at org.apache.solr.search.TestRandomCollapseQParserPlugin.testRandomCollpaseWithSort(TestRandomCollapseQParserPlugin.java:164)
   [junit4]    > 	at java.lang.Thread.run(Thread.java:745)
   [junit4]    > Caused by: org.apache.solr.client.solrj.SolrServerException: java.lang.NullPointerException
   [junit4]    > 	at org.apache.solr.client.solrj.embedded.EmbeddedSolrServer.checkForExceptions(EmbeddedSolrServer.java:252)
   [junit4]    > 	at org.apache.solr.client.solrj.embedded.EmbeddedSolrServer.request(EmbeddedSolrServer.java:180)
   [junit4]    > 	... 43 more
   [junit4]    > Caused by: java.lang.NullPointerException
   [junit4]    > 	at org.apache.solr.search.CollapsingQParserPlugin$IntFieldValueCollector.collect(CollapsingQParserPlugin.java:1109)
   [junit4]    > 	at org.apache.lucene.search.MatchAllDocsQuery$1$1.score(MatchAllDocsQuery.java:56)
   [junit4]    > 	at org.apache.lucene.search.BulkScorer.score(BulkScorer.java:39)
   [junit4]    > 	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:670)
   [junit4]    > 	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:474)
   [junit4]    > 	at org.apache.solr.search.SolrIndexSearcher.buildAndRunCollectorChain(SolrIndexSearcher.java:203)
   [junit4]    > 	at org.apache.solr.search.SolrIndexSearcher.getDocListNC(SolrIndexSearcher.java:1692)
   [junit4]    > 	at org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1508)
   [junit4]    > 	at org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:562)
   [junit4]    > 	at org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:519)
   [junit4]    > 	at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:276)
   [junit4]    > 	at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:151)
   [junit4]    > 	at org.apache.solr.core.SolrCore.execute(SolrCore.java:2079)
   [junit4]    > 	at org.apache.solr.client.solrj.embedded.EmbeddedSolrServer.request(EmbeddedSolrServer.java:179)
   [junit4]    > 	... 43 more
{noformat})
        Summary: collapse parser can trigger NPE when a segment has empty DocValues for collapse
field (ie: no doc in segment has a value)  (was: TestRandomCollapseQParserPlugin.testRandomCollapseWithSort()
NPE)

Updated summary & description to clarify root cause.  
The underlying bug predates SOLR-6168, (i think it has been arround for as long as the collapse
parser has existed?) but was uncovered due to random testing added by that issue.

Initial report...

{panel}
>From https://builds.apache.org/job/Lucene-Solr-Tests-trunk-Java8/629/ - reproduces for
me:
{noformat}
   [junit4]   2> NOTE: reproduce with: ant test  -Dtestcase=TestRandomCollapseQParserPlugin
-Dtests.method=testRandomCollpaseWithSort -Dtests.seed=EB40CE4410753BB -Dtests.multiplier=2
-Dtests.slow=true -Dtests.locale=es_PY -Dtests.timezone=Asia/Oral -Dtests.asserts=true -Dtests.file.encoding=US-ASCII
   [junit4] ERROR   11.7s J2 | TestRandomCollapseQParserPlugin.testRandomCollpaseWithSort
<<<
   [junit4]    > Throwable #1: org.apache.solr.client.solrj.SolrServerException: org.apache.solr.client.solrj.SolrServerException:
java.lang.NullPointerException
   [junit4]    > 	at __randomizedtesting.SeedInfo.seed([EB40CE4410753BB:B097F2D6AAF6048]:0)
   [junit4]    > 	at org.apache.solr.client.solrj.embedded.EmbeddedSolrServer.request(EmbeddedSolrServer.java:240)
   [junit4]    > 	at org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:150)
   [junit4]    > 	at org.apache.solr.client.solrj.SolrClient.query(SolrClient.java:943)
   [junit4]    > 	at org.apache.solr.client.solrj.SolrClient.query(SolrClient.java:958)
   [junit4]    > 	at org.apache.solr.search.TestRandomCollapseQParserPlugin.testRandomCollpaseWithSort(TestRandomCollapseQParserPlugin.java:164)
   [junit4]    > 	at java.lang.Thread.run(Thread.java:745)
   [junit4]    > Caused by: org.apache.solr.client.solrj.SolrServerException: java.lang.NullPointerException
   [junit4]    > 	at org.apache.solr.client.solrj.embedded.EmbeddedSolrServer.checkForExceptions(EmbeddedSolrServer.java:252)
   [junit4]    > 	at org.apache.solr.client.solrj.embedded.EmbeddedSolrServer.request(EmbeddedSolrServer.java:180)
   [junit4]    > 	... 43 more
   [junit4]    > Caused by: java.lang.NullPointerException
   [junit4]    > 	at org.apache.solr.search.CollapsingQParserPlugin$IntFieldValueCollector.collect(CollapsingQParserPlugin.java:1109)
   [junit4]    > 	at org.apache.lucene.search.MatchAllDocsQuery$1$1.score(MatchAllDocsQuery.java:56)
   [junit4]    > 	at org.apache.lucene.search.BulkScorer.score(BulkScorer.java:39)
   [junit4]    > 	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:670)
   [junit4]    > 	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:474)
   [junit4]    > 	at org.apache.solr.search.SolrIndexSearcher.buildAndRunCollectorChain(SolrIndexSearcher.java:203)
   [junit4]    > 	at org.apache.solr.search.SolrIndexSearcher.getDocListNC(SolrIndexSearcher.java:1692)
   [junit4]    > 	at org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1508)
   [junit4]    > 	at org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:562)
   [junit4]    > 	at org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:519)
   [junit4]    > 	at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:276)
   [junit4]    > 	at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:151)
   [junit4]    > 	at org.apache.solr.core.SolrCore.execute(SolrCore.java:2079)
   [junit4]    > 	at org.apache.solr.client.solrj.embedded.EmbeddedSolrServer.request(EmbeddedSolrServer.java:179)
   [junit4]    > 	... 43 more
{noformat}
{panel}


> collapse parser can trigger NPE when a segment has empty DocValues for collapse field
(ie: no doc in segment has a value)
> -------------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-8295
>                 URL: https://issues.apache.org/jira/browse/SOLR-8295
>             Project: Solr
>          Issue Type: Bug
>            Reporter: Steve Rowe
>            Assignee: Hoss Man
>
> When collapsing on a field that doesn't exist for all documents, the existence of a segment
that does not contain any documents that have a value can cause an NPE as the collapse parser
assumes the DocValues for a segment will always be non-null.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message