I think I've found a problem related to this?
Although I haven't managed to reproduce the problem so I can't be sure
it is actually this issue.
The issue I see is that the unlock() was trying to do a ClassLoader.notifyAll()
(which requires the classloader lock) even when it hadn't released the ReentrantLock.
I've moved the notifyAll() - i.e. tell other threads the lock is now available
inside the check for ReentrantLock.getHoldCount() == 0
So now the attempt to synchronize on the classloader in unlock() will only happen
when it doesn't hold the reentrant lock.
I'm guessing it is the holding of the ReentrantLock versus synchronization
on the classloader that is causing the deadlock?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4128671#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...