adoptium / adoptium-support

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

Keytool SIGSEGV in temurin-8-jdk #572

Open pierantoniomerlino opened 1 year ago

pierantoniomerlino commented 1 year ago

Please provide a brief summary of the bug

This command

keytool -genkey -alias localhost -keyalg RSA -keysize 4096 -keystore "./httpskeystore.ks" -dname "CN=Kura, OU=Kura, O=Eclipse, L=Amaro, S=UD, C=IT" -ext eku=digitalSignature,nonRepudiation,keyEncipherment,dataEncipherment,keyAgreement,keyCertSign -ext eku=serverAuth,clientAuth,codeSigning,timeStamping -validity 1000 -storepass changeit -keypass changeit

cause keytool to crash with SIGSEGV.

Please provide steps to reproduce where possible

Run the following command:

keytool -genkey -alias localhost -keyalg RSA -keysize 4096 -keystore "./httpskeystore.ks" -dname "CN=Kura, OU=Kura, O=Eclipse, L=Amaro, S=UD, C=IT" -ext eku=digitalSignature,nonRepudiation,keyEncipherment,dataEncipherment,keyAgreement,keyCertSign -ext eku=serverAuth,clientAuth,codeSigning,timeStamping -validity 1000 -storepass changeit -keypass changeit

Expected Results

The keystore is created without any errors.

Actual Results

The output of the command is:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x0000007fb017c8e4, pid=1243, tid=0x0000007fbe4671c0
#
# JRE version: OpenJDK Runtime Environment (8.0_345-b01) (build 1.8.0_345-b01)
# Java VM: OpenJDK 64-Bit Server VM (25.345-b01 mixed mode linux-aarch64 compressed oops)
# Problematic frame:
# J 244 C2 java.math.BigInteger.multiplyToLen([II[II[I)[I (216 bytes) @ 0x0000007fb017c8e4 [0x0000007fb017c8c0+0x24]
#
# Failed to write core dump. 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:
# /home/pi/hs_err_pid1243.log
#
# If you would like to submit a bug report, please visit:
#   https://github.com/adoptium/adoptium-support/issues
#
Aborted

hs_err_pid1243.log

What Java Version are you using?

openjdk version "1.8.0_345" OpenJDK Runtime Environment (Temurin)(build 1.8.0_345-b01) OpenJDK 64-Bit Server VM (Temurin)(build 25.345-b01, mixed mode)

What is your operating system and platform?

RaspberryPiOS 64bit

root@raspberrypi:/home/pi# uname -a Linux raspberrypi 5.15.32-v8+ #1538 SMP PREEMPT Thu Mar 31 19:40:39 BST 2022 aarch64 GNU/Linux

How did you install Java?

sudo apt-get install -y wget apt-transport-https gnupg
sudo wget -O - https://packages.adoptium.net/artifactory/api/gpg/key/public | sudo apt-key add -
sudo echo "deb https://packages.adoptium.net/artifactory/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" | sudo tee /etc/apt/sources.list.d/adoptium.list
sudo apt-get update
sudo apt-get install temurin-8-jdk

Did it work before?

It works if the keytool from openjdk-8-jre-headless is used.

Did you test with other Java versions?

It works if the keytool from openjdk-8-jre-headless is used.

Relevant log output

No response

pierantoniomerlino commented 1 year ago

Just to report that the platform is arm 64 bit, not 32. Thanks.