Process Hang with Threads Blocked on Berkeley DB Java Edition Lock and Running "jstack -F" Clears the Hang
Last updated on JANUARY 14, 2018
Applies to:Berkeley DB Java Edition - Version 5.0.97 and later
While running an application that uses Berkeley DB Java Edition (JE) as its storage engine on a Linux platform, the application gets hanged and none of the worker threads makes progress.
Examining the full threads dumps shows that the threads are stuck in TIMED_WAITING or BLOCKED status waiting on a JE lock (e.g. java.util.concurrent.locks.ReentrantLock$NonfairSync). If you take a recording using Java Fligh Recorder (JFR) in Java Mission Control (JMC) the JFR recording will show extremely high contention on the respective JE lock.
The only way to unstuck the process is to run jstack -F, jhat, strace, gdb.These will attach and then detach from the process and upon detach the process will get unstuck and make progress
Here is a thread stack sample of how the threads might show up stuck:
Sign In with your My Oracle Support account
Don't have a My Oracle Support account? Click to get started
Million Knowledge Articles and hundreds of Community platforms