[jboss-jira] [JBoss JIRA] Created: (JBAOP-569) Deadlock when two threads are removing a binding
Flavia Rainone (JIRA)
jira-events at lists.jboss.org
Thu May 1 10:07:18 EDT 2008
Deadlock when two threads are removing a binding
------------------------------------------------
Key: JBAOP-569
URL: http://jira.jboss.com/jira/browse/JBAOP-569
Project: JBoss AOP
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 2.0.0.CR8
Reporter: Flavia Rainone
Assigned To: Flavia Rainone
Fix For: 2.0.0.GA
There is a deadlock occurring during rebuildingchain tests. It happens when there are two threads trying to remove distinct bindings.
Here is the description of the deadlock scenario:
Thread 1:
- acquires the AdviceBinding.advisors lock during the call to AdviceBinding.clearAdvisors() (made by AspectManager.removeBinding method)
- acquires the advisor lock during the call to ClassAdvisor.removeAdviceBinding (made by AdviceBinding.clearAdvisors method)
- reacquires the advisor lock during the call to Advisor.removeAdviceBinding (made by ClassAdvisor.removeAdviceBinding method)
- acquires the lock of the manager.getBindings() collection during the call to ClassAdvisor.updateInterceptorChain (resultant of the advice being removed)
- waits on the lock of the AdviceBindings.advisors collection, during a call to AdviceBinding.addAdvisor (made by a resolveXXXPointcut method)
Thread2
-acquires the AdviceBinding.advisors clock during the call to AdviceBinding.clearAdvisors() (made by AspectManager.removeBinding method)
- waits on the advisor lock during the call ClassAdvisor.removeAdviceBinding (made by AdviceBinding.clearAdvisors method)
Notice that the advisor involved in both threads is the same. The binding that thread 2 tries to remove is the binding that Thread1 tries to manipulate in the last line of the Thread1 description above.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list