[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: MC deadlock

adrian@jboss.org do-not-reply at jboss.com
Tue Feb 12 05:37:04 EST 2008


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#4128671

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4128671



More information about the jboss-dev-forums mailing list