No subject

Donald Kwakkel dkwakkel at gmail.com
Mon Sep 30 12:46:50 UTC 2019


Is this a known issue / are there workarounds?

If during malloc a crash signal occurs, the jvm will hang because it will
call again malloc, which is not reentrant (for explanation see
https://stackoverflow.com/questions/40049751/malloc-inside-linux-signal-handler-cause-deadlock).


This is for production environments a big problem because self-healing (in
this case an automatic restart through jsvc) will not work. Resulting in
manual actions by cloud administrators!

Thread 84 (Thread 0x7f110f2c0700 (LWP 17574)):
#0  0x0000003ce2cf542e in __lll_lock_wait_private () from /lib64/libc.so.6
#1  0x0000003ce2c7bed5 in _L_lock_9323 () from /lib64/libc.so.6
#2  0x0000003ce2c797c6 in malloc () from /lib64/libc.so.6
#3  0x00007f123a7cb7d5 in os::malloc(unsigned long, MemoryType,
NativeCallStack const&) () from /usr/java/latest/lib/server/libjvm.so
#4  0x00007f1239fd7610 in AllocateHeap(unsigned long, MemoryType,
AllocFailStrategy::AllocFailEnum) () from
/usr/java/latest/lib/server/libjvm.so
#5  0x00007f123a271d48 in Decoder::decode(unsigned char*, char*, int,
int*, char const*, bool) () from /usr/java/latest/lib/server/libjvm.so
#6  0x00007f123a7d42ea in os::dll_address_to_function_name(unsigned
char*, char*, int, int*, bool) () from
/usr/java/latest/lib/server/libjvm.so
#7  0x00007f123a32b824 in frame::print_C_frame(outputStream*, char*,
int, unsigned char*) () from /usr/java/latest/lib/server/libjvm.so
#8  0x00007f123a9f7b84 in VMError::report(outputStream*, bool) () from
/usr/java/latest/lib/server/libjvm.so
#9  0x00007f123a9fb4f6 in VMError::report_and_die(int, char const*,
char const*, __va_list_tag*, Thread*, unsigned char*, void*, void*,
char const*, int, unsigned long) ()
   from /usr/java/latest/lib/server/libjvm.so
#10 0x00007f123a9fbb7b in VMError::report_and_die(Thread*, unsigned
int, unsigned char*, void*, void*, char const*, ...) () from
/usr/java/latest/lib/server/libjvm.so
#11 0x00007f123a9fbbae in VMError::report_and_die(Thread*, unsigned
int, unsigned char*, void*, void*) () from
/usr/java/latest/lib/server/libjvm.so
#12 0x00007f123a7dea10 in JVM_handle_linux_signal () from
/usr/java/latest/lib/server/libjvm.so
#13 0x00007f123a7d2c08 in signalHandler(int, siginfo*, void*) () from
/usr/java/latest/lib/server/libjvm.so
#14 <signal handler called>
#15 0x0000003ce2c7856c in _int_malloc () from /lib64/libc.so.6
#16 0x0000003ce2c797d1 in malloc () from /lib64/libc.so.6
#17 0x00007f123a7cb6ba in os::malloc(unsigned long, MemoryType) ()
from /usr/java/latest/lib/server/libjvm.so
#18 0x00007f123a5bd661 in JvmtiEnv::Allocate(long, unsigned char**) ()
from /usr/java/latest/lib/server/libjvm.so
#19 0x00007f123a579adf in jvmti_Allocate () from
/usr/java/latest/lib/server/libjvm.so
#20 0x00007f1238f2138d in jvmtiAllocate () from /opt/jdk-11/lib/libjdwp.so
#21 0x00007f1238f04d3e in classTrack_processUnloads () from
/opt/jdk-11/lib/libjdwp.so
#22 0x00007f1238f0cdbb in event_callback () from /opt/jdk-11/lib/libjdwp.so
#23 0x00007f1238f0dd7b in cbThreadEnd () from /opt/jdk-11/lib/libjdwp.so
#24 0x00007f123a5d68ff in JvmtiExport::post_thread_end(JavaThread*) ()
from /usr/java/latest/lib/server/libjvm.so
#25 0x00007f123a996836 in JavaThread::exit(bool, JavaThread::ExitType)
() from /usr/java/latest/lib/server/libjvm.so
#26 0x00007f123a996c96 in JavaThread::thread_main_inner() () from
/usr/java/latest/lib/server/libjvm.so
#27 0x00007f123a997177 in JavaThread::run() () from
/usr/java/latest/lib/server/libjvm.so
#28 0x00007f123a7dc7d0 in thread_native_entry(Thread*) () from
/usr/java/latest/lib/server/libjvm.so
#29 0x0000003ce34077f1 in start_thread () from /lib64/libpthread.so.0
#30 0x0000003ce2ce5ccd in clone () from /lib64/libc.so.6

See similair openjdk bug: https://bugs.openjdk.java.net/browse/JDK-8156823
java -version
openjdk version "11" 2018-09-25
OpenJDK Runtime Environment 18.9 (build 11+28)
OpenJDK 64-Bit Server VM 18.9 (build 11+28, mixed mode)


More information about the hotspot-dev mailing list