You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Hoss Man (JIRA)" <ji...@apache.org> on 2019/07/25 17:28:00 UTC

[jira] [Commented] (SOLR-13653) java (10 & 11) HashMap bug can trigger AssertionError when using SolrCaches

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

Hoss Man commented on SOLR-13653:
---------------------------------

sample failure from jenkins...

http://fucit.org/solr-jenkins-reports/job-data/apache/Lucene-Solr-Tests-master/3453
{noformat}
   [junit4]   2> NOTE: reproduce with: ant test  -Dtestcase=TestCloudJSONFacetSKG -Dtests.method=testRandom -Dtests.seed=B1CFC66C4378F63 -Dtests.multiplier=2 -Dtests.slow=true -Dtests.locale=rn -Dtests.timezone=Africa/Kampala -Dtests.asserts=true -Dtests.file.encoding=ISO-8859-1
   [junit4] ERROR   18.5s J1 | TestCloudJSONFacetSKG.testRandom <<<
   [junit4]    > Throwable #1: org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at http://127.0.0.1:42227/solr/org.apache.solr.search.facet.TestCloudJSONFacetSKG_collection: 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 Server Error</title>
   [junit4]    > </head>
   [junit4]    > <body><h2>HTTP ERROR 500</h2>
   [junit4]    > <p>Problem accessing /solr/org.apache.solr.search.facet.TestCloudJSONFacetSKG_collection/select. Reason:
   [junit4]    > <pre>    Server Error</pre></p><h3>Caused by:</h3><pre>java.lang.AssertionError
   [junit4]    >        at java.base/java.util.HashMap$TreeNode.moveRootToFront(HashMap.java:1896)
   [junit4]    >        at java.base/java.util.HashMap$TreeNode.putTreeVal(HashMap.java:2061)
   [junit4]    >        at java.base/java.util.HashMap.putVal(HashMap.java:633)
   [junit4]    >        at java.base/java.util.HashMap.put(HashMap.java:607)
   [junit4]    >        at org.apache.solr.search.LRUCache.put(LRUCache.java:201)
   [junit4]    >        at org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1449)
   [junit4]    >        at org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:568)
   [junit4]    >        at org.apache.solr.handler.component.QueryComponent.doProcessUngroupedSearch(QueryComponent.java:1484)
   [junit4]    >        at org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:398)
   [junit4]    >        at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:305)
   [junit4]    >        at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:199)
   [junit4]    >        at org.apache.solr.core.SolrCore.execute(SolrCore.java:2581)
{noformat}

As of dc8e9afff92f3ffc4081a2ecad5970eb09924a73 this seeds reproduces fairly reliably for me using...

{noformat}
hossman@tray:~/lucene/dev/solr/core [j11] [master] $ java -version
openjdk version "11.0.3" 2019-04-16
OpenJDK Runtime Environment 18.9 (build 11.0.3+7)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.3+7, mixed mode)
hossman@tray:~/lucene/dev/solr/core [j11] [master] $ ant test -Dtests.dups=10 -Dtests.failfast=no -Dtestcase=TestCloudJSONFacetSKG -Dtests.method=testRandom -Dtests.seed=B1CFC66C4378F63 -Dtests.multiplier=2 -Dtests.slow=true -Dtests.locale=rn -Dtests.timezone=Africa/Kampala -Dtests.asserts=true -Dtests.file.encoding=ISO-8859-1
...
   [junit4] Tests with failures [seed: B1CFC66C4378F63]:
   [junit4]   - org.apache.solr.search.facet.TestCloudJSONFacetSKG.testRandom
   [junit4]   - org.apache.solr.search.facet.TestCloudJSONFacetSKG.testRandom
   [junit4]   - org.apache.solr.search.facet.TestCloudJSONFacetSKG.testRandom
   [junit4]   - org.apache.solr.search.facet.TestCloudJSONFacetSKG.testRandom
   [junit4]   - org.apache.solr.search.facet.TestCloudJSONFacetSKG.testRandom
   [junit4]   - org.apache.solr.search.facet.TestCloudJSONFacetSKG.testRandom
   [junit4]   - org.apache.solr.search.facet.TestCloudJSONFacetSKG.testRandom
   [junit4]   - org.apache.solr.search.facet.TestCloudJSONFacetSKG.testRandom
   [junit4] 
   [junit4] 
   [junit4] JVM J0:     1.38 ..   126.31 =   124.93s
   [junit4] JVM J1:     1.39 ..   128.17 =   126.77s
   [junit4] JVM J2:     1.35 ..   123.50 =   122.15s
   [junit4] Execution time total: 2 minutes 8 seconds
   [junit4] Tests summary: 10 suites, 10 tests, 8 errors

BUILD FAILED
{noformat}


> java (10 & 11) HashMap bug can trigger AssertionError when using SolrCaches
> ---------------------------------------------------------------------------
>
>                 Key: SOLR-13653
>                 URL: https://issues.apache.org/jira/browse/SOLR-13653
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Hoss Man
>            Priority: Major
>              Labels: Java10, java11
>
> we've seen some java11 jenkins builds that have failed due to an AssertionError being thrown by HashMap.put as used in LRUCache -- in at least one case these failures are semi-reproducible. (the occasional "success" is likely due to some unpredictibility in thread contention)
> Some cursory investigation suggests that JDK-8205399, first identified in java10, and fixed in java12-b26...
> https://bugs.openjdk.java.net/browse/JDK-8205399
> There does not appear to be anything we can do to mitigate this problem in Solr.  
> It's also not clear to me based on th comments in JDK-8205399 if the underlying problem can cause problems for end users running w/assertions disabled, or if it just results in sub-optimal performance



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

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