You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Timothy Bish (JIRA)" <ji...@apache.org> on 2014/08/11 15:49:12 UTC

[jira] [Commented] (AMQNET-487) Deadlock in Failover Transport when reconnecting

    [ https://issues.apache.org/jira/browse/AMQNET-487?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14092770#comment-14092770 ] 

Timothy Bish commented on AMQNET-487:
-------------------------------------

You need to crate a patch that ignore white space changes or something the current one is impossible to review to see what you changes as it covers the entire file basically.  

> Deadlock in Failover Transport when reconnecting
> ------------------------------------------------
>
>                 Key: AMQNET-487
>                 URL: https://issues.apache.org/jira/browse/AMQNET-487
>             Project: ActiveMQ .Net
>          Issue Type: Bug
>          Components: ActiveMQ
>    Affects Versions: 1.5.2, 1.6.2, 1.6.4
>         Environment: ActiveMQ 5.5.1 on Windows Server 2008 failover with networked brokers.
> Apache.NMS.ActiveMQ 1.6.2 running on .net 4.5/Windows 7
>            Reporter: Laurence Pike
>            Assignee: Jim Gomes
>            Priority: Critical
>         Attachments: FixForPossibleDeadlockOnReconnectAMQNET-487.patch
>
>
> Lock ordering issue with reconnectMutex and ((ICollection)connectionState.RecoveringPullConsumers).SyncRoot. Results in complete deadlock of NMS library.
> The two thread stacks do correctly take the reconnectMutex first but then in FailoverTransport.Oneway the reconnectMutex is Waited.
> The two stacks are:
> ========================================================================
> ntdll.dll!ZwWaitForMultipleObjects()	 
> KERNELBASE.dll!WaitForMultipleObjectsEx()	 
> kernel32.dll!WaitForMultipleObjectsExImplementation()	 
> [Managed to Native Transition]	 
> mscorlib.dll!System.Threading.Monitor.Wait(object obj, int millisecondsTimeout)	 
> Apache.NMS.ActiveMQ.dll!Apache.NMS.ActiveMQ.Transport.Failover.FailoverTransport.Oneway(Apache.NMS.ActiveMQ.Commands.Command command)	 
> Apache.NMS.ActiveMQ.dll!Apache.NMS.ActiveMQ.State.ConnectionStateTracker.ConnectionInterruptProcessingComplete(Apache.NMS.ActiveMQ.Transport.ITransport transport, Apache.NMS.ActiveMQ.Commands.ConnectionId connectionId)	 
> Apache.NMS.ActiveMQ.dll!Apache.NMS.ActiveMQ.Transport.Failover.FailoverTransport.ConnectionInterruptProcessingComplete(Apache.NMS.ActiveMQ.Commands.ConnectionId connectionId)	 
> Apache.NMS.ActiveMQ.dll!Apache.NMS.ActiveMQ.Connection.SignalInterruptionProcessingComplete()	 
> Apache.NMS.ActiveMQ.dll!Apache.NMS.ActiveMQ.MessageConsumer.ClearMessagesInProgress()	 
> Apache.NMS.ActiveMQ.dll!Apache.NMS.ActiveMQ.Threads.TimerEx.TimerImpl.Run()	 
> mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)	 
> mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)	 
> mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state)	 
> mscorlib.dll!System.Threading.ThreadHelper.ThreadStart()	 
> [Native to Managed Transition]	 
> kernel32.dll!BaseThreadInitThunk()	 
> ntdll.dll!RtlUserThreadStart()	
> ========================================================================
> ntdll.dll!ZwWaitForMultipleObjects()	 
> KERNELBASE.dll!WaitForMultipleObjectsEx()	 
> kernel32.dll!WaitForMultipleObjectsExImplementation()	 
> [Managed to Native Transition]	 
> Apache.NMS.ActiveMQ.dll!Apache.NMS.ActiveMQ.State.ConnectionStateTracker.DoRestoreConsumers(Apache.NMS.ActiveMQ.Transport.ITransport transport, Apache.NMS.ActiveMQ.State.SessionState sessionState)	 
> Apache.NMS.ActiveMQ.dll!Apache.NMS.ActiveMQ.State.ConnectionStateTracker.DoRestoreSessions(Apache.NMS.ActiveMQ.Transport.ITransport transport, Apache.NMS.ActiveMQ.State.ConnectionState connectionState)	 
> Apache.NMS.ActiveMQ.dll!Apache.NMS.ActiveMQ.State.ConnectionStateTracker.DoRestore(Apache.NMS.ActiveMQ.Transport.ITransport transport)	 
> Apache.NMS.ActiveMQ.dll!Apache.NMS.ActiveMQ.Transport.Failover.FailoverTransport.RestoreTransport(Apache.NMS.ActiveMQ.Transport.ITransport t)	 
> Apache.NMS.ActiveMQ.dll!Apache.NMS.ActiveMQ.Transport.Failover.FailoverTransport.DoConnect()	 
> Apache.NMS.ActiveMQ.dll!Apache.NMS.ActiveMQ.Transport.Failover.FailoverTransport.FailoverTask.Iterate()	 
> Apache.NMS.ActiveMQ.dll!Apache.NMS.ActiveMQ.Threads.DedicatedTaskRunner.Run()	 
> mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)	 
> mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)	 
> mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state)	 
> mscorlib.dll!System.Threading.ThreadHelper.ThreadStart()	 
> [Native to Managed Transition]	 
> kernel32.dll!BaseThreadInitThunk()	 
> ntdll.dll!RtlUserThreadStart()	 



--
This message was sent by Atlassian JIRA
(v6.2#6252)