openjdk 11.0.21 2023-10-17 crashes (C2 CompilerThread)

Bug #2054474 reported by Manuel Blechschmidt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openjdk-lts (Ubuntu)
Incomplete
Undecided
Unassigned

Bug Description

I am running mvn install in the following project https://github.com/ere-health/ere-ps-app

mvn starts but than randomly crashes. This happens on different places in all JDKs that I tried in the C2 CompilerThread.

I tried msopenjdk-11, openjdk-11 and openjdk-17.

Here is the start of the crash log of the JVM:

#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f2cfff6ba8e, pid=15512, tid=15528
#
# JRE version: OpenJDK Runtime Environment (11.0.21+9) (build 11.0.21+9-post-Ubuntu-0ubuntu122.04)
# Java VM: OpenJDK 64-Bit Server VM (11.0.21+9-post-Ubuntu-0ubuntu122.04, mixed mode, sharing, tiered, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# V [libjvm.so+0x56ba8e] PhaseChaitin::gather_lrg_masks(bool)+0x3fe
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport -p%p -s%s -c%c -d%d -P%P -u%u -g%g -- %E" (or dumping to /home/manuel/git/ere-ps-app/core.15512)
#
# If you would like to submit a bug report, please visit:
# https://bugs.launchpad.net/ubuntu/+source/openjdk-lts
#

--------------- S U M M A R Y ------------

Command Line: /home/manuel/git/ere-ps-app/target/surefire/surefirebooter4368536429058899597.jar /home/manuel/git/ere-ps-app/target/surefire 2024-02-20T22-38-10_332-jvmRun1 surefire576463445262062624tmp surefire_07833501296589816050tmp

Host: AMD Ryzen 7 7700 8-Core Processor, 16 cores, 30G, Ubuntu 22.04.4 LTS
Time: Tue Feb 20 22:38:13 2024 CET elapsed time: 2.674471 seconds (0d 0h 0m 2s)

--------------- T H R E A D ---------------

Current thread (0x00007f2cf82ae800): JavaThread "C2 CompilerThread0" daemon [_thread_in_native, id=15528, stack(0x00007f2cc8500000,0x00007f2cc8600000)]

Current CompileTask:
C2: 2674 8604 4 io.smallrye.openapi.runtime.util.TypeUtil$$Lambda$911/0x0000000840756840::accept (16 bytes)

Revision history for this message
Manuel Blechschmidt (manuel-blechschmidt) wrote :
Revision history for this message
Manuel Blechschmidt (manuel-blechschmidt) wrote :
Revision history for this message
Manuel Blechschmidt (manuel-blechschmidt) wrote :

Here are a lot of similar bugs that have been closed as infra bugs:
https://bugs.openjdk.org/browse/JDK-8250957

Unfortunately I did not find a reason why they have been closed.

Revision history for this message
Manuel Blechschmidt (manuel-blechschmidt) wrote :

The following might be related aswell: https://github.com/adoptium/adoptium-support/issues/86

Revision history for this message
Manuel Blechschmidt (manuel-blechschmidt) wrote :

The machine has 8 cores and reports 16 processors. This might be related to C2 Compiler Threads. They are set to 6 by default when having 16 processors.

https://medium.com/@RamLakshmanan/jvm-c1-c2-compiler-thread-high-cpu-consumption-b99acc604f1d

Revision history for this message
Manuel Blechschmidt (manuel-blechschmidt) wrote :

The following parameter seams to work around the issue:

export MAVEN_OPTS="-XX:CICompilerCount=2"

Revision history for this message
Vladimir Petko (vpa1977) wrote :

Hi,
I have tried to reproduce it in Mantic with
$java --version
openjdk 11.0.22 2024-01-16
OpenJDK Runtime Environment (build 11.0.22+7-post-Ubuntu-0ubuntu223.10.1)
OpenJDK 64-Bit Server VM (build 11.0.22+7-post-Ubuntu-0ubuntu223.10.1, mixed mode, sharing)
and
$ java --version
openjdk 17.0.10 2024-01-16
OpenJDK Runtime Environment (build 17.0.10+7-Ubuntu-123.10.1)
OpenJDK 64-Bit Server VM (build 17.0.10+7-Ubuntu-123.10.1, mixed mode, sharing)

I have used
export MAVEN_OPTS="-XX:CICompilerCount=6"
to have the same number of compiler threads.

and could not reproduce the issue.

I was wondering if you could try with 11.0.22 / 17.0.10 ?

Changed in openjdk-lts (Ubuntu):
status: New → Incomplete
Revision history for this message
Manuel Blechschmidt (manuel-blechschmidt) wrote :

After changing some CPU settings in the efi (setting it to factory defaults) the crashes disappeared. Seams that this was an AMD CPU bug. It also happened with jdk 11 and 17.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.