Many Java threads stuck in Object.wait() java.lang.Thread.State: RUNNABLE
Issue
- When restarting the Java application using
systemctl
, it hangs, with many threads stuck inObject.wait() java.lang.Thread.State: RUNNABLE
. - No threads are progressing to
JavaCalls::call
. - Example 1 pstack output:
Thread 124 (Thread 0x7fec579bb700 (LWP 24351)):
#0 0x00007fee4fd52a35 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1 0x00007fee4ecf1ee3 in os::PlatformEvent::park() () from /path/to/jdk-11.0.8+10/lib/server/libjvm.so
#2 0x00007fee4ecbc895 in ObjectMonitor::wait(long, bool, Thread*) () from /path/to/jdk-11.0.8+10/lib/server/libjvm.so
#3 0x00007fee4ee55757 in ObjectSynchronizer::waitUninterruptibly(Handle, long, Thread*) () from /path/to/jdk-11.0.8+10/lib/server/libjvm.so
#4 0x00007fee4e92f7f5 in InstanceKlass::initialize_impl(Thread*) () from /path/to/jdk-11.0.8+10/lib/server/libjvm.so
#5 0x00007fee4e94ea20 in InterpreterRuntime::_new(JavaThread*, ConstantPool*, int) () from /path/to/jdk-11.0.8+10/lib/server/libjvm.so
#6 0x00007fee0892006a in ?? ()
#7 0x00007fee08920025 in ?? ()
#8 0x00007fec579b6038 in ?? ()
#9 0x00007fee2f219d66 in ?? ()
#10 0x00007fec579b60a0 in ?? ()
#11 0x00007fee2f266fb8 in ?? ()
#12 0x0000000000000000 in ?? ()
- Example 2 pstack output:
Thread 407 (Thread 0x7fec6de9e700 (LWP 21097)):
#0 0x00007fee4fd52a35 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1 0x00007fee4ecf1ee3 in os::PlatformEvent::park() () from /path/to/jdk-11.0.8+10/lib/server/libjvm.so
#2 0x00007fee4ecbc895 in ObjectMonitor::wait(long, bool, Thread*) () from /pathto/jdk-11.0.8+10/lib/server/libjvm.so
#3 0x00007fee4ee55757 in ObjectSynchronizer::waitUninterruptibly(Handle, long, Thread*) () from /path/to/jdk-11.0.8+10/lib/server/libjvm.so
#4 0x00007fee4e92f7f5 in InstanceKlass::initialize_impl(Thread*) () from /path/to/jdk-11.0.8+10/lib/server/libjvm.so
#5 0x00007fee4e94ea20 in InterpreterRuntime::_new(JavaThread*, ConstantPool*, int) () from /path/to/jdk-11.0.8+10/lib/server/libjvm.so
Environment
- Red Hat Enterprise Linux (RHEL)
- Red Hat build of OpenJDK
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.