[ 
https://issues.apache.org/activemq/browse/AMQ-2107?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Colin MacNaughton updated AMQ-2107:
-----------------------------------

    Attachment: patch.txt

Patch file for fix. 

> activemq-flow's Fixes and Refactoring in org.apache.activemq.dispatchPackage
> ----------------------------------------------------------------------------
>
>                 Key: AMQ-2107
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2107
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: incubation
>         Environment: N/A
>            Reporter: Colin MacNaughton
>             Fix For: incubation
>
>         Attachments: patch.txt
>
>
> There is deadlock in PriorityDispatcher.run when processing updates from 
> foreign threads, it holds on to foreignQueue. If there are multiple dispatch 
> threads this can lead to the following deadlock:
> Thread [BrokerDispatcher-1] (Suspended)  
>   owns: LinkedNodeList<T>  (id=102)  
>   waiting for: LinkedNodeList<T>  (id=125)  
>   PriorityDispatcher$PriorityDispatchContext.onForeignThreadUpdate() line: 
> 132  
>   ExecutionGraphLoadBalancer$ExecutionGraphNode.processForeignUpdates() line: 
> 428  
>   PriorityDispatcher$UpdateEvent.execute() line: 79  
>   PriorityDispatcher.run() line: 279  
>   Thread.run() line: 613  
> Thread [BrokerDispatcher-2] (Suspended)  
>   owns: LinkedNodeList<T>  (id=125)  
>   waiting for: LinkedNodeList<T>  (id=102)  
>   PriorityDispatcher$PriorityDispatchContext.onForeignThreadUpdate() line: 
> 132  
>   ExecutionGraphLoadBalancer$ExecutionGraphNode.processForeignUpdates() line: 
> 428  
>   PriorityDispatcher$UpdateEvent.execute() line: 79  
>   PriorityDispatcher.run() line: 279  
>   Thread.run() line: 613
> The attached patch also includes refactoring of the PriorityPooledDispatcher 
> to use a simplifed ExecutionLoadBalancer interface.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to