adoptium / adoptium-support

For end-user problems reported with our binary distributions
Apache License 2.0
43 stars 15 forks source link

A fatal error has been detected by the Java Runtime Environment: SIGSEGV (0xb) at pc=0x00007f28889c36f7, pid=3403, tid=3404 #1087

Closed abotelho-cbn closed 1 week ago

abotelho-cbn commented 2 weeks ago

Please provide a brief summary of the bug

Java version: 21.0.3+9-LTS (also seems to apply to 17.0.11+9-LTS) OS: Debian GNU/Linux 12 (bookworm) hs_err_pid3403.log

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f28889c36f7, pid=3403, tid=3404
#
# JRE version:  (21.0.3+9) (build )
# Java VM: OpenJDK 64-Bit Server VM (21.0.3+9-LTS, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# V  [libjvm.so+0x7c36f7]  G1CollectedHeap::populate_archive_regions_bot_part(MemRegion)+0xe7
#
# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /root/hs_err_pid3403.log

hs_err_pid3403.log is attached.

Did you test with the latest update version?

Please provide steps to reproduce where possible

Install Temurin on Debian 12 Bookworm and run java -version

Expected Results

Display Java version without SIGSEGV

Actual Results

Above error

What Java Version are you using?

JRE version: (21.0.3+9) (build ) # Java VM: OpenJDK 64-Bit Server VM (21.0.3+9-LTS, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)

What is your operating system and platform?

Debian GNU/Linux 12 (bookworm)

How did you install Java?

Temurin Debian repository.

Did it work before?

Java 8 seems to work without problem. Java 17 and 21 do not, but this is the first time I've tried Java 17 and 21.

Did you test with other Java versions?

No response

Relevant log output

No response

karianna commented 2 weeks ago

Can you try Java 11? I'm trying to narrow this down between LTS's :-)

abotelho-cbn commented 2 weeks ago

Certainly, I'll have that tested in a few minutes.

abotelho-cbn commented 2 weeks ago
0 ✓ debfactory [rw] ~ # java --version
openjdk 11.0.23 2024-04-16
OpenJDK Runtime Environment Temurin-11.0.23+9 (build 11.0.23+9)
OpenJDK 64-Bit Server VM Temurin-11.0.23+9 (build 11.0.23+9, mixed mode)

Seems to work!

abotelho-cbn commented 2 weeks ago

More information discovered during troubleshooting: The application of Java here is on kiosk-like hardware. Java (Debian's Java included) is selected and installed by Puppet config management. This same Puppet config management installed Temurin 8 and 11 "correctly".

If I manually install or reinstall the temurin-21-jre package, it seems to work.

0 ✓ debfactory [rw] /etc/apt/sources.list.d # java --version
openjdk 21.0.3 2024-04-16 LTS
OpenJDK Runtime Environment Temurin-21.0.3+9 (build 21.0.3+9-LTS)
OpenJDK 64-Bit Server VM Temurin-21.0.3+9 (build 21.0.3+9-LTS, mixed mode, sharing)
karianna commented 2 weeks ago

Oh I see OK, your crash is with the OpenJDK that Ubuntu packages, not temurin, so you'll want to post your original bug there.

abotelho-cbn commented 2 weeks ago

No, Temurin 17 and 21 crash too. Debian's OpenJDK 17 crashes as well. So while I don't believe the Temurin builds are at fault, they do crash.

It seems like something may have changed for LTS versions higher than 11 that isn't compatible with something Puppet is doing to install OpenJDK (including Temurin). Not really sure what yet.

Cheers

karianna commented 2 weeks ago

Is puppet installing it in a different location?

abotelho-cbn commented 2 weeks ago

No, it doesn't. In fact it should be installing almost identically. I can get you the exact flags it passes to apt shortly.

abotelho-cbn commented 2 weeks ago

Debug: Executing: '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold --force-yes install openjdk-17-jre'

This is what Puppet is executing under the hood if I specify openjdk-17-jre as an example.

The only thing that gave me a little pause was --force-confold, but as far as I can tell both Temurin and Debian's Java don't really ship with files marked as configuration?

abotelho-cbn commented 1 week ago

After a lot of reworking the build process for our images and rebuilding a base image, things seem to work fine now.

It's still a mystery to me how it could have broken in this very specific way (especially with Temurin 8 and 11 working fine...) but it seems like there was something wrong in the base image. The base image is what get Puppeted to build specific "final" images. It's a head-scratcher mostly because installing OpenJDK (Temurin or otherwise) manually "fixed" the problem, but OpenJDK isn't part of the base image... So I don't know how "fixing" the base image could have fixed this.

Anyway, I appreciate the time you've had to spend on this. If I stumble upon the why for this problem I'll let it be known here for future reference.