lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Muir (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (LUCENE-4401) ArrayIndexOutOfBoundsException for surround parser
Date Mon, 17 Sep 2012 17:43:07 GMT

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

Robert Muir updated LUCENE-4401:
--------------------------------

    Attachment: LUCENE-4401.patch

Here's a patch: I had confused myself before.

I added an assert to BS2's nextDoc here, so we know if some consumer of it is calling nextDoc()
after it already returned NO_MORE_DOCS.

Thats fine: the bug was actually in BS2's nextDoc itself, it was missing an if. But from what
I can tell this doesnt need to be per-scorer-per-doc, we can just do it per-doc in afterNext.

I also added the assert to ConstantScorer so we feel ok with BS1.

Separately we cant really test this situation very well as long as the javadocs for nextDoc
say, Returns the following:
* -1 or NO_MORE_DOCS if nextDoc() or
   advance(int) were not called yet.
*  NO_MORE_DOCS if the iterator has exhausted.
* Otherwise it should return the doc ID it is currently on.

This prevents us from being able to easily assert that nobody is calling nextDoc()/advance()
after the enum is exhausted, since we cannot differentiate 'exhausted' from 'uninitialized'.

I think we should clarify the javadocs, such that if nextDoc()/advance() are not called yet,
you can still return NO_MORE_DOCS, but only if you somehow know you are exhausted-before-you-start.
NO_MORE_DOCS should mean NO_MORE_DOCS.

It could also be everyone reads it this way already, and I'm just being super-anal.
                
> ArrayIndexOutOfBoundsException for surround parser
> --------------------------------------------------
>
>                 Key: LUCENE-4401
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4401
>             Project: Lucene - Core
>          Issue Type: Bug
>    Affects Versions: 4.0-BETA
>            Reporter: Liu Chao
>         Attachments: LUCENE-4401.patch
>
>
> I got the following exception when I query solr with "pcnt:((kk w hit) OR (ipad) OR (iphoine))"
and the defType is 'surround'.
> 18:16:45
> SEVERE
> SolrCore
> java.lang.ArrayIndexOutOfBoundsException: 2147483647 at org.apache.lucene.search.similarities.TFIDFSimilarity$SloppyTFIDFDocScorer.score(TFIDFSimilarity.java:793)
at org.apache.lucene.search.spans.SpanScorer.score(SpanScorer.java:93) at org.apache.lucene.search.DisjunctionSumScorer.afterNext(DisjunctionSumScorer.java:94)
at org.apache.lucene.search.DisjunctionSumScorer.nextDoc(DisjunctionSumScorer.java:82) at
org.apache.lucene.search.BooleanScorer2.score(BooleanScorer2.java:284) at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:573)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:275) at org.apache.solr.search.SolrIndexSearcher.getDocListNC(SolrIndexSearcher.java:1390)
at org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1265) at org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:390)
at org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:411) at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:206)
at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129) at
org.apache.solr.core.SolrCore.execute(SolrCore.java:1656) at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:454)
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:275) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1337)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:484) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:233)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1065) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:413)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:192) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:999)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117) at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149) at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111) at org.eclipse.jetty.server.Server.handle(Server.java:351)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:454)
at org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:47)
at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:900)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:954)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:857) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
at org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:66)
at org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:254)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:599) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:534)
at java.lang.Thread.run(Thread.java:636)
> 18:16:45
> SEVERE
> SolrDispatchFilter
> null:java.lang.ArrayIndexOutOfBoundsException: 2147483647 at org.apache.lucene.search.similarities.TFIDFSimilarity$SloppyTFIDFDocScorer.score(TFIDFSimilarity.java:793)
at org.apache.lucene.search.spans.SpanScorer.score(SpanScorer.java:93) at org.apache.lucene.search.DisjunctionSumScorer.afterNext(DisjunctionSumScorer.java:94)
at org.apache.lucene.search.DisjunctionSumScorer.nextDoc(DisjunctionSumScorer.java:82) at
org.apache.lucene.search.BooleanScorer2.score(BooleanScorer2.java:284) at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:573)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:275) at org.apache.solr.search.SolrIndexSearcher.getDocListNC(SolrIndexSearcher.java:1390)
at org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1265) at org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:390)
at org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:411) at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:206)
at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129) at
org.apache.solr.core.SolrCore.execute(SolrCore.java:1656) at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:454)
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:275) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1337)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:484) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:233)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1065) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:413)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:192) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:999)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117) at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149) at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111) at org.eclipse.jetty.server.Server.handle(Server.java:351)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:454)
at org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:47)
at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:900)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:954)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:857) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
at org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:66)
at org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:254)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:599) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:534)
at java.lang.Thread.run(Thread.java:636)
> 18:16:45
> SEVERE
> SolrCore
> org.apache.solr.common.SolrException: org.apache.solr.client.solrj.SolrServerException:
No live SolrServers available to handle this request:[http://192.168.50.78:8985/solr/ac201209w3_s1,​
http://192.168.50.76:8985/solr/ac201209w3_s1] at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:300)
at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129) at
org.apache.solr.core.SolrCore.execute(SolrCore.java:1656) at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:454)
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:275) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1337)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:484) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:233)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1065) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:413)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:192) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:999)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117) at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149) at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111) at org.eclipse.jetty.server.Server.handle(Server.java:351)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:454)
at org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:47)
at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:890)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:944)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:634) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:230)
at org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:66)
at org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:254)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:599) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:534)
at java.lang.Thread.run(Thread.java:636) Caused by: org.apache.solr.client.solrj.SolrServerException:
No live SolrServers available to handle this request:[http://192.168.50.78:8985/solr/ac201209w3_s1,​
http://192.168.50.76:8985/solr/ac201209w3_s1] at org.apache.solr.client.solrj.impl.LBHttpSolrServer.request(LBHttpSolrServer.java:324)
at org.apache.solr.handler.component.HttpShardHandler$1.call(HttpShardHandler.java:167) at
org.apache.solr.handler.component.HttpShardHandler$1.call(HttpShardHandler.java:1) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
... 1 more Caused by: org.apache.solr.common.SolrException: Server at http://192.168.50.78:8985/solr/ac201209w3_s1
returned non ok status:500,​ message:Server Error at org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:373)
at org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:182) at org.apache.solr.client.solrj.impl.LBHttpSolrServer.request(LBHttpSolrServer.java:289)
... 10 more
> 18:16:45
> SEVERE
> SolrDispatchFilter
> null:org.apache.solr.common.SolrException: org.apache.solr.client.solrj.SolrServerException:
No live SolrServers available to handle this request:[http://192.168.50.78:8985/solr/ac201209w3_s1,​
http://192.168.50.76:8985/solr/ac201209w3_s1] at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:300)
at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129) at
org.apache.solr.core.SolrCore.execute(SolrCore.java:1656) at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:454)
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:275) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1337)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:484) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:233)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1065) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:413)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:192) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:999)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117) at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149) at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111) at org.eclipse.jetty.server.Server.handle(Server.java:351)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:454)
at org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:47)
at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:890)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:944)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:634) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:230)
at org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:66)
at org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:254)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:599) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:534)
at java.lang.Thread.run(Thread.java:636) Caused by: org.apache.solr.client.solrj.SolrServerException:
No live SolrServers available to handle this request:[http://192.168.50.78:8985/solr/ac201209w3_s1,​
http://192.168.50.76:8985/solr/ac201209w3_s1] at org.apache.solr.client.solrj.impl.LBHttpSolrServer.request(LBHttpSolrServer.java:324)
at org.apache.solr.handler.component.HttpShardHandler$1.call(HttpShardHandler.java:167) at
org.apache.solr.handler.component.HttpShardHandler$1.call(HttpShardHandler.java:1) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
... 1 more Caused by: org.apache.solr.common.SolrException: Server at http://192.168.50.78:8985/solr/ac201209w3_s1
returned non ok status:500,​ message:Server Error at org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:373)
at org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:182) at org.apache.solr.client.solrj.impl.LBHttpSolrServer.request(LBHttpSolrServer.java:289)
... 10 more

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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


Mime
View raw message