Support Article

JVM deadlock or a hang in some threads



User reported that they have noticed a JVM deadlock on the threads and their PRPC instance was hung in Pega 7.1.8.

Error Messages

In the hung threads the lock was held by the below thread;
"WebContainer : 17" Id=175646 in WAITING on lock=java.util.concurrent.locks.ReentrantLock$NonfairSync@8a1113b (running in native)
BlockedCount : 67, BlockedTime : -1, WaitedCount : 277930, WaitedTime : -1
at sun.misc.Unsafe.park(Native Method)
    at java.util.concurrent.locks.LockSupport.park(
    at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(
    at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(
    at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(
    at java.util.concurrent.locks.ReentrantLock$NonfairSync.lock(
    at java.util.concurrent.locks.ReentrantLock.lock(
    at com.pega.pegarules.priv.factory.AbstractContainerFactory.releaseObject(
    at com.pega.pegarules.priv.factory.AbstractContainerFactory.releaseObject(
    at com.pega.pegarules.priv.factory.StringBuilderFactory.release(

Steps to Reproduce

a) Create a data page, at node level, call an activity to load some data.
b) Log in to the instance with multiple operators simultaneously, you would see data page is being loaded for all such operators.

Root Cause

There was a race condition where one thread has finished loading the page and is about to do two things: 

1. Release the lock
2. Put the page in directory.

As soon as it release the lock, other thread grabs this lock and try to search the page in directory, it does not find any because the PUT operation has been completed yet by First Thread. So it tries to reload the same page again and succeeds.


Hotfix-24551 is provided which consider following two operations atomic before releasing the lock:

1. Loads data page.
2. Places the page into directory.


Published January 31, 2016 - Updated October 8, 2020

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.