Solr
  1. Solr
  2. SOLR-6175

DebugComponent throws NPE on shard exceptions when using shards.tolerant

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.8
    • Fix Version/s: 4.9, 6.0
    • Component/s: None
    • Labels:
      None

      Description

      For example on a search with debug=true

      oasc.SolrException.log ERROR null:java.lang.NullPointerException
      		at org.apache.solr.handler.component.DebugComponent.getTrackResponse(DebugComponent.java:262)
      		at org.apache.solr.handler.component.DebugComponent.handleResponses(DebugComponent.java:190)
      		at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:327)
      		at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)
      		at org.apache.solr.core.SolrCore.execute(SolrCore.java:1980)
      		at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:776)
      		at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:420)
      		at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:208)
      		at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)
      		at org.apache.solr.client.solrj.embedded.JettySolrRunner$DebugFilter.doFilter(JettySolrRunner.java:136)
      		at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)
      		at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455)
      		at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:229)
      		at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
      		at org.eclipse.jetty.server.handler.GzipHandler.handle(GzipHandler.java:301)
      		at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1077)
      		at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384)
      		at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
      		at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009)
      		at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
      		at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
      		at org.eclipse.jetty.server.Server.handle(Server.java:368)
      		at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
      		at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:942)
      		at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1004)
      		at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:640)
      		at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
      		at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
      		at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:628)
      		at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
      		at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
      		at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
      at java.lang.Thread.run(Thread.java:744)
      
      
      
      

      or, if using something like debug=timing

      oasc.SolrException.log ERROR null:java.lang.NullPointerException
      		at org.apache.solr.handler.component.DebugComponent.finishStage(DebugComponent.java:209)
      		at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:333)
      		at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)
      		at org.apache.solr.core.SolrCore.execute(SolrCore.java:1980)
      		at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:776)
      		at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:420)
      		at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:208)
      		at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)
      		at org.apache.solr.client.solrj.embedded.JettySolrRunner$DebugFilter.doFilter(JettySolrRunner.java:136)
      		at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)
      		at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455)
      		at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:229)
      		at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
      		at org.eclipse.jetty.server.handler.GzipHandler.handle(GzipHandler.java:301)
      		at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1077)
      		at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384)
      		at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
      		at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009)
      		at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
      		at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
      		at org.eclipse.jetty.server.Server.handle(Server.java:368)
      		at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
      		at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:942)
      		at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1004)
      		at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:640)
      		at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
      		at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
      		at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:628)
      		at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
      		at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
      		at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
      		at java.lang.Thread.run(Thread.java:744)
      	
      
      1. SOLR-6175.patch
        5 kB
        Tomás Fernández Löbbe

        Activity

        Hide
        Tomás Fernández Löbbe added a comment -

        Added test with the fix. I'm adding the exception message to the track section of the debug in cases like this.

        Show
        Tomás Fernández Löbbe added a comment - Added test with the fix. I'm adding the exception message to the track section of the debug in cases like this.
        Hide
        ASF subversion and git services added a comment -

        Commit 1603061 from shalin@apache.org in branch 'dev/trunk'
        [ https://svn.apache.org/r1603061 ]

        SOLR-6175: DebugComponent throws NPE on shard exceptions when using shards.tolerant

        Show
        ASF subversion and git services added a comment - Commit 1603061 from shalin@apache.org in branch 'dev/trunk' [ https://svn.apache.org/r1603061 ] SOLR-6175 : DebugComponent throws NPE on shard exceptions when using shards.tolerant
        Hide
        ASF subversion and git services added a comment -

        Commit 1603062 from shalin@apache.org in branch 'dev/branches/branch_4x'
        [ https://svn.apache.org/r1603062 ]

        SOLR-6175: DebugComponent throws NPE on shard exceptions when using shards.tolerant

        Show
        ASF subversion and git services added a comment - Commit 1603062 from shalin@apache.org in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1603062 ] SOLR-6175 : DebugComponent throws NPE on shard exceptions when using shards.tolerant
        Hide
        Shalin Shekhar Mangar added a comment -

        Thanks Tomás!

        Show
        Shalin Shekhar Mangar added a comment - Thanks Tomás!
        Hide
        ASF subversion and git services added a comment -

        Commit 1603233 from shalin@apache.org in branch 'dev/trunk'
        [ https://svn.apache.org/r1603233 ]

        SOLR-6175: Fix failing test by removing assert that matches exception message. They might be different between platforms.

        Show
        ASF subversion and git services added a comment - Commit 1603233 from shalin@apache.org in branch 'dev/trunk' [ https://svn.apache.org/r1603233 ] SOLR-6175 : Fix failing test by removing assert that matches exception message. They might be different between platforms.
        Hide
        ASF subversion and git services added a comment -

        Commit 1603234 from shalin@apache.org in branch 'dev/branches/branch_4x'
        [ https://svn.apache.org/r1603234 ]

        SOLR-6175: Fix failing test by removing assert that matches exception message. They might be different between platforms.

        Show
        ASF subversion and git services added a comment - Commit 1603234 from shalin@apache.org in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1603234 ] SOLR-6175 : Fix failing test by removing assert that matches exception message. They might be different between platforms.
        Hide
        ASF subversion and git services added a comment -

        Commit 1603236 from shalin@apache.org in branch 'dev/trunk'
        [ https://svn.apache.org/r1603236 ]

        SOLR-6175: Assert that exception message is not null

        Show
        ASF subversion and git services added a comment - Commit 1603236 from shalin@apache.org in branch 'dev/trunk' [ https://svn.apache.org/r1603236 ] SOLR-6175 : Assert that exception message is not null
        Hide
        ASF subversion and git services added a comment -

        Commit 1603237 from shalin@apache.org in branch 'dev/branches/branch_4x'
        [ https://svn.apache.org/r1603237 ]

        SOLR-6175: Assert that exception message is not null

        Show
        ASF subversion and git services added a comment - Commit 1603237 from shalin@apache.org in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1603237 ] SOLR-6175 : Assert that exception message is not null
        Hide
        Tomás Fernández Löbbe added a comment -

        Thanks Shalin.
        I think we should also change the exception ignore pattern then.
        Also, this change made it to 4_9 branch, should fix the test there too, right?

        Show
        Tomás Fernández Löbbe added a comment - Thanks Shalin. I think we should also change the exception ignore pattern then. Also, this change made it to 4_9 branch, should fix the test there too, right?
        Hide
        Shalin Shekhar Mangar added a comment -

        I think we should also change the exception ignore pattern then.

        The ignoreException call causes those exceptions not to be logged. They don't affect the test outcome at all.

        I'll fix it on 4_9 branch as well.

        Show
        Shalin Shekhar Mangar added a comment - I think we should also change the exception ignore pattern then. The ignoreException call causes those exceptions not to be logged. They don't affect the test outcome at all. I'll fix it on 4_9 branch as well.
        Hide
        ASF subversion and git services added a comment -

        Commit 1603242 from shalin@apache.org in branch 'dev/branches/lucene_solr_4_9'
        [ https://svn.apache.org/r1603242 ]

        SOLR-6175: Merged test fixes from branch_4x

        Show
        ASF subversion and git services added a comment - Commit 1603242 from shalin@apache.org in branch 'dev/branches/lucene_solr_4_9' [ https://svn.apache.org/r1603242 ] SOLR-6175 : Merged test fixes from branch_4x
        Hide
        Tomás Fernández Löbbe added a comment -

        The ignoreException call causes those exceptions not to be logged. They don't affect the test outcome at all.

        I understand that, I meant just to keep the logs clean in Windows too. Maybe the pattern could be something like:

         ignoreException("3334"); 

        That should ignore the exception from Windows too (I don't have a Windows PC to test with)

        Show
        Tomás Fernández Löbbe added a comment - The ignoreException call causes those exceptions not to be logged. They don't affect the test outcome at all. I understand that, I meant just to keep the logs clean in Windows too. Maybe the pattern could be something like: ignoreException( "3334" ); That should ignore the exception from Windows too (I don't have a Windows PC to test with)
        Hide
        Shalin Shekhar Mangar added a comment -

        I see. I don't have a windows box either

        Show
        Shalin Shekhar Mangar added a comment - I see. I don't have a windows box either

          People

          • Assignee:
            Shalin Shekhar Mangar
            Reporter:
            Tomás Fernández Löbbe
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development