You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Chris M. Hostetter (Jira)" <ji...@apache.org> on 2020/01/08 18:49:00 UTC
[jira] [Comment Edited] (SOLR-14180) RequestHandlerBase.java:227
assertion failing: not all "Tragic" exceptions have 500 status, assert
masks real failure
[ https://issues.apache.org/jira/browse/SOLR-14180?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17010908#comment-17010908 ]
Chris M. Hostetter edited comment on SOLR-14180 at 1/8/20 6:48 PM:
-------------------------------------------------------------------
SeeĀ [^thetaphi_Lucene-Solr-8.x-Linux_1752.log.txt] attached to SOLR-14179 as an example of a situation where a failure being returned to the client gets thrown away and replaced by an assertion error because it failed the "isTragic" assertion.
It's not clear to me if there is a bug in the underlying failure (and it should in fact be a 500 status but isn't) or if the bug is in the "isTragic" check...
{noformat}
[junit4] 2> NOTE: reproduce with: ant test -Dtestcase=BasicDistributedZkTest -Dtests.method=test -Dtests.seed=DE4EDB45974CB32A -Dtests.multiplier=3 -Dtests.slow=true -Dtests.locale=zh
-TW -Dtests.timezone=Canada/Pacific -Dtests.asserts=true -Dtests.file.encoding=ISO-8859-1
[junit4] ERROR 40.2s J2 | BasicDistributedZkTest.test <<<
[junit4] > Throwable #1: org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at http://127.0.0.1:37797/collection1: Expected mime type application/
octet-stream but got text/html. <html>
[junit4] > <head>
[junit4] > <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
[junit4] > <title>Error 500 java.lang.AssertionError</title>
[junit4] > </head>
[junit4] > <body><h2>HTTP ERROR 500 java.lang.AssertionError</h2>
[junit4] > <table>
[junit4] > <tr><th>URI:</th><td>/collection1/update</td></tr>
[junit4] > <tr><th>STATUS:</th><td>500</td></tr>
[junit4] > <tr><th>MESSAGE:</th><td>java.lang.AssertionError</td></tr>
[junit4] > <tr><th>SERVLET:</th><td>org.apache.solr.client.solrj.embedded.JettySolrRunner$Servlet404-630c010e</td></tr>
[junit4] > <tr><th>CAUSED BY:</th><td>java.lang.AssertionError</td></tr>
[junit4] > </table>
[junit4] > <h3>Caused by:</h3><pre>java.lang.AssertionError
[junit4] > at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:227)
[junit4] > at org.apache.solr.core.SolrCore.execute(SolrCore.java:2596)
{noformat}
was (Author: hossman):
See [^thetaphi_Lucene-Solr-8.x-Linux_1752.log.txt] attached to SOLR-14179 as an example of a situation where a failure being returned to the client gets thrown away and replaced by an assertion error because it failed the "isTragic" assertion.
It's not clear to me if there is a bug in the underlying failure (and it should in fact be a 500 status but isn't) or if the bug is in the "isTragic" check...
{noformat}
[junit4] 2> NOTE: reproduce with: ant test -Dtestcase=BasicDistributedZkTest -Dtests.method=test -Dtests.seed=DE4EDB45974CB32A -Dtests.multiplier=3 -Dtests.slow=true -Dtests.locale=zh
-TW -Dtests.timezone=Canada/Pacific -Dtests.asserts=true -Dtests.file.encoding=ISO-8859-1
[junit4] ERROR 40.2s J2 | BasicDistributedZkTest.test <<<
[junit4] > Throwable #1: org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at http://127.0.0.1:37797/collection1: Expected mime type application/
octet-stream but got text/html. <html>
[junit4] > <head>
[junit4] > <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
[junit4] > <title>Error 500 java.lang.AssertionError</title>
[junit4] > </head>
[junit4] > <body><h2>HTTP ERROR 500 java.lang.AssertionError</h2>
[junit4] > <table>
[junit4] > <tr><th>URI:</th><td>/collection1/update</td></tr>
[junit4] > <tr><th>STATUS:</th><td>500</td></tr>
[junit4] > <tr><th>MESSAGE:</th><td>java.lang.AssertionError</td></tr>
[junit4] > <tr><th>SERVLET:</th><td>org.apache.solr.client.solrj.embedded.JettySolrRunner$Servlet404-630c010e</td></tr>
[junit4] > <tr><th>CAUSED BY:</th><td>java.lang.AssertionError</td></tr>
[junit4] > </table>
[junit4] > <h3>Caused by:</h3><pre>java.lang.AssertionError
[junit4] > at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:227)
[junit4] > at org.apache.solr.core.SolrCore.execute(SolrCore.java:2596)
{noformat}
> RequestHandlerBase.java:227 assertion failing: not all "Tragic" exceptions have 500 status, assert masks real failure
> ---------------------------------------------------------------------------------------------------------------------
>
> Key: SOLR-14180
> URL: https://issues.apache.org/jira/browse/SOLR-14180
> Project: Solr
> Issue Type: Bug
> Security Level: Public(Default Security Level. Issues are Public)
> Reporter: Chris M. Hostetter
> Priority: Major
>
> RequestHandlerBase.java currently contains the following code added by SOLR-12477 ...
> {code}
> } catch (Exception e) {
> if (req.getCore() != null) {
> boolean isTragic = req.getCore().getCoreContainer().checkTragicException(req.getCore());
> if (isTragic) {
> if (e instanceof SolrException) {
> // Tragic exceptions should always throw a server error
> assert ((SolrException) e).code() == 500;
> } else {
> // wrap it in a solr exception
> e = new SolrException(SolrException.ErrorCode.SERVER_ERROR, e.getMessage(), e);
> }
> }
> }
> {code}
> ...however recent test failures have surfaced situations where this is evidnetly not true, and instead of the "original" error being returned to clients, the assertion fails, masking the "real" failure.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org