activemq-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ARTEMIS-456) Potential dead lock in ReplicationManager
Date Wed, 23 Mar 2016 15:53:25 GMT

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

ASF subversion and git services commented on ARTEMIS-456:
---------------------------------------------------------

Commit afdb78dd5c8aae5d39e53f4b6390708f3602761f in activemq-artemis's branch refs/heads/master
from [~martyntaylor]
[ https://git-wip-us.apache.org/repos/asf?p=activemq-artemis.git;h=afdb78d ]

ARTEMIS-456 Synchronize sendReplicatePacket method

There is a potential deadlock scenario if 2 threads try
sendReplicatePacket.  Thread 1 registers Netty callback which will
invoke readyForWrites() method, which locks the callback list and waits
on the replicationLock.  Thread 2 enters sendReplicatePacket and gets
the replicationLock and is blocked on the callback list lock.  This fix
ensures the sendReplicatePacket blocks on the ReplicationManager meaning
no interleaving of the Netty callback thread and the wait on lock can
happen.


> Potential dead lock in ReplicationManager
> -----------------------------------------
>
>                 Key: ARTEMIS-456
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-456
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>            Reporter: Martyn Taylor
>            Priority: Critical
>
> There is a potential deadlock in the replication manager.  This can be caused when 2
threads try to get locks on the NettyConnection readyListener queue and the replicationLock
in opposite order.
> This happens when sendReplicatePacket() and Netty readyForWrite() callback is made.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message