Alpine3 issue with Java
jonathannaguin opened this issue · comments
Hello,
I am trying to include the netty-tcnative-boringssl-static
libraries in an Alpine3 image and Java seems to be failing at start up.
The Docker image I am using is "amazoncorretto:17.0.7-alpine".
My project declares the following runtime dependencies (in Gradle):
runtimeOnly "io.netty:netty-tcnative-boringssl-static:2.0.60.Final:linux-aarch_64"
runtimeOnly "io.netty:netty-tcnative-boringssl-static:2.0.60.Final:linux-x86_64"
When I start the container, Java fails with:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00000000000226a0, pid=1, tid=7
#
# JRE version: OpenJDK Runtime Environment Corretto-17.0.7.7.1 (17.0.7+7) (build 17.0.7+7-LTS)
# Java VM: OpenJDK 64-Bit Server VM Corretto-17.0.7.7.1 (17.0.7+7-LTS, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, serial gc, linux-aarch64)
# Problematic frame:
# C [libnetty_tcnative_linux_aarch_6410503439066268798245.so+0x2330c] init_have_lse_atomics+0xc
#
# 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:
# /dev/stdout
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00000000000226a0, pid=1, tid=7
#
# JRE version: OpenJDK Runtime Environment Corretto-17.0.7.7.1 (17.0.7+7) (build 17.0.7+7-LTS)
# Java VM: OpenJDK 64-Bit Server VM Corretto-17.0.7.7.1 (17.0.7+7-LTS, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, serial gc, linux-aarch64)
# Problematic frame:
# C [libnetty_tcnative_linux_aarch_6410503439066268798245.so+0x2330c] init_have_lse_atomics+0xc
#
# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# If you would like to submit a bug report, please visit:
# https://github.com/corretto/corretto-17/issues/
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
On my Dockerfile I am already installing libc6-compat
.
Has anyone tried to use the tcnative libraries with Alpine3?
Can you try 2.0.55.Final ? I Wonder if an older version works ...
I ran into this as well, so I put together a small reproducer project:
https://github.com/jthurne/netty-tcnative-boringssl-2.0.61-aarch64-crash
The README contains instructions on how to build and run the example to recreate the crash.
I tested a number of different versions of netty-tcnative, including 2.0.61, 2.0.60, and 2.0.55 (all of them experience the crash).
For 2.0.60 and 2.0.61, the crash occurs even if libc6-compat is not installed.
You can see where the dependencies are declared, and how the docker image is built by inspecting the app/build.gradle.kts.
It would be great if we could get to the bottom of this. It's preventing us from using netty-tcnative on aarch64 architectures.