You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@solr.apache.org by Jan Høydahl <ja...@cominvent.com> on 2022/10/25 08:31:16 UTC
[ANNOUNCE] Java 17 bug affecting Solr
Several users running Solr in production on OpenJDK 17 or later have experienced JVM crashes due to a known bug in the JDK. Read more about the bug in SOLR-16463[1].
Known mitigations are to either downgrade to JDK 11 or to start Solr with a Java startup flag that avoids the failure condition. Here is how to manually apply the flag:
Edit your solr.in.sh or solr.in.cmd file to set the SOLR_OPTS environment variable as follows:
Linux:
SOLR_OPTS=-XX:CompileCommand=exclude,com.github.benmanes.caffeine.cache.BoundedLocalCache::put
Windows:
SET SOLR_OPTS=-XX:CompileCommand=exclude,com.github.benmanes.caffeine.cache.BoundedLocalCache::put
Alternatively, you can inject the same flag with the -a argument, e.g:
bin/solr -a "-XX:CompileCommand=exclude,com.github.benmanes.caffeine.cache.BoundedLocalCache::put"
If you run Solr 9 with the official Docker image, we have already pushed an updated Docker image to Docker Hub that will inject the flag for you. Just pull the image again to get it. The Docker image uses the -a option to set this java flag when running Solr, so if you are using the -a option you will need to provide the JVM flag mentioned above in addition to the other flags you are setting.
[1]: https://issues.apache.org/jira/browse/SOLR-16463
Read this news on the web page: https://solr.apache.org/news.html#java-17-bug-affecting-solr
Re: [ANNOUNCE] Java 17 bug affecting Solr
Posted by Jan Høydahl <ja...@cominvent.com>.
I believe it is a hotspot JIT compiler specific bug.
Jan Høydahl
> 26. okt. 2022 kl. 10:18 skrev Alex The Rocker <al...@gmail.com>:
>
> Hello,
>
> Is this bug with Solr with Java 17 specific to HotSpot-based JVMs ?
>
> FYI I'm running Solr 8.11.2 in production for a while with IBM Semeru
> 17 (based on OpenJ9 JVM) on CentOS 7.9 x64, and I have not observed
> such crashes.
>
> Alex
>
>> Le mar. 25 oct. 2022 à 10:32, Jan Høydahl <ja...@cominvent.com> a écrit :
>>
>> Several users running Solr in production on OpenJDK 17 or later have experienced JVM crashes due to a known bug in the JDK. Read more about the bug in SOLR-16463[1].
>>
>> Known mitigations are to either downgrade to JDK 11 or to start Solr with a Java startup flag that avoids the failure condition. Here is how to manually apply the flag:
>>
>> Edit your solr.in.sh or solr.in.cmd file to set the SOLR_OPTS environment variable as follows:
>>
>> Linux:
>> SOLR_OPTS=-XX:CompileCommand=exclude,com.github.benmanes.caffeine.cache.BoundedLocalCache::put
>>
>> Windows:
>> SET SOLR_OPTS=-XX:CompileCommand=exclude,com.github.benmanes.caffeine.cache.BoundedLocalCache::put
>>
>> Alternatively, you can inject the same flag with the -a argument, e.g:
>> bin/solr -a "-XX:CompileCommand=exclude,com.github.benmanes.caffeine.cache.BoundedLocalCache::put"
>>
>> If you run Solr 9 with the official Docker image, we have already pushed an updated Docker image to Docker Hub that will inject the flag for you. Just pull the image again to get it. The Docker image uses the -a option to set this java flag when running Solr, so if you are using the -a option you will need to provide the JVM flag mentioned above in addition to the other flags you are setting.
>>
>> [1]: https://issues.apache.org/jira/browse/SOLR-16463
>>
>> Read this news on the web page: https://solr.apache.org/news.html#java-17-bug-affecting-solr
Re: [ANNOUNCE] Java 17 bug affecting Solr
Posted by Shawn Heisey <ap...@elyograg.org>.
On 10/26/22 02:17, Alex The Rocker wrote:
> Is this bug with Solr with Java 17 specific to HotSpot-based JVMs ?
>
> FYI I'm running Solr 8.11.2 in production for a while with IBM Semeru
> 17 (based on OpenJ9 JVM) on CentOS 7.9 x64, and I have not observed
> such crashes.
Good question, which Jan seems to have answered.
Lucene (the search API that provides most of Solr's functionality) has
had known bugs with IBM J9 Java in the past. These were a problem
because of one or more of the speed optimizations that the IBM JVM
enables. I have no idea whether those bugs still affects current
versions or not. If it were me, I wouldn't risk it. But if you're
running without problems, yay.
Thanks,
Shawn
Re: [ANNOUNCE] Java 17 bug affecting Solr
Posted by Alex The Rocker <al...@gmail.com>.
Hello,
Is this bug with Solr with Java 17 specific to HotSpot-based JVMs ?
FYI I'm running Solr 8.11.2 in production for a while with IBM Semeru
17 (based on OpenJ9 JVM) on CentOS 7.9 x64, and I have not observed
such crashes.
Alex
Le mar. 25 oct. 2022 à 10:32, Jan Høydahl <ja...@cominvent.com> a écrit :
>
> Several users running Solr in production on OpenJDK 17 or later have experienced JVM crashes due to a known bug in the JDK. Read more about the bug in SOLR-16463[1].
>
> Known mitigations are to either downgrade to JDK 11 or to start Solr with a Java startup flag that avoids the failure condition. Here is how to manually apply the flag:
>
> Edit your solr.in.sh or solr.in.cmd file to set the SOLR_OPTS environment variable as follows:
>
> Linux:
> SOLR_OPTS=-XX:CompileCommand=exclude,com.github.benmanes.caffeine.cache.BoundedLocalCache::put
>
> Windows:
> SET SOLR_OPTS=-XX:CompileCommand=exclude,com.github.benmanes.caffeine.cache.BoundedLocalCache::put
>
> Alternatively, you can inject the same flag with the -a argument, e.g:
> bin/solr -a "-XX:CompileCommand=exclude,com.github.benmanes.caffeine.cache.BoundedLocalCache::put"
>
> If you run Solr 9 with the official Docker image, we have already pushed an updated Docker image to Docker Hub that will inject the flag for you. Just pull the image again to get it. The Docker image uses the -a option to set this java flag when running Solr, so if you are using the -a option you will need to provide the JVM flag mentioned above in addition to the other flags you are setting.
>
> [1]: https://issues.apache.org/jira/browse/SOLR-16463
>
> Read this news on the web page: https://solr.apache.org/news.html#java-17-bug-affecting-solr