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/[email protected] Owned by: <unknown>
Is this because the owner thread has existed?
Why doesn't the JVM release the lock?
Can there be other reasons?
Best How To :
This thread is parked and not blocked. Threads enter the parked state through the
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
For more detailed information take a look at Blocked thread information in the IBM knowledge center (which is the source for this answer).