activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Tully (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (AMQ-2252) deadlock with NIO transport and optimizeDispatch
Date Thu, 14 May 2009 15:52:50 GMT

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

Gary Tully resolved AMQ-2252.
-----------------------------

    Resolution: Fixed

r774829 with test case. Extraneous wakeup in remove which inverts the locking order

> deadlock with NIO transport and optimizeDispatch
> ------------------------------------------------
>
>                 Key: AMQ-2252
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2252
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.2.0
>            Reporter: Gary Tully
>            Assignee: Gary Tully
>             Fix For: 5.3.0
>
>
> With concurrent producers and consumers on a queue, it is possible to reproduce the following
deadlock:
> {code}
> Found one Java-level deadlock:
> =============================
> "NIO Transport Thread":
>   waiting to lock monitor 0x08c78cd4 (object 0x821986b8, a org.apache.activemq.broker.region.Queue$2),
>   which is held by "NIO Transport Thread"
> "NIO Transport Thread":
>   waiting to lock monitor 0x08c78d14 (object 0x82198170, a java.lang.Object),
>   which is held by "NIO Transport Thread"
> Java stack information for the threads listed above:
> ===================================================
> "NIO Transport Thread":
> 	at org.apache.activemq.broker.region.Queue.iterate(Queue.java:1024)
> 	- waiting to lock <0x821986b8> (a org.apache.activemq.broker.region.Queue$2)
> 	at org.apache.activemq.broker.region.Queue.wakeup(Queue.java:1240)
> 	at org.apache.activemq.broker.region.Queue.removeMessage(Queue.java:1159)
> 	at org.apache.activemq.broker.region.QueueSubscription.acknowledge(QueueSubscription.java:51)
> 	at org.apache.activemq.broker.region.PrefetchSubscription.acknowledge(PrefetchSubscription.java:255)
> 	- locked <0x82198170> (a java.lang.Object)
> 	at org.apache.activemq.broker.region.AbstractRegion.acknowledge(AbstractRegion.java:377)
> 	at org.apache.activemq.broker.region.RegionBroker.acknowledge(RegionBroker.java:463)
> 	at org.apache.activemq.broker.TransactionBroker.acknowledge(TransactionBroker.java:194)
> 	at org.apache.activemq.broker.BrokerFilter.acknowledge(BrokerFilter.java:74)
> 	at org.apache.activemq.broker.BrokerFilter.acknowledge(BrokerFilter.java:74)
> 	at org.apache.activemq.broker.MutableBrokerFilter.acknowledge(MutableBrokerFilter.java:85)
> 	at org.apache.activemq.broker.TransportConnection.processMessageAck(TransportConnection.java:461)
> 	at org.apache.activemq.command.MessageAck.visit(MessageAck.java:205)
> 	at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:308)
> 	at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:182)
> 	at org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:68)
> 	at org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:113)
> 	at org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:210)
> 	- locked <0x8219bfb8> (a org.apache.activemq.transport.InactivityMonitor$1)
> 	at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:84)
> 	at org.apache.activemq.transport.nio.NIOTransport.serviceRead(NIOTransport.java:128)
> 	at org.apache.activemq.transport.nio.NIOTransport.access$000(NIOTransport.java:44)
> 	at org.apache.activemq.transport.nio.NIOTransport$1.onSelect(NIOTransport.java:68)
> 	at org.apache.activemq.transport.nio.SelectorSelection.onSelect(SelectorSelection.java:62)
> 	at org.apache.activemq.transport.nio.SelectorWorker$1.run(SelectorWorker.java:98)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
> 	at java.lang.Thread.run(Thread.java:595)
> "NIO Transport Thread":
> 	at org.apache.activemq.broker.region.PrefetchSubscription.dispatchPending(PrefetchSubscription.java:585)
> 	- waiting to lock <0x82198170> (a java.lang.Object)
> 	- locked <0x82198168> (a java.lang.Object)
> 	at org.apache.activemq.broker.region.PrefetchSubscription.add(PrefetchSubscription.java:158)
> 	at org.apache.activemq.broker.region.Queue.doActualDispatch(Queue.java:1377)
> 	at org.apache.activemq.broker.region.Queue.doDispatch(Queue.java:1331)
> 	- locked <0x82198650> (a java.util.ArrayList)
> 	at org.apache.activemq.broker.region.Queue.pageInMessages(Queue.java:1420)
> 	at org.apache.activemq.broker.region.Queue.iterate(Queue.java:1103)
> 	- locked <0x821986b8> (a org.apache.activemq.broker.region.Queue$2)
> 	at org.apache.activemq.broker.region.Queue.wakeup(Queue.java:1240)
> 	at org.apache.activemq.broker.region.Queue.sendMessage(Queue.java:1235)
> 	at org.apache.activemq.broker.region.Queue.doMessageSend(Queue.java:537)
> 	at org.apache.activemq.broker.region.Queue.send(Queue.java:480)
> 	at org.apache.activemq.broker.region.AbstractRegion.send(AbstractRegion.java:354)
> 	at org.apache.activemq.broker.region.RegionBroker.send(RegionBroker.java:438)
> 	at org.apache.activemq.broker.TransactionBroker.send(TransactionBroker.java:224)
> 	at org.apache.activemq.broker.BrokerFilter.send(BrokerFilter.java:126)
> 	at org.apache.activemq.broker.CompositeDestinationBroker.send(CompositeDestinationBroker.java:95)
> 	at org.apache.activemq.broker.MutableBrokerFilter.send(MutableBrokerFilter.java:133)
> 	at org.apache.activemq.broker.TransportConnection.processMessage(TransportConnection.java:455)
> 	at org.apache.activemq.command.ActiveMQMessage.visit(ActiveMQMessage.java:639)
> 	at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:308)
> 	at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:182)
> 	at org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:68)
> 	at org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:113)
> 	at org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:210)
> 	- locked <0x8294ded0> (a org.apache.activemq.transport.InactivityMonitor$1)
> 	at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:84)
> 	at org.apache.activemq.transport.nio.NIOTransport.serviceRead(NIOTransport.java:128)
> 	at org.apache.activemq.transport.nio.NIOTransport.access$000(NIOTransport.java:44)
> 	at org.apache.activemq.transport.nio.NIOTransport$1.onSelect(NIOTransport.java:68)
> 	at org.apache.activemq.transport.nio.SelectorSelection.onSelect(SelectorSelection.java:62)
> 	at org.apache.activemq.transport.nio.SelectorWorker$1.run(SelectorWorker.java:98)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
> 	at java.lang.Thread.run(Thread.java:595)
> {code}

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


Mime
View raw message