Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JVM crash on C library init #282

Open
tkrah opened this issue Feb 7, 2024 · 1 comment
Open

JVM crash on C library init #282

tkrah opened this issue Feb 7, 2024 · 1 comment

Comments

@tkrah
Copy link

tkrah commented Feb 7, 2024

Hi,

I tried running a spring-shell project from gradles bootRun task in non-interactive mode, but the JVM is just crashing:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f1a692c967e, pid=78732, tid=78736
#
# JRE version: OpenJDK Runtime Environment (17.0.9+9) (build 17.0.9+9-Ubuntu-122.04)
# Java VM: OpenJDK 64-Bit Server VM (17.0.9+9-Ubuntu-122.04, mixed mode, emulated-client, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# V  [libjvm.so+0x8c967e]  jni_SetStaticIntField+0xae
Stack: [0x00007f1a68500000,0x00007f1a68600000],  sp=0x00007f1a685f81b0,  free space=992k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x8c967e]  jni_SetStaticIntField+0xae
C  [libjansi.so+0x1b56]  Java_org_fusesource_jansi_internal_CLibrary_init+0x36

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  org.fusesource.jansi.internal.CLibrary.init()V+0
j  org.fusesource.jansi.internal.CLibrary.<clinit>()V+12
v  ~StubRoutines::call_stub
j  org.jline.terminal.impl.jansi.JansiNativePty.isPosixSystemStream(Lorg/jline/terminal/spi/SystemStream;)Z+4
j  org.jline.terminal.impl.jansi.JansiTerminalProvider.isPosixSystemStream(Lorg/jline/terminal/spi/SystemStream;)Z+1
j  org.jline.terminal.impl.jansi.JansiTerminalProvider.isSystemStream(Lorg/jline/terminal/spi/SystemStream;)Z+14
j  org.jline.terminal.TerminalBuilder.checkProvider(Ljava/lang/String;Ljava/lang/IllegalStateException;Ljava/util/List;Ljava/lang/Boolean;Ljava/lang/String;Ljava/lang/String;)V+56
j  org.jline.terminal.TerminalBuilder.getProviders(Ljava/lang/String;Ljava/lang/IllegalStateException;)Ljava/util/List;+56
j  org.jline.terminal.TerminalBuilder.doBuild()Lorg/jline/terminal/Terminal;+120
j  org.jline.terminal.TerminalBuilder.build()Lorg/jline/terminal/Terminal;+19
j  org.springframework.shell.boot.JLineShellAutoConfiguration.terminal(Lorg/springframework/beans/factory/ObjectProvider;)Lorg/jline/terminal/Terminal;+30
v  ~StubRoutines::call_stub

I don't know what the error here is but it should not crash the JVM, better bail with some exception what's unexpected in that setup.

@alekseinovikov
Copy link

alekseinovikov commented Feb 27, 2025

The same here 👍🏻 I'm using GraalVM:

A fatal error has been detected by the Java Runtime Environment:

SIGSEGV (0xb) at pc=0x000074ae35b73216, pid=46494, tid=46590

JRE version: OpenJDK Runtime Environment GraalVM CE 23.0.2+7.1 (23.0.2+7) (build 23.0.2+7-jvmci-b01)
Java VM: OpenJDK 64-Bit Server VM GraalVM CE 23.0.2+7.1 (23.0.2+7-jvmci-b01, mixed mode, emulated-client, sharing, tiered, jvmci, jvmci compiler, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
Problematic frame:
V [libjvm.so+0x973216] jni_SetStaticIntField+0x66

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants