javajvmlockingibm-jdk

Owner of lock unknown in IBM JVM version 7


I have a situation where lots of threads are blocked on some ReentrantReadWriteLock but for some reason the owner is not known.

3XMTHREADBLOCK     Parked on:
java/util/concurrent/locks/ReentrantReadWriteLock$NonfairSync@0xC3C0E5E8 Owned by: <unknown>

Is this because the owner thread has existed?
Why doesn't the JVM release the lock?
Can there be other reasons?


Solution

  • This thread is parked and not blocked. Threads enter the parked state through the java.util.concurrent API.
    Parked threads are listed as parked on the blocker object that was passed to the underlying java.util.concurrent.locks.LockSupport.park() method, if such an object was supplied. If a blocker object was not supplied, threads are listed as Parked on: <unknown>.
    If the object that was passed to the park() method extends the java.util.concurrent.locks.AbstractOwnableSynchronizer class, and uses the methods of that class to keep track of the owning thread, then information about the owning thread is shown. If the object does not use the AbstractOwnableSynchronizer class, the owning thread is listed as <unknown>.
    For more detailed information take a look at Blocked thread information in the IBM knowledge center (which is the source for this answer).