lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sascha Szott (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (SOLR-3513) specifying 2147483647 for rows parameter causes AIOOBE
Date Fri, 15 Jun 2012 15:04:43 GMT

    [ https://issues.apache.org/jira/browse/SOLR-3513?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13295711#comment-13295711
] 

Sascha Szott edited comment on SOLR-3513 at 6/15/12 3:04 PM:
-------------------------------------------------------------

This also affects Solr version 3.6.

To be more precise:
* an *NumberFormatException* occurs if _rows_ > 2147483647
{code}
java.lang.NumberFormatException: For input string: "2147483648"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
	at java.lang.Integer.parseInt(Integer.java:465)
	at java.lang.Integer.parseInt(Integer.java:499)
	at org.apache.solr.search.QParser.getSort(QParser.java:247)
	at org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:102)
	at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:173)
	at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129)
	at org.apache.solr.core.SolrCore.execute(SolrCore.java:1372)
	at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:356)
	at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:252)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:399)
	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
	at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
	at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
	at org.mortbay.jetty.Server.handle(Server.java:326)
	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)
	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
	at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582
{code}
* an *ArrayIndexOutOfBoundsException* occurs if _rows_ + _start_ > 2147483647; e.g. _rows_
= 2147483640 and _start_ = 8
{code}
java.lang.ArrayIndexOutOfBoundsException: 8
	at org.apache.solr.search.DocSlice$1.nextDoc(DocSlice.java:117)
	at org.apache.solr.response.XMLWriter$3.writeDocs(XMLWriter.java:544)
	at org.apache.solr.response.XMLWriter.writeDocuments(XMLWriter.java:483)
	at org.apache.solr.response.XMLWriter.writeDocList(XMLWriter.java:520)
	at org.apache.solr.response.XMLWriter.writeVal(XMLWriter.java:583)
	at org.apache.solr.response.XMLWriter.writeResponse(XMLWriter.java:132)
	at org.apache.solr.response.XMLResponseWriter.write(XMLResponseWriter.java:35)
	at org.apache.solr.servlet.SolrDispatchFilter.writeResponse(SolrDispatchFilter.java:343)
	at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:265)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:399)
	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
	at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
	at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
	at org.mortbay.jetty.Server.handle(Server.java:326)
	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)
	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
	at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
{code}
                
      was (Author: szott):
    This also affects Solr version 3.6.

To be more precise:
* an *NumberFormatException* occurs if _rows_ > 2147483647
* an *ArrayIndexOutOfBoundsException* occurs if _rows_ + _start_ > 2147483647; e.g. _rows_
= 2147483640 and _start_ = 8

                  
> specifying 2147483647 for rows parameter causes AIOOBE
> ------------------------------------------------------
>
>                 Key: SOLR-3513
>                 URL: https://issues.apache.org/jira/browse/SOLR-3513
>             Project: Solr
>          Issue Type: Bug
>          Components: Response Writers
>    Affects Versions: 3.4
>            Reporter: Mike Sokolov
>
> A request such as:
> /select?version=2.2&q=*%3A*&fq=*%3A*&start=1&rows=2147483647&fl=uri

> causes an AIOOBE.  This happens when rows is MAX_INT or MAX_INT-1 (I suspect anything
greater than MAX_INT-start-1).  It happens with both XML and BinaryResponseWriter.  Doesn't
seem to happen with embedded solr.
> I don't know whether this may have been fixed since 3.4 - sorry, but I thought it was
better to report than not to report it, even so.
> Here's a typical stack trace:
> java.lang.ArrayIndexOutOfBoundsException: 7183
>         at org.apache.solr.search.DocSlice$1.nextDoc(DocSlice.java:117)
>         at org.apache.solr.response.XMLWriter$3.writeDocs(XMLWriter.java:543)
>         at org.apache.solr.response.XMLWriter.writeDocuments(XMLWriter.java:482)
>         at org.apache.solr.response.XMLWriter.writeDocList(XMLWriter.java:519)
>         at org.apache.solr.response.XMLWriter.writeVal(XMLWriter.java:582)
>         at org.apache.solr.response.XMLWriter.writeResponse(XMLWriter.java:131)
>         at org.apache.solr.response.XMLResponseWriter.write(XMLResponseWriter.ja
> va:35)
>         at org.apache.solr.servlet.SolrDispatchFilter.writeResponse(SolrDispatch
> Filter.java:343)
>         at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilte
> r.java:265)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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