Confluence JVM crashes with SIGSEGV in libjvm.so because of the C2 Compiler attempting to optimize com.aspose.slides methods used for file preview.


Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.

Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles for non-Data Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Symptoms

  1. Confluence node crashes.
  2. The Java process is not running and it was not shut down manually.
  3. Files with names like hs_err_pidxxxxx.log being created in the app server's bin 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

Cause

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

Environment

OpenJDK Runtime Environment Temurin-11.0.20.1+1 (11.0.20.1+1) (build 11.0.20.1+1)

Workaround

In Windows, Confluence running as a service:

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

  2. Open the command window (Choose Start > cmd.exe)

  3. cd to the bin directory of your Confluence installation folder and run the following command: 

    tomcat9w.exe //ES//%service_name%
  4. Click on the Java tab to see the list of current start-up options
  5. In the Java Options box, add 

    -XX:CompileCommand=exclude,com.aspose.slides.qw::do
  6. Restart the service 

    For more details, please refer to Configuring System Properties - Windows service

In Linux:

  1. Open the setenv.sh from Confluence installation folder
  2. Add the following line

    CATALINA_OPTS="-XX:CompileCommand=exclude,com.aspose.slides.qw::do ${CATALINA_OPTS}"
  3. Restart Confluence




Last modified on Mar 19, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.