You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by ja...@apache.org on 2022/10/20 08:02:35 UTC
[solr] branch branch_9_1 updated: SOLR-16463: Workaround for serious crash on JDK17+ (#1090)
This is an automated email from the ASF dual-hosted git repository.
janhoy pushed a commit to branch branch_9_1
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/branch_9_1 by this push:
new 99bd072c3cb SOLR-16463: Workaround for serious crash on JDK17+ (#1090)
99bd072c3cb is described below
commit 99bd072c3cbff7b64aeba66aa6719f51fdb8502f
Author: Jan Høydahl <ja...@users.noreply.github.com>
AuthorDate: Thu Oct 20 09:54:32 2022 +0200
SOLR-16463: Workaround for serious crash on JDK17+ (#1090)
---
solr/CHANGES.txt | 2 ++
solr/bin/solr | 6 ++++++
solr/bin/solr.cmd | 6 ++++++
3 files changed, 14 insertions(+)
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 44566048809..f49e4d11f24 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -163,6 +163,8 @@ Bug Fixes
* SOLR-16453: Overseer doesn't handle PRS and non-PRS messages properly (Justin Sweeney, Hitesh Khamesra)
+* SOLR-16463: Workaround for serious crash on JDK17+ due to JIT on caffeinecache (janhoy, Uwe Schindler)
+
Other Changes
---------------------
* SOLR-16351: Upgrade Carrot2 to 4.4.3, upgrade randomizedtesting to 2.8.0. (Dawid Weiss)
diff --git a/solr/bin/solr b/solr/bin/solr
index 9373ee6d01e..9174c64b04c 100755
--- a/solr/bin/solr
+++ b/solr/bin/solr
@@ -2239,6 +2239,12 @@ function start_solr() {
exit 1
fi
+ # Workaround for JIT crash, see https://issues.apache.org/jira/browse/SOLR-16463
+ if [[ "$JAVA_VER_NUM" -ge "17" ]] ; then
+ SOLR_OPTS+=("-XX:CompileCommand=exclude,com.github.benmanes.caffeine.cache.BoundedLocalCache::put")
+ echo "Java $JAVA_VER_NUM detected. Enabled workaround for SOLR-16463"
+ fi
+
SOLR_START_OPTS=('-server' "${JAVA_MEM_OPTS[@]}" "${GC_TUNE[@]}" "${GC_LOG_OPTS[@]}" "${IP_ACL_OPTS[@]}" \
"${REMOTE_JMX_OPTS[@]}" "${CLOUD_MODE_OPTS[@]}" ${SOLR_LOG_LEVEL_OPT:-} -Dsolr.log.dir="$SOLR_LOGS_DIR" \
"-Djetty.port=$SOLR_PORT" "-DSTOP.PORT=$stop_port" "-DSTOP.KEY=$STOP_KEY" \
diff --git a/solr/bin/solr.cmd b/solr/bin/solr.cmd
index e2f2d4824de..a626abbca2f 100755
--- a/solr/bin/solr.cmd
+++ b/solr/bin/solr.cmd
@@ -1247,6 +1247,12 @@ IF "%GC_TUNE%"=="" (
-XX:+ExplicitGCInvokesConcurrent
)
+REM Workaround for JIT crash, see https://issues.apache.org/jira/browse/SOLR-16463
+if !JAVA_MAJOR_VERSION! GEQ 17 (
+ set SOLR_OPTS=%SOLR_OPTS% -XX:CompileCommand=exclude,com.github.benmanes.caffeine.cache.BoundedLocalCache::put
+ echo Java %JAVA_MAJOR_VERSION% detected. Enabled workaround for SOLR-16463
+)
+
if !JAVA_MAJOR_VERSION! GEQ 9 if NOT "%JAVA_VENDOR%" == "OpenJ9" (
IF NOT "%GC_LOG_OPTS%"=="" (
echo ERROR: On Java 9 you cannot set GC_LOG_OPTS, only default GC logging is available. Exiting