bell-sw / Liberica

Free and 100% open source Progressive Java Runtime for modern Java™ deployments supported by a leading OpenJDK contributor
https://bell-sw.com/pages/libericajdk/
GNU General Public License v2.0
318 stars 29 forks source link

Alpine image causes core dump. #131

Open javadevmtl opened 1 year ago

javadevmtl commented 1 year ago

Hi as far as I know different people are reporting various SIGSEGV error on Alpine, not specific to Liberica either. In my case seems to be happening with Bouncy Castlem but it's npt Bouncy Castle related either. Unfortunantly I don't have a core dump as my container env is pretty aggressive at cleanup so the container is removed I only have the log.

I was previously using the Azul distribution and I thought I would try Liberica. For me this only started happening in the last 1-2 months where I noticed it once and thought it was a coincidence, but now it seems as I update my images it appearing more and more.

Switching to Debian based image seems to work so far.

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f65b4f8063b (sent by kill), pid=1, tid=24
#
# JRE version: OpenJDK Runtime Environment (11.0.19+7) (build 11.0.19+7-LTS)
# Java VM: OpenJDK 64-Bit Server VM (11.0.19+7-LTS, mixed mode, tiered, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# J 3024 c2 org.bouncycastle.crypto.modes.GCMBlockCipher.gCTRBlock([B[BI)V (56 bytes) @ 0x00007f65b4f8063b [0x00007f65b4f7fd80+0x00000000000008bb]
#
# Core dump will be written. Default location: //core.1
#
# An error report file with more information is saved as:
# //hs_err_pid1.log
Compiled method (c2)  161748 3036       4       org.bouncycastle.crypto.modes.GCMBlockCipher::processBytes (87 bytes)
 total in heap  [0x00007f65b4f83290,0x00007f65b4f83a88] = 2040
 relocation     [0x00007f65b4f83408,0x00007f65b4f83440] = 56
 main code      [0x00007f65b4f83440,0x00007f65b4f837c0] = 896
 stub code      [0x00007f65b4f837c0,0x00007f65b4f837f8] = 56
 oops           [0x00007f65b4f837f8,0x00007f65b4f83800] = 8
 metadata       [0x00007f65b4f83800,0x00007f65b4f83810] = 16
 scopes data    [0x00007f65b4f83810,0x00007f65b4f83958] = 328
 scopes pcs     [0x00007f65b4f83958,0x00007f65b4f83a28] = 208
 dependencies   [0x00007f65b4f83a28,0x00007f65b4f83a30] = 8
 handler table  [0x00007f65b4f83a30,0x00007f65b4f83a60] = 48
 nul chk table  [0x00007f65b4f83a60,0x00007f65b4f83a88] = 40
Could not load hsdis-amd64.so; library not loadable; PrintAssembly is disabled
#
# If you would like to submit a bug report, please visit:
#   https://bell-sw.com/support
#

[error occurred during error reporting (), id 0xb, SIGSEGV (0xb) at pc=0x00007f65c54e8602]
javadevmtl commented 1 year ago

Hi if you are interested to check, I managed to finally get a core dump for Azul: https://github.com/zulu-openjdk/zulu-openjdk/issues/215

Initially I was using Azul Alpine and then had switched to trying Liberica Alpine with similar issues so at that point I tried also Debian on both distributions. Same issue.

I still don't think it's distribution, image or library. It's probably more a docker issue.