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 2019/09/26 18:06:05 UTC

[jira] [Updated] (LUCENE-8991) disable java.util.HashMap assertions to avoid spurious vailures due to JDK-8205399

     [ https://issues.apache.org/jira/browse/LUCENE-8991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris M. Hostetter updated LUCENE-8991:
---------------------------------------
    Attachment: LUCENE-8991.patch
        Status: Open  (was: Open)


FYI: I tried asking Rory about the open-jdk backporting process and why the fix for JDK-8205399 had never been backported for inclusion in 11.0.2 or 11.0.3 (or at this point 11.0.4) given how long the issue is been known relative to when those releases came out, but never got a response...

http://mail-archives.apache.org/mod_mbox/lucene-dev/201907.mbox/%3calpine.DEB.2.11.1907251029100.10893@tray%3e

----

An example of how this type of bug can manifest in our tests, from a recent jenkins failure...

{noformat}
   [junit4]   2> NOTE: reproduce with: ant test  -Dtestcase=TestCloudJSONFacetSKG -Dtests.method=testRandom -Dtests.seed=3136E77C0EDA0575 -Dtests.multiplier=3 -Dtests.slow=true -Dtests.locale=es-SV -Dtests.timezone=PST8PDT -Dtests.asserts=true -Dtests.file.encoding=UTF-8
   [junit4] ERROR   13.4s J1 | TestCloudJSONFacetSKG.testRandom <<<
   [junit4]    > Throwable #1: org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at https://127.0.0.1:43673/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.putCacheValue(LRUCache.java:295)
   [junit4]    >        at org.apache.solr.search.LRUCache.put(LRUCache.java:268)
   [junit4]    >        at org.apache.solr.search.SolrCacheHolder.put(SolrCacheHolder.java:92)
{noformat}

TestCloudJSONFacetSKG seems to trigger this assertion bug a lot, but I've also seen it pop up in other tests.  I haven't really dug into the details of JDK-8205399, but I suspect the size/balancing/rebalancing of the HashMap is what tickles the affected code path, so (i guess) tests that result in largeish HashMaps seem more likely to trigger it?

----

The attached path is a simple change to lucene/common-build.xml to modify our existing use of {{"\-ea \-esa"}} into {{"\-ea \-esa \-da:java.util.HashMap"}}

Any objections?


> disable java.util.HashMap assertions to avoid spurious vailures due to JDK-8205399
> ----------------------------------------------------------------------------------
>
>                 Key: LUCENE-8991
>                 URL: https://issues.apache.org/jira/browse/LUCENE-8991
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Chris M. Hostetter
>            Priority: Major
>         Attachments: LUCENE-8991.patch
>
>
> An incredibly common class of jenkins failure (at least in Solr tests) stems from triggering assertion failures in java.util.HashMap -- evidently triggering bug JDK-8205399, first introduced in java-10, and fixed in java-12, but has never been backported to any java-10 or java-11 bug fix release...
>    https://bugs.openjdk.java.net/browse/JDK-8205399
> SOLR-13653 tracks how this bug can affect Solr users, but I think it would make sense to disable java.util.HashMap in our build system to reduce the confusing failures when users/jenkins runs tests, since there is nothing we can do to work around this when testing with java-11 (or java-10 on branch_8x)



--
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