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

Jan Høydahl commented on SOLR-16463:
------------------------------------

David, there is a risk of wack-a-mole for sure, we still don't know if there 
are other parts of the code with similar problems, that would manifest once 
this is in. I also hope that the fix will be backported to JDK17, I cannot see 
how they could not backport it...

Cassandra - if we commit the fix for 9.0 Dockerfile, existing users of 
solr:9.0.0 image will get the fix simply by re-pulling. Other users can apply 
the fix manually or choose JDK11. After we commit that fix, if we see reports 
of problems in other parts of the code, we can either continuing plugging each 
one in new updates, or we can throw in the towel and downgrade 9.0 Dockerfile 
to jdk11...

Right now I'm trying to see our options and get momentum so we can make some 
decisions.

> Serious crash on JDK17+ due to JIT on caffeinecache
> ---------------------------------------------------
>
>                 Key: SOLR-16463
>                 URL: https://issues.apache.org/jira/browse/SOLR-16463
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: Docker
>    Affects Versions: 9.0
>            Reporter: Jan Høydahl
>            Assignee: Jan Høydahl
>            Priority: Blocker
>             Fix For: 9.1
>
>          Time Spent: 2h 50m
>  Remaining Estimate: 0h
>
> Solr 9+ under JDK 17+ may crash frequently, during JVM Hotspot optimization 
> of caffeine cache class.
> This is due to a JDK bug 
> ([https://bugs.openjdk.org/browse/JDK-8285835|https://bugs.openjdk.org/browse/JDK-8285835)]),
>  but may not be fixed soon in JDK17, so we should make a workaround to 
> protect our users. The bug is also reported in caffeine project 
> ([https://github.com/ben-manes/caffeine/issues/797]).
> So there are a few possible ways to avoid this
>  * Run Solr 9 on JDK 11
>  * Do not use caffeine cache, find some replacement
>  * Caffeine cache releases a new version that do not suffer the issue, and 
> solr uses that
>  * Instruct JDK to not optimize that class, using JDK option 
> {{-XX:CompileCommand=exclude,com.github.benmanes.caffeine.cache.BoundedLocalCache::put}}
> See users list for examples of this issue seen in the wild: 
> [https://lists.apache.org/thread/wg7qtkddd1t5h08okj7gm9qbrpdf0ox6] 
> Docker users can set SOLR_OPTS with the JDK option above. Patching the 
> official Dockerfile to include this may be the least intrusive fix 
> short-term. We should also document the issue on website and perhaps docker 
> hub to provide users with a workaround.
> For 9.1 we can hardcode the JDK flag in bin/solr.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to