Confluence JVM crashes with SIGSEGV in libjvm.so because of the C2 Compiler attempting to optimize com.aspose.slides methods used for file preview.
プラットフォームについて: Data Center - この記事は、Data Center プラットフォームのアトラシアン製品に適用されます。
このナレッジベース記事は製品の Data Center バージョン用に作成されています。Data Center 固有ではない機能の Data Center ナレッジベースは、製品のサーバー バージョンでも動作する可能性はありますが、テストは行われていません。サーバー*製品のサポートは 2024 年 2 月 15 日に終了しました。サーバー製品を利用している場合は、アトラシアンのサーバー製品のサポート終了のお知らせページにて移行オプションをご確認ください。
*Fisheye および Crucible は除く
症状
- Confluence node crashes.
- The Java process is not running and it was not shut down manually.
- Files with names like
hs_err_pidxxxxx.log
being created in the app server'sbin
directory, containing text such as the below:
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007fe6b0b08252, pid=2019060, tid=2019072
#
# JRE version: OpenJDK Runtime Environment Temurin-11.0.20.1+1 (11.0.20.1+1) (build 11.0.20.1+1)
# Java VM: OpenJDK 64-Bit Server VM Temurin-11.0.20.1+1 (11.0.20.1+1, mixed mode, tiered, g1 gc, linux-amd64)
# Problematic frame:
# V [libjvm.so+0xb08252] PhaseIdealLoop::build_loop_late_post(Node*)+0x182
#
This indicates Java crashing
原因
A Java virtual machine crash is analogous to getting a Windows Blue Screen of Death. There can be many reasons for JVM crash, please refer to Java Crashes page and follow the suggestions.
For this specific issue where JVM is crashing due to C2 compiler fault while attempting to optimize a com.aspose.slides.qw:do method as per hs_err_pid*.log
crash. Both the sandbox process and the file preview process within Confluence make use of the third-party Aspose library.
--------------- T H R E A D ---------------
Current thread (0x00007fe6aa9e1000): JavaThread "C2 CompilerThread0" daemon [_thread_in_native, id=2019072, stack(0x00007fc5456bc000,0x00007fc5457bd000)] Current CompileTask:
C2:313159257 2179461 % ! 4 com.aspose.slides.qw::do @ 15 (372 bytes)
Stack: [0x00007fc5456bc000,0x00007fc5457bd000], sp=0x00007fc5457b8520, free space=1009k
Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.so+0xb08252] PhaseIdealLoop::build_loop_late_post(Node*)+0x182
V [libjvm.so+0xb0880b] PhaseIdealLoop::build_loop_late(VectorSet&, Node_List&, Node_Stack&)+0x16b
V [libjvm.so+0xb0b643] PhaseIdealLoop::build_and_optimize()+0x753
V [libjvm.so+0x67659e] Compile::Optimize()+0xe3e
V [libjvm.so+0x677345] Compile::Compile(ciEnv*, C2Compiler*, ciMethod*, int, bool, bool, bool, bool, DirectiveSet*)+0xcb5
V [libjvm.so+0x588f14] C2Compiler::compile_method(ciEnv*, ciMethod*, int, DirectiveSet*)+0xd4
V [libjvm.so+0x6817b6] CompileBroker::invoke_compiler_on_method(CompileTask*)+0x446
V [libjvm.so+0x6830e8] CompileBroker::compiler_thread_loop()+0x5a8
V [libjvm.so+0xedfa7a] JavaThread::thread_main_inner()+0x1ba
V [libjvm.so+0xedc6bf] Thread::call_run()+0x14f
V [libjvm.so+0xc7ad06] thread_native_entry(Thread*)+0xe6
環境
OpenJDK Runtime Environment Temurin-11.0.20.1+1 (11.0.20.1+1) (build 11.0.20.1+1)
回避策
In Windows, Confluence running as a service:
Identify the name of the service that Confluence is installed as in Windows (Go to Control Panel > Administrative Tools > Services)
We are expecting to see a service name like this Confluence251017164028
Open the command window (Choose Start > cmd.exe)
cd to the bin directory of your Confluence installation folder and run the following command:
tomcat9w.exe //ES//%service_name%
- Click on the Java tab to see the list of current start-up options
In the Java Options box, add
-XX:CompileCommand=exclude,com.aspose.slides.qw::do
Restart the service
For more details, please refer to Configuring System Properties - Windows service
In Linux:
- Open the setenv.sh from Confluence installation folder
Add the following line
CATALINA_OPTS="-XX:CompileCommand=exclude,com.aspose.slides.qw::do ${CATALINA_OPTS}"
- Confluence を再起動します。