[jboss-jira] [JBoss JIRA] Closed: (JBAOP-569) Deadlock when two threads are removing a binding
Flavia Rainone (JIRA)
jira-events at lists.jboss.org
Thu Aug 28 14:53:38 EDT 2008
[ https://jira.jboss.org/jira/browse/JBAOP-569?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Flavia Rainone closed JBAOP-569.
--------------------------------
Resolution: Done
After the changes (optmizations) that have been made to the updateChain methods of advisor, I can't reproduce the deadlock anymore.
Nevertheless, the deadlock is feasible to occur again, as the locks involved in the proccess are still being hold/released at the same points of the stack.
Regarding the beforeafter example, it is indeed resulting in deadlock and this is the next item of my work list.
> Deadlock when two threads are removing a binding
> ------------------------------------------------
>
> Key: JBAOP-569
> URL: https://jira.jboss.org/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
> Assignee: Flavia Rainone
> Fix For: 2.0.0.GA
>
> Attachments: NEW_DEADLOCK.txt
>
>
> 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: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list