You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Mark Miller (JIRA)" <ji...@apache.org> on 2013/10/14 19:27:47 UTC

[jira] [Commented] (SOLR-4992) Solr queries don't propagate Java OutOfMemoryError back to the JVM

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

Mark Miller commented on SOLR-4992:
-----------------------------------

We like to catch those throwables because of things like assertion errors - we still want to close resources, etc.

One idea is to always do:
{code}
     } catch (Throwable t) {
        if (t instanceof OutOfMemoryError) {
          throw (OutOfMemoryError)t;
        }
{code}
But that is difficult to enforce over time.


> Solr queries don't propagate Java OutOfMemoryError back to the JVM
> ------------------------------------------------------------------
>
>                 Key: SOLR-4992
>                 URL: https://issues.apache.org/jira/browse/SOLR-4992
>             Project: Solr
>          Issue Type: Bug
>          Components: search, SolrCloud, update
>    Affects Versions: 4.3.1
>            Reporter: Daniel Collins
>            Assignee: Mark Miller
>             Fix For: 4.6, 5.0
>
>
> Solr (specifically SolrDispatchFilter.doFilter() but there might be other places) handle generic java.lang.Throwable errors but that "hides" OutOfMemoryError scenarios.
> IndexWriter does this too but that has a specific exclusion for OOM scenarios and handles them explicitly (stops committing and just logs to the transaction log).
> {noformat}
> Example Stack trace:
> 2013-06-26 19:31:33,801 [qtp632640515-62] ERROR
> solr.servlet.SolrDispatchFilter Q:22 -
> null:java.lang.RuntimeException: java.lang.OutOfMemoryError: Java heap
> space
> at org.apache.solr.servlet.SolrDispatchFilter.sendError(SolrDispatchFilter.java:670)
> at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:380)
> at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:155)
> at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1423)
> at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:450)
> at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:138)
> at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:564)
> at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:213)
> at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1083)
> at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:379)
> at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:175)
> at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1017)
> at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:136)
> at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:258)
> at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:109)
> at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
> at org.eclipse.jetty.server.Server.handle(Server.java:445)
> at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:260)
> at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:225)
> at org.eclipse.jetty.io.AbstractConnection$ReadCallback.run(AbstractConnection.java:358)
> at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:596)
> at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:527)
> at java.lang.Thread.run(Thread.java:722)
> Caused by: java.lang.OutOfMemoryError: Java heap space
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.1#6144)

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