[jira] [Commented] (SOLR-8539) Solr queries swallows up OutOfMemoryErrors
[ https://issues.apache.org/jira/browse/SOLR-8539?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15206742#comment-15206742 ] ASF subversion and git services commented on SOLR-8539: --- Commit fe54da0b58ed18a38f3dd436dd3f30fbee9acbbf in lucene-solr's branch refs/heads/jira/SOLR-445 from [~hossman_luc...@fucit.org] [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=fe54da0 ] SOLR-445: remove nocommits related to OOM trapping since SOLR-8539 has concluded that this isn't a thing the java code actually needs to be defensive of > Solr queries swallows up OutOfMemoryErrors > -- > > Key: SOLR-8539 > URL: https://issues.apache.org/jira/browse/SOLR-8539 > Project: Solr > Issue Type: Bug >Reporter: Varun Thacker > Fix For: 5.5, master > > Attachments: SOLR-8539.patch > > > I was testing a crazy surround query and was hitting OOMs easily with the > query. However I saw that the OOM killer wasn't triggered. Here is the stack > trace of the error on solr 5.4: > {code} > WARN - 2016-01-12 18:37:03.920; [ x:techproducts] > org.eclipse.jetty.util.thread.QueuedThreadPool$3; > java.lang.OutOfMemoryError: Java heap space > at > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.addConditionWaiter(AbstractQueuedSynchronizer.java:1855) > at > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2068) > at > org.eclipse.jetty.util.BlockingArrayQueue.poll(BlockingArrayQueue.java:389) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.idleJobPoll(QueuedThreadPool.java:531) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.access$700(QueuedThreadPool.java:47) > at > org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:590) > at java.lang.Thread.run(Thread.java:745) > ERROR - 2016-01-12 18:37:03.922; [ x:techproducts] > org.apache.solr.common.SolrException; null:java.lang.RuntimeException: > java.lang.OutOfMemoryError: Java heap space > at > org.apache.solr.servlet.HttpSolrCall.sendError(HttpSolrCall.java:611) > at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:472) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:222) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:181) > at > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) > at > org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) > at > org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577) > at > org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223) > at > org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) > at > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) > at > org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) > at > org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) > at > org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215) > at > org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110) > at > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) > at org.eclipse.jetty.server.Server.handle(Server.java:499) > at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) > at > org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) > at > org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) > at > org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) > at java.lang.Thread.run(Thread.java:745) > Caused by: java.lang.OutOfMemoryError: Java heap space > at > org.apache.lucene.codecs.lucene50.Lucene50PostingsReader.newTermState(Lucene50PostingsReader.java:149) > at > org.apache.lucene.codecs.blocktree.SegmentTermsEnumFrame.(SegmentTermsEnumFrame.java:100) > at > org.apache.lucene.codecs.blocktree.SegmentTermsEnum.getFrame(SegmentTermsEnum.java:215) > at > org.apache.lucene.codecs.blocktree.SegmentTermsEnum.pushFrame(SegmentTermsEnum.java:241) > at > org.apache.lucene.codec
[jira] [Commented] (SOLR-8539) Solr queries swallows up OutOfMemoryErrors
[ https://issues.apache.org/jira/browse/SOLR-8539?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15101944#comment-15101944 ] Shawn Heisey commented on SOLR-8539: [~gr...@webtide.com], thank you for your willingness to help, and for your investigation efforts. > Solr queries swallows up OutOfMemoryErrors > -- > > Key: SOLR-8539 > URL: https://issues.apache.org/jira/browse/SOLR-8539 > Project: Solr > Issue Type: Bug >Reporter: Varun Thacker > Fix For: 5.5, Trunk > > Attachments: SOLR-8539.patch > > > I was testing a crazy surround query and was hitting OOMs easily with the > query. However I saw that the OOM killer wasn't triggered. Here is the stack > trace of the error on solr 5.4: > {code} > WARN - 2016-01-12 18:37:03.920; [ x:techproducts] > org.eclipse.jetty.util.thread.QueuedThreadPool$3; > java.lang.OutOfMemoryError: Java heap space > at > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.addConditionWaiter(AbstractQueuedSynchronizer.java:1855) > at > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2068) > at > org.eclipse.jetty.util.BlockingArrayQueue.poll(BlockingArrayQueue.java:389) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.idleJobPoll(QueuedThreadPool.java:531) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.access$700(QueuedThreadPool.java:47) > at > org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:590) > at java.lang.Thread.run(Thread.java:745) > ERROR - 2016-01-12 18:37:03.922; [ x:techproducts] > org.apache.solr.common.SolrException; null:java.lang.RuntimeException: > java.lang.OutOfMemoryError: Java heap space > at > org.apache.solr.servlet.HttpSolrCall.sendError(HttpSolrCall.java:611) > at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:472) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:222) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:181) > at > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) > at > org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) > at > org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577) > at > org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223) > at > org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) > at > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) > at > org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) > at > org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) > at > org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215) > at > org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110) > at > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) > at org.eclipse.jetty.server.Server.handle(Server.java:499) > at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) > at > org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) > at > org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) > at > org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) > at java.lang.Thread.run(Thread.java:745) > Caused by: java.lang.OutOfMemoryError: Java heap space > at > org.apache.lucene.codecs.lucene50.Lucene50PostingsReader.newTermState(Lucene50PostingsReader.java:149) > at > org.apache.lucene.codecs.blocktree.SegmentTermsEnumFrame.(SegmentTermsEnumFrame.java:100) > at > org.apache.lucene.codecs.blocktree.SegmentTermsEnum.getFrame(SegmentTermsEnum.java:215) > at > org.apache.lucene.codecs.blocktree.SegmentTermsEnum.pushFrame(SegmentTermsEnum.java:241) > at > org.apache.lucene.codecs.blocktree.SegmentTermsEnum.seekCeil(SegmentTermsEnum.java:728) > at > org.apache.lucene.index.FilterLeafReader$FilterTermsEnum.seekCeil(FilterLeafReader.java:185) > at org.apache.lucene.index.TermsEnum.seekExact(TermsEnum.java:74) > at org.apache.lucene.index.TermContext.b
[jira] [Commented] (SOLR-8539) Solr queries swallows up OutOfMemoryErrors
[ https://issues.apache.org/jira/browse/SOLR-8539?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15101076#comment-15101076 ] Greg Wilkins commented on SOLR-8539: So I'm going to close the [jetty issue](https://bugs.eclipse.org/bugs/show_bug.cgi?id=485794) for this as won't fix. I think our current behaviour of bravely and foolishly trying to limp on is probably the correct one - given that OOOME handling is on throwing not catching. Anyway, thanks for bringing this to our attention - was educational. Do open more jetty issues if you have any other concerns/ideas about our error handling or anything else. cheers > Solr queries swallows up OutOfMemoryErrors > -- > > Key: SOLR-8539 > URL: https://issues.apache.org/jira/browse/SOLR-8539 > Project: Solr > Issue Type: Bug >Reporter: Varun Thacker > Fix For: 5.5, Trunk > > Attachments: SOLR-8539.patch > > > I was testing a crazy surround query and was hitting OOMs easily with the > query. However I saw that the OOM killer wasn't triggered. Here is the stack > trace of the error on solr 5.4: > {code} > WARN - 2016-01-12 18:37:03.920; [ x:techproducts] > org.eclipse.jetty.util.thread.QueuedThreadPool$3; > java.lang.OutOfMemoryError: Java heap space > at > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.addConditionWaiter(AbstractQueuedSynchronizer.java:1855) > at > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2068) > at > org.eclipse.jetty.util.BlockingArrayQueue.poll(BlockingArrayQueue.java:389) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.idleJobPoll(QueuedThreadPool.java:531) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.access$700(QueuedThreadPool.java:47) > at > org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:590) > at java.lang.Thread.run(Thread.java:745) > ERROR - 2016-01-12 18:37:03.922; [ x:techproducts] > org.apache.solr.common.SolrException; null:java.lang.RuntimeException: > java.lang.OutOfMemoryError: Java heap space > at > org.apache.solr.servlet.HttpSolrCall.sendError(HttpSolrCall.java:611) > at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:472) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:222) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:181) > at > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) > at > org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) > at > org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577) > at > org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223) > at > org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) > at > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) > at > org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) > at > org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) > at > org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215) > at > org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110) > at > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) > at org.eclipse.jetty.server.Server.handle(Server.java:499) > at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) > at > org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) > at > org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) > at > org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) > at java.lang.Thread.run(Thread.java:745) > Caused by: java.lang.OutOfMemoryError: Java heap space > at > org.apache.lucene.codecs.lucene50.Lucene50PostingsReader.newTermState(Lucene50PostingsReader.java:149) > at > org.apache.lucene.codecs.blocktree.SegmentTermsEnumFrame.(SegmentTermsEnumFrame.java:100) > at > org.apache.lucene.codecs.blocktree.SegmentTermsEnum.getFrame(SegmentTermsEnum.java:215) > at > org.apache.lucene.codecs.blocktree.SegmentTermsEnum
[jira] [Commented] (SOLR-8539) Solr queries swallows up OutOfMemoryErrors
[ https://issues.apache.org/jira/browse/SOLR-8539?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15101050#comment-15101050 ] Mark Miller commented on SOLR-8539: --- Also, while I don't expect it's involved in these low memory simlulation cases, there is a general problem with OnOutOfMemoryError and larger heaps it seems (which can prevent it from working): https://bugs.openjdk.java.net/browse/JDK-8027434 > Solr queries swallows up OutOfMemoryErrors > -- > > Key: SOLR-8539 > URL: https://issues.apache.org/jira/browse/SOLR-8539 > Project: Solr > Issue Type: Bug >Reporter: Varun Thacker > Fix For: 5.5, Trunk > > Attachments: SOLR-8539.patch > > > I was testing a crazy surround query and was hitting OOMs easily with the > query. However I saw that the OOM killer wasn't triggered. Here is the stack > trace of the error on solr 5.4: > {code} > WARN - 2016-01-12 18:37:03.920; [ x:techproducts] > org.eclipse.jetty.util.thread.QueuedThreadPool$3; > java.lang.OutOfMemoryError: Java heap space > at > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.addConditionWaiter(AbstractQueuedSynchronizer.java:1855) > at > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2068) > at > org.eclipse.jetty.util.BlockingArrayQueue.poll(BlockingArrayQueue.java:389) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.idleJobPoll(QueuedThreadPool.java:531) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.access$700(QueuedThreadPool.java:47) > at > org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:590) > at java.lang.Thread.run(Thread.java:745) > ERROR - 2016-01-12 18:37:03.922; [ x:techproducts] > org.apache.solr.common.SolrException; null:java.lang.RuntimeException: > java.lang.OutOfMemoryError: Java heap space > at > org.apache.solr.servlet.HttpSolrCall.sendError(HttpSolrCall.java:611) > at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:472) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:222) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:181) > at > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) > at > org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) > at > org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577) > at > org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223) > at > org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) > at > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) > at > org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) > at > org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) > at > org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215) > at > org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110) > at > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) > at org.eclipse.jetty.server.Server.handle(Server.java:499) > at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) > at > org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) > at > org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) > at > org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) > at java.lang.Thread.run(Thread.java:745) > Caused by: java.lang.OutOfMemoryError: Java heap space > at > org.apache.lucene.codecs.lucene50.Lucene50PostingsReader.newTermState(Lucene50PostingsReader.java:149) > at > org.apache.lucene.codecs.blocktree.SegmentTermsEnumFrame.(SegmentTermsEnumFrame.java:100) > at > org.apache.lucene.codecs.blocktree.SegmentTermsEnum.getFrame(SegmentTermsEnum.java:215) > at > org.apache.lucene.codecs.blocktree.SegmentTermsEnum.pushFrame(SegmentTermsEnum.java:241) > at > org.apache.lucene.codecs.blocktree.SegmentTermsEnum.seekCeil(SegmentTermsEnum.java:728) > at > org.apache.lucene.index.FilterLeafReader$FilterTermsEnum.seekCeil(FilterLe
[jira] [Commented] (SOLR-8539) Solr queries swallows up OutOfMemoryErrors
[ https://issues.apache.org/jira/browse/SOLR-8539?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15101048#comment-15101048 ] Mark Miller commented on SOLR-8539: --- bq. I even duplicated the report here and I see it working. I should mention, the difference being, I did not use the script to start Solr. I did it myself with -XX:OnOutOfMemoryError='echo OOM %p' Results in: {noformat} [java] 520727 INFO (qtp1013423070-32) [ ] o.a.s.s.HttpSolrCall [admin] webapp=null path=/admin/info/system params={wt=json&_=1452822748177} status=0 QTime=7 [java] # [java] # java.lang.OutOfMemoryError: Java heap space [java] # -XX:OnOutOfMemoryError="echo OOM %p" [java] # Executing /bin/sh -c "echo OOM 19890"... [java] OOM 19890 [java] 522083 ERROR (qtp1013423070-30) [ x:my_core] o.a.s.s.HttpSolrCall null:java.lang.RuntimeException: java.lang.OutOfMemoryError: Java heap space [java] at org.apache.solr.servlet.HttpSolrCall.sendError(HttpSolrCall.java:605) [java] at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:474) [java] at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:226) [java] at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:184) [java] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) {noformat} > Solr queries swallows up OutOfMemoryErrors > -- > > Key: SOLR-8539 > URL: https://issues.apache.org/jira/browse/SOLR-8539 > Project: Solr > Issue Type: Bug >Reporter: Varun Thacker > Fix For: 5.5, Trunk > > Attachments: SOLR-8539.patch > > > I was testing a crazy surround query and was hitting OOMs easily with the > query. However I saw that the OOM killer wasn't triggered. Here is the stack > trace of the error on solr 5.4: > {code} > WARN - 2016-01-12 18:37:03.920; [ x:techproducts] > org.eclipse.jetty.util.thread.QueuedThreadPool$3; > java.lang.OutOfMemoryError: Java heap space > at > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.addConditionWaiter(AbstractQueuedSynchronizer.java:1855) > at > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2068) > at > org.eclipse.jetty.util.BlockingArrayQueue.poll(BlockingArrayQueue.java:389) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.idleJobPoll(QueuedThreadPool.java:531) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.access$700(QueuedThreadPool.java:47) > at > org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:590) > at java.lang.Thread.run(Thread.java:745) > ERROR - 2016-01-12 18:37:03.922; [ x:techproducts] > org.apache.solr.common.SolrException; null:java.lang.RuntimeException: > java.lang.OutOfMemoryError: Java heap space > at > org.apache.solr.servlet.HttpSolrCall.sendError(HttpSolrCall.java:611) > at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:472) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:222) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:181) > at > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) > at > org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) > at > org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577) > at > org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223) > at > org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) > at > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) > at > org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) > at > org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) > at > org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215) > at > org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110) > at > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) > at org.eclipse.jetty.server.Server.handle(Server.java:499) > at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) > at > org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) > at > or
[jira] [Commented] (SOLR-8539) Solr queries swallows up OutOfMemoryErrors
[ https://issues.apache.org/jira/browse/SOLR-8539?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15101044#comment-15101044 ] Mark Miller commented on SOLR-8539: --- bq. The documentation for the mechanism says: "Run user-defined commands when an OutOfMemoryError is first thrown.", which would suggest how the exception is handled is not important? But perhaps that documentation is wrong? Previous JIRA's that have been filed let me to believe that is not what happens, but a little testing out by hand confirms it. When this does not work as expected, it must be due to another piece. > Solr queries swallows up OutOfMemoryErrors > -- > > Key: SOLR-8539 > URL: https://issues.apache.org/jira/browse/SOLR-8539 > Project: Solr > Issue Type: Bug >Reporter: Varun Thacker > Fix For: 5.5, Trunk > > Attachments: SOLR-8539.patch > > > I was testing a crazy surround query and was hitting OOMs easily with the > query. However I saw that the OOM killer wasn't triggered. Here is the stack > trace of the error on solr 5.4: > {code} > WARN - 2016-01-12 18:37:03.920; [ x:techproducts] > org.eclipse.jetty.util.thread.QueuedThreadPool$3; > java.lang.OutOfMemoryError: Java heap space > at > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.addConditionWaiter(AbstractQueuedSynchronizer.java:1855) > at > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2068) > at > org.eclipse.jetty.util.BlockingArrayQueue.poll(BlockingArrayQueue.java:389) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.idleJobPoll(QueuedThreadPool.java:531) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.access$700(QueuedThreadPool.java:47) > at > org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:590) > at java.lang.Thread.run(Thread.java:745) > ERROR - 2016-01-12 18:37:03.922; [ x:techproducts] > org.apache.solr.common.SolrException; null:java.lang.RuntimeException: > java.lang.OutOfMemoryError: Java heap space > at > org.apache.solr.servlet.HttpSolrCall.sendError(HttpSolrCall.java:611) > at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:472) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:222) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:181) > at > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) > at > org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) > at > org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577) > at > org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223) > at > org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) > at > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) > at > org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) > at > org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) > at > org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215) > at > org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110) > at > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) > at org.eclipse.jetty.server.Server.handle(Server.java:499) > at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) > at > org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) > at > org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) > at > org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) > at java.lang.Thread.run(Thread.java:745) > Caused by: java.lang.OutOfMemoryError: Java heap space > at > org.apache.lucene.codecs.lucene50.Lucene50PostingsReader.newTermState(Lucene50PostingsReader.java:149) > at > org.apache.lucene.codecs.blocktree.SegmentTermsEnumFrame.(SegmentTermsEnumFrame.java:100) > at > org.apache.lucene.codecs.blocktree.SegmentTermsEnum.getFrame(SegmentTermsEnum.java:215) > at > org.apache.lucene.codecs.blocktree.SegmentTermsEnum.pushFrame(SegmentTermsEnum.java:241) > at
[jira] [Commented] (SOLR-8539) Solr queries swallows up OutOfMemoryErrors
[ https://issues.apache.org/jira/browse/SOLR-8539?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15101041#comment-15101041 ] Mark Miller commented on SOLR-8539: --- bq. Namely that it will "Run user-defined commands when an OutOfMemoryError is first thrown. (Introduced in 1.4.2 update 12, 6)" I was doing the same and found the same thing. It doesn't matter if you catch it or not. I even duplicated the report here and I see it working. It must be the command line property or the script that it triggers that is off. > Solr queries swallows up OutOfMemoryErrors > -- > > Key: SOLR-8539 > URL: https://issues.apache.org/jira/browse/SOLR-8539 > Project: Solr > Issue Type: Bug >Reporter: Varun Thacker > Fix For: 5.5, Trunk > > Attachments: SOLR-8539.patch > > > I was testing a crazy surround query and was hitting OOMs easily with the > query. However I saw that the OOM killer wasn't triggered. Here is the stack > trace of the error on solr 5.4: > {code} > WARN - 2016-01-12 18:37:03.920; [ x:techproducts] > org.eclipse.jetty.util.thread.QueuedThreadPool$3; > java.lang.OutOfMemoryError: Java heap space > at > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.addConditionWaiter(AbstractQueuedSynchronizer.java:1855) > at > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2068) > at > org.eclipse.jetty.util.BlockingArrayQueue.poll(BlockingArrayQueue.java:389) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.idleJobPoll(QueuedThreadPool.java:531) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.access$700(QueuedThreadPool.java:47) > at > org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:590) > at java.lang.Thread.run(Thread.java:745) > ERROR - 2016-01-12 18:37:03.922; [ x:techproducts] > org.apache.solr.common.SolrException; null:java.lang.RuntimeException: > java.lang.OutOfMemoryError: Java heap space > at > org.apache.solr.servlet.HttpSolrCall.sendError(HttpSolrCall.java:611) > at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:472) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:222) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:181) > at > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) > at > org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) > at > org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577) > at > org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223) > at > org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) > at > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) > at > org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) > at > org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) > at > org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215) > at > org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110) > at > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) > at org.eclipse.jetty.server.Server.handle(Server.java:499) > at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) > at > org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) > at > org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) > at > org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) > at java.lang.Thread.run(Thread.java:745) > Caused by: java.lang.OutOfMemoryError: Java heap space > at > org.apache.lucene.codecs.lucene50.Lucene50PostingsReader.newTermState(Lucene50PostingsReader.java:149) > at > org.apache.lucene.codecs.blocktree.SegmentTermsEnumFrame.(SegmentTermsEnumFrame.java:100) > at > org.apache.lucene.codecs.blocktree.SegmentTermsEnum.getFrame(SegmentTermsEnum.java:215) > at > org.apache.lucene.codecs.blocktree.SegmentTermsEnum.pushFrame(SegmentTermsEnum.java:241) > at > org.apache.lucene.codecs.blocktree.SegmentTermsEnum.seekCeil(Segm
[jira] [Commented] (SOLR-8539) Solr queries swallows up OutOfMemoryErrors
[ https://issues.apache.org/jira/browse/SOLR-8539?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15099255#comment-15099255 ] Shawn Heisey commented on SOLR-8539: Would 9.2.13 handle that the same? The stable branch of Solr is using that version of Jetty, and requires Java 7. Our trunk branch requires Java 8. We did have that branch upgraded to Jetty 9.3, but had some problems unrelated to this issue, so that upgrade has recently been reverted. I wonder what might be happening with Solr that this would behave differently. I wonder if our script is not working right. When I find some time I can do some experiments on a 5.3.2 snapshot. Does the presence of a Filter make any difference? Pretty much everything in Solr is handled through SolrDispatchFilter, which ultimately inherits from javax.servlet.Filter. > Solr queries swallows up OutOfMemoryErrors > -- > > Key: SOLR-8539 > URL: https://issues.apache.org/jira/browse/SOLR-8539 > Project: Solr > Issue Type: Bug >Reporter: Varun Thacker > Fix For: 5.5, Trunk > > Attachments: SOLR-8539.patch > > > I was testing a crazy surround query and was hitting OOMs easily with the > query. However I saw that the OOM killer wasn't triggered. Here is the stack > trace of the error on solr 5.4: > {code} > WARN - 2016-01-12 18:37:03.920; [ x:techproducts] > org.eclipse.jetty.util.thread.QueuedThreadPool$3; > java.lang.OutOfMemoryError: Java heap space > at > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.addConditionWaiter(AbstractQueuedSynchronizer.java:1855) > at > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2068) > at > org.eclipse.jetty.util.BlockingArrayQueue.poll(BlockingArrayQueue.java:389) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.idleJobPoll(QueuedThreadPool.java:531) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.access$700(QueuedThreadPool.java:47) > at > org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:590) > at java.lang.Thread.run(Thread.java:745) > ERROR - 2016-01-12 18:37:03.922; [ x:techproducts] > org.apache.solr.common.SolrException; null:java.lang.RuntimeException: > java.lang.OutOfMemoryError: Java heap space > at > org.apache.solr.servlet.HttpSolrCall.sendError(HttpSolrCall.java:611) > at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:472) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:222) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:181) > at > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) > at > org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) > at > org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577) > at > org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223) > at > org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) > at > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) > at > org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) > at > org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) > at > org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215) > at > org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110) > at > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) > at org.eclipse.jetty.server.Server.handle(Server.java:499) > at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) > at > org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) > at > org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) > at > org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) > at java.lang.Thread.run(Thread.java:745) > Caused by: java.lang.OutOfMemoryError: Java heap space > at > org.apache.lucene.codecs.lucene50.Lucene50PostingsReader.newTermState(Lucene50PostingsReader.java:149) > at > org.apache.lucene.codecs.blocktree.SegmentTermsEnumFrame.(SegmentTerm
[jira] [Commented] (SOLR-8539) Solr queries swallows up OutOfMemoryErrors
[ https://issues.apache.org/jira/browse/SOLR-8539?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15099214#comment-15099214 ] Joakim Erdfelt commented on SOLR-8539: -- We've been testing the OOME handling on the Jetty side to see where we would need to make improvements. We've discovered that the {{-XX:OnOutOfMemoryError}} works as documented in the JVM. Namely that it will ??"Run user-defined commands when an OutOfMemoryError is first thrown. (Introduced in 1.4.2 update 12, 6)"?? We tested this in two different ways, and put the examples up on github at https://github.com/jetty-project/jetty-oome h4. Technique #1: in a distribution The project is also a valid {{jetty.base}} directory and can be utilized as one directly. {code:none} $ mvn clean install $ java -Xmx64m -XX:OnOutOfMemoryError="kill -9 %p" -jar ~/code/jetty/distros/jetty-distribution-9.3.6.v20151106/start.jar {code} (In a different terminal, issue the http request to trigger the OOME) {code:none} $ curl http://localhost:88080/oome/ {code} The output is as follows ... {code:none} $ java -Xmx64m -XX:OnOutOfMemoryError="kill -9 %p" -jar ~/code/jetty/distros/jetty-distribution-9.3.6.v20151106/start.jar 2016-01-14 17:31:33.253:INFO::main: Logging initialized @291ms 2016-01-14 17:31:33.352:WARN:oejx.XmlConfiguration:main: Property 'jetty.port' is deprecated, use 'jetty.http.port' instead 2016-01-14 17:31:33.393:INFO:oejs.Server:main: jetty-9.3.6.v20151106 2016-01-14 17:31:33.406:INFO:oejdp.ScanningAppProvider:main: Deployment monitor [file:///home/joakim/code/jetty/github-jetty-project/jetty-oome/webapps/] at interval 1 2016-01-14 17:31:33.520:INFO:oejw.StandardDescriptorProcessor:main: NO JSP Support for /oome, did not find org.eclipse.jetty.jsp.JettyJspServlet 2016-01-14 17:31:33.548:INFO:oejsh.ContextHandler:main: Started o.e.j.w.WebAppContext@7225790e{/oome,file:///tmp/jetty-0.0.0.0-8080-oome.war-_oome-any-5546839308576240840.dir/webapp/,AVAILABLE}{/oome.war} 2016-01-14 17:31:33.578:INFO:oejw.StandardDescriptorProcessor:main: NO JSP Support for /wsecho, did not find org.eclipse.jetty.jsp.JettyJspServlet 2016-01-14 17:31:33.580:INFO:oejsh.ContextHandler:main: Started o.e.j.w.WebAppContext@a7e666{/wsecho,file:///tmp/jetty-0.0.0.0-8080-wsecho.war-_wsecho-any-6960823368392015323.dir/webapp/,AVAILABLE}{/wsecho.war} 2016-01-14 17:31:33.593:INFO:oejs.ServerConnector:main: Started ServerConnector@4d95d2a2{HTTP/1.1,[http/1.1]}{0.0.0.0:8080} 2016-01-14 17:31:33.594:INFO:oejs.Server:main: Started @633ms xzzz# # java.lang.OutOfMemoryError: Java heap space # -XX:OnOutOfMemoryError="kill -9 %p" # Executing /bin/sh -c "kill -9 13803"... Killed {code} h4. Technique #2: directly attempting to prevent {{-XX:OnOutOfMemoryError}} from working There's a simple class in [https://github.com/jetty-project/jetty-oome/blob/master/src/main/java/test/Ohme.java] that attempts to replicate the threading model in Jetty at its most distilled and attempt to prevent the OOME from triggering the {{-XX:OnOutOfMemoryError}} script. {code:none} $ mvn clean install $ java -Xmx64m -XX:OnOutOfMemoryError="kill -9 %p" -cp target/classes test.Ohme xzzz# # java.lang.OutOfMemoryError: Java heap space # -XX:OnOutOfMemoryError="kill -9 %p" # Executing /bin/sh -c "kill -9 14382"... Killed {code} Some notes on the output seen: The main thread will output a {{"."}} every 500ms The executor thread will output a {{"x"}} when it enters into the runnable, and a {{"z"}} every time it loops through and consumes more memory, and finally a {{"!"}} if the Error is ever caught. h4. Observed results In neither scenario have we seen the {{-XX:OnOutOfMemoryError}} not execute, in fact we can't even demonstrate a way *to* prevent it. > Solr queries swallows up OutOfMemoryErrors > -- > > Key: SOLR-8539 > URL: https://issues.apache.org/jira/browse/SOLR-8539 > Project: Solr > Issue Type: Bug >Reporter: Varun Thacker > Fix For: 5.5, Trunk > > Attachments: SOLR-8539.patch > > > I was testing a crazy surround query and was hitting OOMs easily with the > query. However I saw that the OOM killer wasn't triggered. Here is the stack > trace of the error on solr 5.4: > {code} > WARN - 2016-01-12 18:37:03.920; [ x:techproducts] > org.eclipse.jetty.util.thread.QueuedThreadPool$3; > java.lang.OutOfMemoryError: Java heap space > at > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.addConditionWaiter(AbstractQueuedSynchronizer.java:1855) > at > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2068) > at > org.eclipse.jetty.util.BlockingArrayQueue.poll(BlockingArrayQueue.java:389) > at > org.eclipse.jetty.util.thread.Queue
[jira] [Commented] (SOLR-8539) Solr queries swallows up OutOfMemoryErrors
[ https://issues.apache.org/jira/browse/SOLR-8539?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15099172#comment-15099172 ] Greg Wilkins commented on SOLR-8539: Mark, the suggestion made over in the jetty discussion for this is that if we see OOME in a few key places, then we could that to a Server.stop(Throwable), which would stop the server and then throw the OOME from the Server.join() method, which the main thread should be blocked on. ... or are you saying that it is sufficient to allow the OOME to propagate to any thread?? The documentation for the mechanism says: "Run user-defined commands when an OutOfMemoryError is first thrown.", which would suggest how the exception is handled is not important? But perhaps that documentation is wrong? > Solr queries swallows up OutOfMemoryErrors > -- > > Key: SOLR-8539 > URL: https://issues.apache.org/jira/browse/SOLR-8539 > Project: Solr > Issue Type: Bug >Reporter: Varun Thacker > Fix For: 5.5, Trunk > > Attachments: SOLR-8539.patch > > > I was testing a crazy surround query and was hitting OOMs easily with the > query. However I saw that the OOM killer wasn't triggered. Here is the stack > trace of the error on solr 5.4: > {code} > WARN - 2016-01-12 18:37:03.920; [ x:techproducts] > org.eclipse.jetty.util.thread.QueuedThreadPool$3; > java.lang.OutOfMemoryError: Java heap space > at > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.addConditionWaiter(AbstractQueuedSynchronizer.java:1855) > at > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2068) > at > org.eclipse.jetty.util.BlockingArrayQueue.poll(BlockingArrayQueue.java:389) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.idleJobPoll(QueuedThreadPool.java:531) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.access$700(QueuedThreadPool.java:47) > at > org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:590) > at java.lang.Thread.run(Thread.java:745) > ERROR - 2016-01-12 18:37:03.922; [ x:techproducts] > org.apache.solr.common.SolrException; null:java.lang.RuntimeException: > java.lang.OutOfMemoryError: Java heap space > at > org.apache.solr.servlet.HttpSolrCall.sendError(HttpSolrCall.java:611) > at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:472) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:222) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:181) > at > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) > at > org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) > at > org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577) > at > org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223) > at > org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) > at > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) > at > org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) > at > org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) > at > org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215) > at > org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110) > at > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) > at org.eclipse.jetty.server.Server.handle(Server.java:499) > at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) > at > org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) > at > org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) > at > org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) > at java.lang.Thread.run(Thread.java:745) > Caused by: java.lang.OutOfMemoryError: Java heap space > at > org.apache.lucene.codecs.lucene50.Lucene50PostingsReader.newTermState(Lucene50PostingsReader.java:149) > at > org.apache.lucene.codecs.blocktree.SegmentTermsEnumFrame.(SegmentTermsEnumFrame.java:100) > at > org.apache.lucene.codecs
[jira] [Commented] (SOLR-8539) Solr queries swallows up OutOfMemoryErrors
[ https://issues.apache.org/jira/browse/SOLR-8539?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15099168#comment-15099168 ] Greg Wilkins commented on SOLR-8539: Sean, from the jetty point of view - the server is entirely designed with the intention of being embedded. Jetty is primarily a software component before it is a software container... it just so happens that we distribute with our components assembled as a standard servlet container. You'll have noted that our XML configuration is just calling the java API, so it is easy to convert to embedded. Embedding jetty is a very easy and sensible path to go down. With regards to the servlet container, the vast majority of that complexity is optional and if you are configuring your own server you don't need to instantiate it. You can easily get rid of servlet classloaders, security, sessions, even servlets themselves if you want to write to the jetty APIs. So if you program to Jetty at the Server+Handler level, you get pretty much the same level of abstraction as offered by Netty - but with the servlet request API for familiarity. We provide the same kind of async capability - but perhaps the servlet API is a little more clunky (but also has its good points as well). In short - if servlets & webapps are seen as a burden, then don't use them. We are happy to give advice as to how to not use the full servlet container. We are also keen to participate in discussions like this on OOME handling, to improve our embeddability and adaptability for more use cases. > Solr queries swallows up OutOfMemoryErrors > -- > > Key: SOLR-8539 > URL: https://issues.apache.org/jira/browse/SOLR-8539 > Project: Solr > Issue Type: Bug >Reporter: Varun Thacker > Fix For: 5.5, Trunk > > Attachments: SOLR-8539.patch > > > I was testing a crazy surround query and was hitting OOMs easily with the > query. However I saw that the OOM killer wasn't triggered. Here is the stack > trace of the error on solr 5.4: > {code} > WARN - 2016-01-12 18:37:03.920; [ x:techproducts] > org.eclipse.jetty.util.thread.QueuedThreadPool$3; > java.lang.OutOfMemoryError: Java heap space > at > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.addConditionWaiter(AbstractQueuedSynchronizer.java:1855) > at > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2068) > at > org.eclipse.jetty.util.BlockingArrayQueue.poll(BlockingArrayQueue.java:389) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.idleJobPoll(QueuedThreadPool.java:531) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.access$700(QueuedThreadPool.java:47) > at > org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:590) > at java.lang.Thread.run(Thread.java:745) > ERROR - 2016-01-12 18:37:03.922; [ x:techproducts] > org.apache.solr.common.SolrException; null:java.lang.RuntimeException: > java.lang.OutOfMemoryError: Java heap space > at > org.apache.solr.servlet.HttpSolrCall.sendError(HttpSolrCall.java:611) > at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:472) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:222) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:181) > at > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) > at > org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) > at > org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577) > at > org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223) > at > org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) > at > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) > at > org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) > at > org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) > at > org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215) > at > org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110) > at > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) > at org.eclipse.jetty.server.Server.handle(Server.java:499) > at org.eclipse.jetty.se
[jira] [Commented] (SOLR-8539) Solr queries swallows up OutOfMemoryErrors
[ https://issues.apache.org/jira/browse/SOLR-8539?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15099157#comment-15099157 ] Mark Miller commented on SOLR-8539: --- bq. Many libraries now spawn their own threads and thread pools. Yes, but most libraries will need eat OOMExceptions, and will address if they are. bq. As for exiting the VM on all VirtualMachineErrors, that seems improper too. That is not what we are looking for. The JVM provides a specific feature to exit on OOMException, not any error. We are seeking the same behavior. Trying to limp on after an OOM exception can cause nasty results in a cluster env. > Solr queries swallows up OutOfMemoryErrors > -- > > Key: SOLR-8539 > URL: https://issues.apache.org/jira/browse/SOLR-8539 > Project: Solr > Issue Type: Bug >Reporter: Varun Thacker > Fix For: 5.5, Trunk > > Attachments: SOLR-8539.patch > > > I was testing a crazy surround query and was hitting OOMs easily with the > query. However I saw that the OOM killer wasn't triggered. Here is the stack > trace of the error on solr 5.4: > {code} > WARN - 2016-01-12 18:37:03.920; [ x:techproducts] > org.eclipse.jetty.util.thread.QueuedThreadPool$3; > java.lang.OutOfMemoryError: Java heap space > at > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.addConditionWaiter(AbstractQueuedSynchronizer.java:1855) > at > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2068) > at > org.eclipse.jetty.util.BlockingArrayQueue.poll(BlockingArrayQueue.java:389) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.idleJobPoll(QueuedThreadPool.java:531) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.access$700(QueuedThreadPool.java:47) > at > org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:590) > at java.lang.Thread.run(Thread.java:745) > ERROR - 2016-01-12 18:37:03.922; [ x:techproducts] > org.apache.solr.common.SolrException; null:java.lang.RuntimeException: > java.lang.OutOfMemoryError: Java heap space > at > org.apache.solr.servlet.HttpSolrCall.sendError(HttpSolrCall.java:611) > at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:472) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:222) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:181) > at > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) > at > org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) > at > org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577) > at > org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223) > at > org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) > at > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) > at > org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) > at > org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) > at > org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215) > at > org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110) > at > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) > at org.eclipse.jetty.server.Server.handle(Server.java:499) > at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) > at > org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) > at > org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) > at > org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) > at java.lang.Thread.run(Thread.java:745) > Caused by: java.lang.OutOfMemoryError: Java heap space > at > org.apache.lucene.codecs.lucene50.Lucene50PostingsReader.newTermState(Lucene50PostingsReader.java:149) > at > org.apache.lucene.codecs.blocktree.SegmentTermsEnumFrame.(SegmentTermsEnumFrame.java:100) > at > org.apache.lucene.codecs.blocktree.SegmentTermsEnum.getFrame(SegmentTermsEnum.java:215) > at > org.apache.lucene.codecs.blocktree.SegmentTermsEnum.pushFrame(Se
[jira] [Commented] (SOLR-8539) Solr queries swallows up OutOfMemoryErrors
[ https://issues.apache.org/jira/browse/SOLR-8539?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15099139#comment-15099139 ] Shawn Heisey commented on SOLR-8539: This whole comment is a tangent, so skip or read accordingly. One large goal we've got for Solr is to make it a standalone program. One way to do that would be to embed Jetty and handle its configuration completely in our own code, from one of our own config files. This is likely the easiest path, because it would involve very little change to existing code. The significant changes would likely be new classes. Another option, which would probably involve significant rewrites of some classes, is to switch to a lower-level framework like Netty. Solr doesn't really need a lot of the functionality that a full servlet container provides, and Netty's claims look inviting. Going far into left field, another consideration we have is HTTP/2 support. Jetty has HTTP/2 already with 9.3, which requires Java 8. In our stable versions we are on Java 7 and Jetty 9.2, but 6.0 will require Java 8. HttpClient (the library used by SolrJ) does not support HTTP/2, and support is a long way off. JettyClient has been mentioned as a possible replacement on SOLR-7442. Netty also has HTTP/2 support in the client and the server, but I wouldn't want to actually switch to Netty unless there are demonstrable benefits in features (besides HTTP/2), performance, and/or ease of development. > Solr queries swallows up OutOfMemoryErrors > -- > > Key: SOLR-8539 > URL: https://issues.apache.org/jira/browse/SOLR-8539 > Project: Solr > Issue Type: Bug >Reporter: Varun Thacker > Fix For: 5.5, Trunk > > Attachments: SOLR-8539.patch > > > I was testing a crazy surround query and was hitting OOMs easily with the > query. However I saw that the OOM killer wasn't triggered. Here is the stack > trace of the error on solr 5.4: > {code} > WARN - 2016-01-12 18:37:03.920; [ x:techproducts] > org.eclipse.jetty.util.thread.QueuedThreadPool$3; > java.lang.OutOfMemoryError: Java heap space > at > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.addConditionWaiter(AbstractQueuedSynchronizer.java:1855) > at > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2068) > at > org.eclipse.jetty.util.BlockingArrayQueue.poll(BlockingArrayQueue.java:389) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.idleJobPoll(QueuedThreadPool.java:531) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.access$700(QueuedThreadPool.java:47) > at > org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:590) > at java.lang.Thread.run(Thread.java:745) > ERROR - 2016-01-12 18:37:03.922; [ x:techproducts] > org.apache.solr.common.SolrException; null:java.lang.RuntimeException: > java.lang.OutOfMemoryError: Java heap space > at > org.apache.solr.servlet.HttpSolrCall.sendError(HttpSolrCall.java:611) > at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:472) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:222) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:181) > at > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) > at > org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) > at > org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577) > at > org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223) > at > org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) > at > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) > at > org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) > at > org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) > at > org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215) > at > org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110) > at > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) > at org.eclipse.jetty.server.Server.handle(Server.java:499) > at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) > at > org.eclipse.jetty.server.HttpConnect
[jira] [Commented] (SOLR-8539) Solr queries swallows up OutOfMemoryErrors
[ https://issues.apache.org/jira/browse/SOLR-8539?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15099114#comment-15099114 ] Joakim Erdfelt commented on SOLR-8539: -- If the Throwable occurs outside of a Jetty thread, we cannot process this down to the JVM for you. Many libraries now spawn their own threads and thread pools. There are also valid libraries that use OOME themselves to downgrade performance when under too much load (most common are image and video processing libraries) As for exiting the VM on _all_ VirtualMachineErrors, that seems improper too. java.lang.VirtualMachineError - java.lang.InternalError - java.lang.UnknownError - java.lang.StackOverflowError <-- this one is very easy to recover from, we shouldn't exit JVM because of this one. - java.lang.OutOfMemoryError > Solr queries swallows up OutOfMemoryErrors > -- > > Key: SOLR-8539 > URL: https://issues.apache.org/jira/browse/SOLR-8539 > Project: Solr > Issue Type: Bug >Reporter: Varun Thacker > Fix For: 5.5, Trunk > > Attachments: SOLR-8539.patch > > > I was testing a crazy surround query and was hitting OOMs easily with the > query. However I saw that the OOM killer wasn't triggered. Here is the stack > trace of the error on solr 5.4: > {code} > WARN - 2016-01-12 18:37:03.920; [ x:techproducts] > org.eclipse.jetty.util.thread.QueuedThreadPool$3; > java.lang.OutOfMemoryError: Java heap space > at > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.addConditionWaiter(AbstractQueuedSynchronizer.java:1855) > at > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2068) > at > org.eclipse.jetty.util.BlockingArrayQueue.poll(BlockingArrayQueue.java:389) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.idleJobPoll(QueuedThreadPool.java:531) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.access$700(QueuedThreadPool.java:47) > at > org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:590) > at java.lang.Thread.run(Thread.java:745) > ERROR - 2016-01-12 18:37:03.922; [ x:techproducts] > org.apache.solr.common.SolrException; null:java.lang.RuntimeException: > java.lang.OutOfMemoryError: Java heap space > at > org.apache.solr.servlet.HttpSolrCall.sendError(HttpSolrCall.java:611) > at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:472) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:222) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:181) > at > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) > at > org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) > at > org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577) > at > org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223) > at > org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) > at > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) > at > org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) > at > org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) > at > org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215) > at > org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110) > at > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) > at org.eclipse.jetty.server.Server.handle(Server.java:499) > at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) > at > org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) > at > org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) > at > org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) > at java.lang.Thread.run(Thread.java:745) > Caused by: java.lang.OutOfMemoryError: Java heap space > at > org.apache.lucene.codecs.lucene50.Lucene50PostingsReader.newTermState(Lucene50PostingsReader.java:149) > at > org.apache.lucene.codecs.blocktree.SegmentTermsEnumFrame.(SegmentTermsEnumFrame.java:100)
[jira] [Commented] (SOLR-8539) Solr queries swallows up OutOfMemoryErrors
[ https://issues.apache.org/jira/browse/SOLR-8539?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15099075#comment-15099075 ] Greg Wilkins commented on SOLR-8539: Unfortunately spec requires us to handle Errors - also there are good lifecycle reasons for doing so. While I think OOME and the like are more often than not fatal, there is still some value in attempting to return a 500 and reasonable prospects (if the attempted allocation was large, many smaller ones might succeed and jetty does not need much memory). In fact SOLR-8453 is about how the server does send an error response when confronted with an application exception, so it is hard to say generally that we should not attempt normal error handling (which may include logging, notification, System.exit etc.). Thus as a container, I think we are going to have to attempt to handle VirtualMachineErrors in as much as we call whatever pluggable APIs given (onError, error page dispatch) to notify of the exception. If we suffer another error while attempting to do that, it can propagate back to the thread/JVM. Note also that Netty has a slightly easier job in regards to this, as it does not have to deal with the complexities of the servlet API - both synchronous and asynchronous. > Solr queries swallows up OutOfMemoryErrors > -- > > Key: SOLR-8539 > URL: https://issues.apache.org/jira/browse/SOLR-8539 > Project: Solr > Issue Type: Bug >Reporter: Varun Thacker > Fix For: 5.5, Trunk > > Attachments: SOLR-8539.patch > > > I was testing a crazy surround query and was hitting OOMs easily with the > query. However I saw that the OOM killer wasn't triggered. Here is the stack > trace of the error on solr 5.4: > {code} > WARN - 2016-01-12 18:37:03.920; [ x:techproducts] > org.eclipse.jetty.util.thread.QueuedThreadPool$3; > java.lang.OutOfMemoryError: Java heap space > at > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.addConditionWaiter(AbstractQueuedSynchronizer.java:1855) > at > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2068) > at > org.eclipse.jetty.util.BlockingArrayQueue.poll(BlockingArrayQueue.java:389) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.idleJobPoll(QueuedThreadPool.java:531) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.access$700(QueuedThreadPool.java:47) > at > org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:590) > at java.lang.Thread.run(Thread.java:745) > ERROR - 2016-01-12 18:37:03.922; [ x:techproducts] > org.apache.solr.common.SolrException; null:java.lang.RuntimeException: > java.lang.OutOfMemoryError: Java heap space > at > org.apache.solr.servlet.HttpSolrCall.sendError(HttpSolrCall.java:611) > at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:472) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:222) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:181) > at > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) > at > org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) > at > org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577) > at > org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223) > at > org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) > at > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) > at > org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) > at > org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) > at > org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215) > at > org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110) > at > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) > at org.eclipse.jetty.server.Server.handle(Server.java:499) > at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) > at > org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) > at > org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) > at > org.eclipse.jetty.util.thread.QueuedThreadPool
[jira] [Commented] (SOLR-8539) Solr queries swallows up OutOfMemoryErrors
[ https://issues.apache.org/jira/browse/SOLR-8539?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15099005#comment-15099005 ] Mark Miller commented on SOLR-8539: --- bq. I wonder how Netty fares on this particular problem. No clue, and like Greg says, it's hard to promise in any code base, but I've seen the OOM killer script actually get invoked on Tomcat, so it doesn't appear to be consistently swallowing OOMs. bq. you probably need to look at adding your own ErrorPageErrorHandler Thanks for the tip. Def worth exploring. > Solr queries swallows up OutOfMemoryErrors > -- > > Key: SOLR-8539 > URL: https://issues.apache.org/jira/browse/SOLR-8539 > Project: Solr > Issue Type: Bug >Reporter: Varun Thacker > Fix For: 5.5, Trunk > > Attachments: SOLR-8539.patch > > > I was testing a crazy surround query and was hitting OOMs easily with the > query. However I saw that the OOM killer wasn't triggered. Here is the stack > trace of the error on solr 5.4: > {code} > WARN - 2016-01-12 18:37:03.920; [ x:techproducts] > org.eclipse.jetty.util.thread.QueuedThreadPool$3; > java.lang.OutOfMemoryError: Java heap space > at > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.addConditionWaiter(AbstractQueuedSynchronizer.java:1855) > at > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2068) > at > org.eclipse.jetty.util.BlockingArrayQueue.poll(BlockingArrayQueue.java:389) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.idleJobPoll(QueuedThreadPool.java:531) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.access$700(QueuedThreadPool.java:47) > at > org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:590) > at java.lang.Thread.run(Thread.java:745) > ERROR - 2016-01-12 18:37:03.922; [ x:techproducts] > org.apache.solr.common.SolrException; null:java.lang.RuntimeException: > java.lang.OutOfMemoryError: Java heap space > at > org.apache.solr.servlet.HttpSolrCall.sendError(HttpSolrCall.java:611) > at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:472) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:222) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:181) > at > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) > at > org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) > at > org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577) > at > org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223) > at > org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) > at > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) > at > org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) > at > org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) > at > org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215) > at > org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110) > at > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) > at org.eclipse.jetty.server.Server.handle(Server.java:499) > at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) > at > org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) > at > org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) > at > org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) > at java.lang.Thread.run(Thread.java:745) > Caused by: java.lang.OutOfMemoryError: Java heap space > at > org.apache.lucene.codecs.lucene50.Lucene50PostingsReader.newTermState(Lucene50PostingsReader.java:149) > at > org.apache.lucene.codecs.blocktree.SegmentTermsEnumFrame.(SegmentTermsEnumFrame.java:100) > at > org.apache.lucene.codecs.blocktree.SegmentTermsEnum.getFrame(SegmentTermsEnum.java:215) > at > org.apache.lucene.codecs.blocktree.SegmentTermsEnum.pushFrame(SegmentTermsEnum.java:241) > at > org.apache.lucene.codecs.blocktree.SegmentTermsEnum.seek
[jira] [Commented] (SOLR-8539) Solr queries swallows up OutOfMemoryErrors
[ https://issues.apache.org/jira/browse/SOLR-8539?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15098769#comment-15098769 ] Ramkumar Aiyengar commented on SOLR-8539: - I don't think there is a sensible way to "limp along"? Even if you did so and returned 5xx errors, you aren't doing any favours, without any other special handling, you pretty much quite probably would just be returning that over and over again. Or worse, find weird bugs in application code which potentially do more damage than a simple exit. With an exit due to an exception, at least any decent process manager would respawn it, or a load balancer reroute requests elsewhere.. I would suggest not handling Errors in general, unless there are specific Errors you can whitelist as safe to trap.. > Solr queries swallows up OutOfMemoryErrors > -- > > Key: SOLR-8539 > URL: https://issues.apache.org/jira/browse/SOLR-8539 > Project: Solr > Issue Type: Bug >Reporter: Varun Thacker > Fix For: 5.5, Trunk > > Attachments: SOLR-8539.patch > > > I was testing a crazy surround query and was hitting OOMs easily with the > query. However I saw that the OOM killer wasn't triggered. Here is the stack > trace of the error on solr 5.4: > {code} > WARN - 2016-01-12 18:37:03.920; [ x:techproducts] > org.eclipse.jetty.util.thread.QueuedThreadPool$3; > java.lang.OutOfMemoryError: Java heap space > at > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.addConditionWaiter(AbstractQueuedSynchronizer.java:1855) > at > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2068) > at > org.eclipse.jetty.util.BlockingArrayQueue.poll(BlockingArrayQueue.java:389) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.idleJobPoll(QueuedThreadPool.java:531) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.access$700(QueuedThreadPool.java:47) > at > org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:590) > at java.lang.Thread.run(Thread.java:745) > ERROR - 2016-01-12 18:37:03.922; [ x:techproducts] > org.apache.solr.common.SolrException; null:java.lang.RuntimeException: > java.lang.OutOfMemoryError: Java heap space > at > org.apache.solr.servlet.HttpSolrCall.sendError(HttpSolrCall.java:611) > at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:472) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:222) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:181) > at > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) > at > org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) > at > org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577) > at > org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223) > at > org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) > at > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) > at > org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) > at > org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) > at > org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215) > at > org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110) > at > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) > at org.eclipse.jetty.server.Server.handle(Server.java:499) > at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) > at > org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) > at > org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) > at > org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) > at java.lang.Thread.run(Thread.java:745) > Caused by: java.lang.OutOfMemoryError: Java heap space > at > org.apache.lucene.codecs.lucene50.Lucene50PostingsReader.newTermState(Lucene50PostingsReader.java:149) > at > org.apache.lucene.codecs.blocktree.SegmentTermsEnumFrame.(SegmentTermsEnumFrame.java:100) > at > org.apache.lucen
[jira] [Commented] (SOLR-8539) Solr queries swallows up OutOfMemoryErrors
[ https://issues.apache.org/jira/browse/SOLR-8539?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15098182#comment-15098182 ] Shawn Heisey commented on SOLR-8539: [~markrmil...@gmail.com], I wonder how Netty fares on this particular problem. A servlet that forcibly quits is an interesting idea, but I worry that it won't actually work. Writing code that behaves predictably under OOM conditions is possible, but tricky. > Solr queries swallows up OutOfMemoryErrors > -- > > Key: SOLR-8539 > URL: https://issues.apache.org/jira/browse/SOLR-8539 > Project: Solr > Issue Type: Bug >Reporter: Varun Thacker > Fix For: 5.5, Trunk > > Attachments: SOLR-8539.patch > > > I was testing a crazy surround query and was hitting OOMs easily with the > query. However I saw that the OOM killer wasn't triggered. Here is the stack > trace of the error on solr 5.4: > {code} > WARN - 2016-01-12 18:37:03.920; [ x:techproducts] > org.eclipse.jetty.util.thread.QueuedThreadPool$3; > java.lang.OutOfMemoryError: Java heap space > at > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.addConditionWaiter(AbstractQueuedSynchronizer.java:1855) > at > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2068) > at > org.eclipse.jetty.util.BlockingArrayQueue.poll(BlockingArrayQueue.java:389) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.idleJobPoll(QueuedThreadPool.java:531) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.access$700(QueuedThreadPool.java:47) > at > org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:590) > at java.lang.Thread.run(Thread.java:745) > ERROR - 2016-01-12 18:37:03.922; [ x:techproducts] > org.apache.solr.common.SolrException; null:java.lang.RuntimeException: > java.lang.OutOfMemoryError: Java heap space > at > org.apache.solr.servlet.HttpSolrCall.sendError(HttpSolrCall.java:611) > at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:472) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:222) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:181) > at > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) > at > org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) > at > org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577) > at > org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223) > at > org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) > at > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) > at > org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) > at > org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) > at > org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215) > at > org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110) > at > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) > at org.eclipse.jetty.server.Server.handle(Server.java:499) > at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) > at > org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) > at > org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) > at > org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) > at java.lang.Thread.run(Thread.java:745) > Caused by: java.lang.OutOfMemoryError: Java heap space > at > org.apache.lucene.codecs.lucene50.Lucene50PostingsReader.newTermState(Lucene50PostingsReader.java:149) > at > org.apache.lucene.codecs.blocktree.SegmentTermsEnumFrame.(SegmentTermsEnumFrame.java:100) > at > org.apache.lucene.codecs.blocktree.SegmentTermsEnum.getFrame(SegmentTermsEnum.java:215) > at > org.apache.lucene.codecs.blocktree.SegmentTermsEnum.pushFrame(SegmentTermsEnum.java:241) > at > org.apache.lucene.codecs.blocktree.SegmentTermsEnum.seekCeil(SegmentTermsEnum.java:728) > at > org.apache.lucene.index.FilterLeafReader$FilterTermsEnum
[jira] [Commented] (SOLR-8539) Solr queries swallows up OutOfMemoryErrors
[ https://issues.apache.org/jira/browse/SOLR-8539?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15097652#comment-15097652 ] Greg Wilkins commented on SOLR-8539: Hmmm I've started looking at this and it is a huge job. The jetty container has many layers (servlet async IO, servlet, HTTP, async IO) all with their own exception handling contracts and expected behaviours.Many of the async APIs handle exceptions by passing them to onError(Throwable) callbacks and have specified lifecycles. So it is not really just a simple matter of catching VirtualMachineError an rethrowing it. Should we try to generate a 500 response first? or should we just rethrow? Should we pass it to async onError calls? What if they throw it in another thread - do we still throw it in the current thread? how do we know? If there is a -XX:OnOutOfMemoryError="kill -9 %p" script installed, then it does not really matter because we are dead. But if there isn't, I think we are obliged to try to limp on as best we can (even though I agree that in almost all cases of VirtualMachineError we are effectively dead, but just don't know it yet). I'll have to discuss this more with the jetty team and community. I do want to do something, but this is not going to be quick, so I think you probably need to look at adding your own ErrorPageErrorHandler that handles VirtualMachineError with a System.exit() - or at least a simple Filter that does the same. > Solr queries swallows up OutOfMemoryErrors > -- > > Key: SOLR-8539 > URL: https://issues.apache.org/jira/browse/SOLR-8539 > Project: Solr > Issue Type: Bug >Reporter: Varun Thacker > Fix For: 5.5, Trunk > > Attachments: SOLR-8539.patch > > > I was testing a crazy surround query and was hitting OOMs easily with the > query. However I saw that the OOM killer wasn't triggered. Here is the stack > trace of the error on solr 5.4: > {code} > WARN - 2016-01-12 18:37:03.920; [ x:techproducts] > org.eclipse.jetty.util.thread.QueuedThreadPool$3; > java.lang.OutOfMemoryError: Java heap space > at > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.addConditionWaiter(AbstractQueuedSynchronizer.java:1855) > at > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2068) > at > org.eclipse.jetty.util.BlockingArrayQueue.poll(BlockingArrayQueue.java:389) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.idleJobPoll(QueuedThreadPool.java:531) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.access$700(QueuedThreadPool.java:47) > at > org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:590) > at java.lang.Thread.run(Thread.java:745) > ERROR - 2016-01-12 18:37:03.922; [ x:techproducts] > org.apache.solr.common.SolrException; null:java.lang.RuntimeException: > java.lang.OutOfMemoryError: Java heap space > at > org.apache.solr.servlet.HttpSolrCall.sendError(HttpSolrCall.java:611) > at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:472) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:222) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:181) > at > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) > at > org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) > at > org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577) > at > org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223) > at > org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) > at > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) > at > org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) > at > org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) > at > org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215) > at > org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110) > at > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) > at org.eclipse.jetty.server.Server.handle(Server.java:499) > at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) > at > org.eclipse.jetty.ser
[jira] [Commented] (SOLR-8539) Solr queries swallows up OutOfMemoryErrors
[ https://issues.apache.org/jira/browse/SOLR-8539?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15097624#comment-15097624 ] Greg Wilkins commented on SOLR-8539: OK, we will see what we can do. I think we will allow all VirtualMachineError's to propagate back to the thread. > Solr queries swallows up OutOfMemoryErrors > -- > > Key: SOLR-8539 > URL: https://issues.apache.org/jira/browse/SOLR-8539 > Project: Solr > Issue Type: Bug >Reporter: Varun Thacker > Fix For: 5.5, Trunk > > Attachments: SOLR-8539.patch > > > I was testing a crazy surround query and was hitting OOMs easily with the > query. However I saw that the OOM killer wasn't triggered. Here is the stack > trace of the error on solr 5.4: > {code} > WARN - 2016-01-12 18:37:03.920; [ x:techproducts] > org.eclipse.jetty.util.thread.QueuedThreadPool$3; > java.lang.OutOfMemoryError: Java heap space > at > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.addConditionWaiter(AbstractQueuedSynchronizer.java:1855) > at > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2068) > at > org.eclipse.jetty.util.BlockingArrayQueue.poll(BlockingArrayQueue.java:389) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.idleJobPoll(QueuedThreadPool.java:531) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.access$700(QueuedThreadPool.java:47) > at > org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:590) > at java.lang.Thread.run(Thread.java:745) > ERROR - 2016-01-12 18:37:03.922; [ x:techproducts] > org.apache.solr.common.SolrException; null:java.lang.RuntimeException: > java.lang.OutOfMemoryError: Java heap space > at > org.apache.solr.servlet.HttpSolrCall.sendError(HttpSolrCall.java:611) > at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:472) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:222) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:181) > at > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) > at > org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) > at > org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577) > at > org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223) > at > org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) > at > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) > at > org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) > at > org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) > at > org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215) > at > org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110) > at > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) > at org.eclipse.jetty.server.Server.handle(Server.java:499) > at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) > at > org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) > at > org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) > at > org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) > at java.lang.Thread.run(Thread.java:745) > Caused by: java.lang.OutOfMemoryError: Java heap space > at > org.apache.lucene.codecs.lucene50.Lucene50PostingsReader.newTermState(Lucene50PostingsReader.java:149) > at > org.apache.lucene.codecs.blocktree.SegmentTermsEnumFrame.(SegmentTermsEnumFrame.java:100) > at > org.apache.lucene.codecs.blocktree.SegmentTermsEnum.getFrame(SegmentTermsEnum.java:215) > at > org.apache.lucene.codecs.blocktree.SegmentTermsEnum.pushFrame(SegmentTermsEnum.java:241) > at > org.apache.lucene.codecs.blocktree.SegmentTermsEnum.seekCeil(SegmentTermsEnum.java:728) > at > org.apache.lucene.index.FilterLeafReader$FilterTermsEnum.seekCeil(FilterLeafReader.java:185) > at org.apache.lucene.index.TermsEnum.seekExact(TermsEnum.java:74) > at org.apache.lucene.ind
[jira] [Commented] (SOLR-8539) Solr queries swallows up OutOfMemoryErrors
[ https://issues.apache.org/jira/browse/SOLR-8539?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15097585#comment-15097585 ] Mark Miller commented on SOLR-8539: --- It is hard to guarantee, but well behaving code should be careful when catching Errors and let OOMExceptions bubble out I think. It's the only way for the Java kill on OOM feature to work at all. We may find that some other code in some other lib is swallowing Errors and not letting OOMException bubble up, but in that case I think we would follow the same procedure and file a bug with that component. > Solr queries swallows up OutOfMemoryErrors > -- > > Key: SOLR-8539 > URL: https://issues.apache.org/jira/browse/SOLR-8539 > Project: Solr > Issue Type: Bug >Reporter: Varun Thacker > Fix For: 5.5, Trunk > > Attachments: SOLR-8539.patch > > > I was testing a crazy surround query and was hitting OOMs easily with the > query. However I saw that the OOM killer wasn't triggered. Here is the stack > trace of the error on solr 5.4: > {code} > WARN - 2016-01-12 18:37:03.920; [ x:techproducts] > org.eclipse.jetty.util.thread.QueuedThreadPool$3; > java.lang.OutOfMemoryError: Java heap space > at > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.addConditionWaiter(AbstractQueuedSynchronizer.java:1855) > at > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2068) > at > org.eclipse.jetty.util.BlockingArrayQueue.poll(BlockingArrayQueue.java:389) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.idleJobPoll(QueuedThreadPool.java:531) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.access$700(QueuedThreadPool.java:47) > at > org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:590) > at java.lang.Thread.run(Thread.java:745) > ERROR - 2016-01-12 18:37:03.922; [ x:techproducts] > org.apache.solr.common.SolrException; null:java.lang.RuntimeException: > java.lang.OutOfMemoryError: Java heap space > at > org.apache.solr.servlet.HttpSolrCall.sendError(HttpSolrCall.java:611) > at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:472) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:222) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:181) > at > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) > at > org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) > at > org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577) > at > org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223) > at > org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) > at > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) > at > org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) > at > org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) > at > org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215) > at > org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110) > at > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) > at org.eclipse.jetty.server.Server.handle(Server.java:499) > at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) > at > org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) > at > org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) > at > org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) > at java.lang.Thread.run(Thread.java:745) > Caused by: java.lang.OutOfMemoryError: Java heap space > at > org.apache.lucene.codecs.lucene50.Lucene50PostingsReader.newTermState(Lucene50PostingsReader.java:149) > at > org.apache.lucene.codecs.blocktree.SegmentTermsEnumFrame.(SegmentTermsEnumFrame.java:100) > at > org.apache.lucene.codecs.blocktree.SegmentTermsEnum.getFrame(SegmentTermsEnum.java:215) > at > org.apache.lucene.codecs.blocktree.SegmentTermsEnum.pushFrame(SegmentTermsEnum.java:241) > at > org.apache.luce
[jira] [Commented] (SOLR-8539) Solr queries swallows up OutOfMemoryErrors
[ https://issues.apache.org/jira/browse/SOLR-8539?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15097105#comment-15097105 ] Greg Wilkins commented on SOLR-8539: Shawn, I commented on the Jetty bug... but another thought here. Perhaps you can just add a custom error page for the OOM exception which is mapped to a servlet that does a System.exit(1) ? Although there is a risk that another OOM might get thrown during the dispatch to the error page so perhaps even better is to add your own custom ErrorPageErrorHandler, which when asked to lookup the OOME error page does the System.exit instead. Or just catch in a filter and System.exit. But, there are still a large class of OOME that can happen in strange and exotic places that will cause problems and not be caught. Eg. if the time thread get's hit by OOME, that wont even go near jetty code. > Solr queries swallows up OutOfMemoryErrors > -- > > Key: SOLR-8539 > URL: https://issues.apache.org/jira/browse/SOLR-8539 > Project: Solr > Issue Type: Bug >Reporter: Varun Thacker > Fix For: 5.5, Trunk > > Attachments: SOLR-8539.patch > > > I was testing a crazy surround query and was hitting OOMs easily with the > query. However I saw that the OOM killer wasn't triggered. Here is the stack > trace of the error on solr 5.4: > {code} > WARN - 2016-01-12 18:37:03.920; [ x:techproducts] > org.eclipse.jetty.util.thread.QueuedThreadPool$3; > java.lang.OutOfMemoryError: Java heap space > at > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.addConditionWaiter(AbstractQueuedSynchronizer.java:1855) > at > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2068) > at > org.eclipse.jetty.util.BlockingArrayQueue.poll(BlockingArrayQueue.java:389) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.idleJobPoll(QueuedThreadPool.java:531) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.access$700(QueuedThreadPool.java:47) > at > org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:590) > at java.lang.Thread.run(Thread.java:745) > ERROR - 2016-01-12 18:37:03.922; [ x:techproducts] > org.apache.solr.common.SolrException; null:java.lang.RuntimeException: > java.lang.OutOfMemoryError: Java heap space > at > org.apache.solr.servlet.HttpSolrCall.sendError(HttpSolrCall.java:611) > at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:472) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:222) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:181) > at > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) > at > org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) > at > org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577) > at > org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223) > at > org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) > at > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) > at > org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) > at > org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) > at > org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215) > at > org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110) > at > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) > at org.eclipse.jetty.server.Server.handle(Server.java:499) > at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) > at > org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) > at > org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) > at > org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) > at java.lang.Thread.run(Thread.java:745) > Caused by: java.lang.OutOfMemoryError: Java heap space > at > org.apache.lucene.codecs.lucene50.Lucene50PostingsReader.newTermState(Lucene50PostingsReader.java:149) > at > org.apache.lucene.codecs.
[jira] [Commented] (SOLR-8539) Solr queries swallows up OutOfMemoryErrors
[ https://issues.apache.org/jira/browse/SOLR-8539?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15097004#comment-15097004 ] Shawn Heisey commented on SOLR-8539: I took the liberty of opening a bug on Jetty, since I already have an eclipse bugzilla account. https://bugs.eclipse.org/bugs/show_bug.cgi?id=485794 > Solr queries swallows up OutOfMemoryErrors > -- > > Key: SOLR-8539 > URL: https://issues.apache.org/jira/browse/SOLR-8539 > Project: Solr > Issue Type: Bug >Reporter: Varun Thacker > Fix For: 5.5, Trunk > > Attachments: SOLR-8539.patch > > > I was testing a crazy surround query and was hitting OOMs easily with the > query. However I saw that the OOM killer wasn't triggered. Here is the stack > trace of the error on solr 5.4: > {code} > WARN - 2016-01-12 18:37:03.920; [ x:techproducts] > org.eclipse.jetty.util.thread.QueuedThreadPool$3; > java.lang.OutOfMemoryError: Java heap space > at > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.addConditionWaiter(AbstractQueuedSynchronizer.java:1855) > at > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2068) > at > org.eclipse.jetty.util.BlockingArrayQueue.poll(BlockingArrayQueue.java:389) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.idleJobPoll(QueuedThreadPool.java:531) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.access$700(QueuedThreadPool.java:47) > at > org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:590) > at java.lang.Thread.run(Thread.java:745) > ERROR - 2016-01-12 18:37:03.922; [ x:techproducts] > org.apache.solr.common.SolrException; null:java.lang.RuntimeException: > java.lang.OutOfMemoryError: Java heap space > at > org.apache.solr.servlet.HttpSolrCall.sendError(HttpSolrCall.java:611) > at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:472) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:222) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:181) > at > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) > at > org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) > at > org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577) > at > org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223) > at > org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) > at > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) > at > org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) > at > org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) > at > org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215) > at > org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110) > at > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) > at org.eclipse.jetty.server.Server.handle(Server.java:499) > at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) > at > org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) > at > org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) > at > org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) > at java.lang.Thread.run(Thread.java:745) > Caused by: java.lang.OutOfMemoryError: Java heap space > at > org.apache.lucene.codecs.lucene50.Lucene50PostingsReader.newTermState(Lucene50PostingsReader.java:149) > at > org.apache.lucene.codecs.blocktree.SegmentTermsEnumFrame.(SegmentTermsEnumFrame.java:100) > at > org.apache.lucene.codecs.blocktree.SegmentTermsEnum.getFrame(SegmentTermsEnum.java:215) > at > org.apache.lucene.codecs.blocktree.SegmentTermsEnum.pushFrame(SegmentTermsEnum.java:241) > at > org.apache.lucene.codecs.blocktree.SegmentTermsEnum.seekCeil(SegmentTermsEnum.java:728) > at > org.apache.lucene.index.FilterLeafReader$FilterTermsEnum.seekCeil(FilterLeafReader.java:185) > at org.apache.lucene.index.TermsEnum.seekExact(TermsEnum.java:7
[jira] [Commented] (SOLR-8539) Solr queries swallows up OutOfMemoryErrors
[ https://issues.apache.org/jira/browse/SOLR-8539?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15096919#comment-15096919 ] Varun Thacker commented on SOLR-8539: - Yeah it looks like that. Here https://github.com/eclipse/jetty.project/blob/jetty-9.2.x/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletHandler.java#L667 we can see that it's been logged as a WARN and not thrown . Not sure how to solve it though > Solr queries swallows up OutOfMemoryErrors > -- > > Key: SOLR-8539 > URL: https://issues.apache.org/jira/browse/SOLR-8539 > Project: Solr > Issue Type: Bug >Reporter: Varun Thacker > Fix For: 5.5, Trunk > > Attachments: SOLR-8539.patch > > > I was testing a crazy surround query and was hitting OOMs easily with the > query. However I saw that the OOM killer wasn't triggered. Here is the stack > trace of the error on solr 5.4: > {code} > WARN - 2016-01-12 18:37:03.920; [ x:techproducts] > org.eclipse.jetty.util.thread.QueuedThreadPool$3; > java.lang.OutOfMemoryError: Java heap space > at > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.addConditionWaiter(AbstractQueuedSynchronizer.java:1855) > at > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2068) > at > org.eclipse.jetty.util.BlockingArrayQueue.poll(BlockingArrayQueue.java:389) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.idleJobPoll(QueuedThreadPool.java:531) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.access$700(QueuedThreadPool.java:47) > at > org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:590) > at java.lang.Thread.run(Thread.java:745) > ERROR - 2016-01-12 18:37:03.922; [ x:techproducts] > org.apache.solr.common.SolrException; null:java.lang.RuntimeException: > java.lang.OutOfMemoryError: Java heap space > at > org.apache.solr.servlet.HttpSolrCall.sendError(HttpSolrCall.java:611) > at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:472) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:222) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:181) > at > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) > at > org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) > at > org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577) > at > org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223) > at > org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) > at > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) > at > org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) > at > org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) > at > org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215) > at > org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110) > at > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) > at org.eclipse.jetty.server.Server.handle(Server.java:499) > at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) > at > org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) > at > org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) > at > org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) > at java.lang.Thread.run(Thread.java:745) > Caused by: java.lang.OutOfMemoryError: Java heap space > at > org.apache.lucene.codecs.lucene50.Lucene50PostingsReader.newTermState(Lucene50PostingsReader.java:149) > at > org.apache.lucene.codecs.blocktree.SegmentTermsEnumFrame.(SegmentTermsEnumFrame.java:100) > at > org.apache.lucene.codecs.blocktree.SegmentTermsEnum.getFrame(SegmentTermsEnum.java:215) > at > org.apache.lucene.codecs.blocktree.SegmentTermsEnum.pushFrame(SegmentTermsEnum.java:241) > at > org.apache.lucene.codecs.blocktree.SegmentTermsEnum.seekCeil(SegmentTermsEnum.java:728) > at > org.apache.lucene.index.FilterLeafReader$FilterTerms
[jira] [Commented] (SOLR-8539) Solr queries swallows up OutOfMemoryErrors
[ https://issues.apache.org/jira/browse/SOLR-8539?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15096396#comment-15096396 ] Shawn Heisey commented on SOLR-8539: It looks like the OOM is being trapped and logged, but not being thrown in a way that bubbles up the stack to the JVM. In both of the logs you provided, the logging is done by a Jetty class, so I think Jetty is probably swallowing the exception. > Solr queries swallows up OutOfMemoryErrors > -- > > Key: SOLR-8539 > URL: https://issues.apache.org/jira/browse/SOLR-8539 > Project: Solr > Issue Type: Bug >Reporter: Varun Thacker > Fix For: 5.5, Trunk > > Attachments: SOLR-8539.patch > > > I was testing a crazy surround query and was hitting OOMs easily with the > query. However I saw that the OOM killer wasn't triggered. Here is the stack > trace of the error on solr 5.4: > {code} > WARN - 2016-01-12 18:37:03.920; [ x:techproducts] > org.eclipse.jetty.util.thread.QueuedThreadPool$3; > java.lang.OutOfMemoryError: Java heap space > at > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.addConditionWaiter(AbstractQueuedSynchronizer.java:1855) > at > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2068) > at > org.eclipse.jetty.util.BlockingArrayQueue.poll(BlockingArrayQueue.java:389) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.idleJobPoll(QueuedThreadPool.java:531) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.access$700(QueuedThreadPool.java:47) > at > org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:590) > at java.lang.Thread.run(Thread.java:745) > ERROR - 2016-01-12 18:37:03.922; [ x:techproducts] > org.apache.solr.common.SolrException; null:java.lang.RuntimeException: > java.lang.OutOfMemoryError: Java heap space > at > org.apache.solr.servlet.HttpSolrCall.sendError(HttpSolrCall.java:611) > at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:472) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:222) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:181) > at > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) > at > org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) > at > org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577) > at > org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223) > at > org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) > at > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) > at > org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) > at > org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) > at > org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215) > at > org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110) > at > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) > at org.eclipse.jetty.server.Server.handle(Server.java:499) > at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) > at > org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) > at > org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) > at > org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) > at java.lang.Thread.run(Thread.java:745) > Caused by: java.lang.OutOfMemoryError: Java heap space > at > org.apache.lucene.codecs.lucene50.Lucene50PostingsReader.newTermState(Lucene50PostingsReader.java:149) > at > org.apache.lucene.codecs.blocktree.SegmentTermsEnumFrame.(SegmentTermsEnumFrame.java:100) > at > org.apache.lucene.codecs.blocktree.SegmentTermsEnum.getFrame(SegmentTermsEnum.java:215) > at > org.apache.lucene.codecs.blocktree.SegmentTermsEnum.pushFrame(SegmentTermsEnum.java:241) > at > org.apache.lucene.codecs.blocktree.SegmentTermsEnum.seekCeil(SegmentTermsEnum.java:728) > at > org.apache.lucene.index.FilterLeafReader$FilterTermsEnum.seekCeil(Fil