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-2121) Occasional Deadlock in DuplexNetworkMBeanTest - contention on brokerService with NetworkConnector
Date Tue, 17 Feb 2009 12:02:59 GMT

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

Gary Tully resolved AMQ-2121.
-----------------------------

    Resolution: Fixed

brokerService was an inappropriate shared lock, using the VMUrl is less contentious, no real
need for a seperate lock object.

rev: 744975

> Occasional Deadlock in DuplexNetworkMBeanTest - contention on brokerService with NetworkConnector

> --------------------------------------------------------------------------------------------------
>
>                 Key: AMQ-2121
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2121
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.2.0
>         Environment: org.apache.activemq.network.DuplexNetworkMBeanTest
>            Reporter: Gary Tully
>            Assignee: Gary Tully
>             Fix For: 5.3.0
>
>
> {code}
> Full thread dump Java HotSpot(TM) Client VM (1.5.0_16-133 mixed mode, sharing):
> "InactivityMonitor Async Task: java.util.concurrent.ThreadPoolExecutor$Worker@7cf915"
daemon prio=5 tid=0x01027240 nid=0x97a400 waiting on condition [0xb169e000..0xb169ed90]
> 	at sun.misc.Unsafe.park(Native Method)
> 	at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:146)
> 	at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireNanos(AbstractQueuedSynchronizer.java:807)
> 	at java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireNanos(AbstractQueuedSynchronizer.java:1122)
> 	at java.util.concurrent.SynchronousQueue$Node.waitForPut(SynchronousQueue.java:291)
> 	at java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:443)
> 	at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:475)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:674)
> 	at java.lang.Thread.run(Thread.java:613)
> "ActiveMQ Transport: tcp://localhost/127.0.0.1:61617" prio=5 tid=0x0102ea70 nid=0x97b200
waiting for monitor entry [0xb18a2000..0xb18a2d90]
> 	at org.apache.activemq.broker.region.AbstractRegion.lookup(AbstractRegion.java:391)
> 	- waiting to lock <0x0c0bb940> (a java.lang.Object)
> 	at org.apache.activemq.broker.region.AbstractRegion.addConsumer(AbstractRegion.java:223)
> 	at org.apache.activemq.broker.region.TopicRegion.addConsumer(TopicRegion.java:108)
> 	at org.apache.activemq.broker.region.RegionBroker.addConsumer(RegionBroker.java:376)
> 	at org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:86)
> 	at org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:86)
> 	at org.apache.activemq.advisory.AdvisoryBroker.addConsumer(AdvisoryBroker.java:85)
> 	at org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:86)
> 	at org.apache.activemq.broker.MutableBrokerFilter.addConsumer(MutableBrokerFilter.java:93)
> 	at org.apache.activemq.broker.TransportConnection.processAddConsumer(TransportConnection.java:546)
> 	at org.apache.activemq.command.ConsumerInfo.visit(ConsumerInfo.java:349)
> 	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.ResponseCorrelator.onCommand(ResponseCorrelator.java:104)
> 	at org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:68)
> 	at org.apache.activemq.transport.vm.VMTransport.oneway(VMTransport.java:112)
> 	at org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:40)
> 	- locked <0x0c0daa80> (a java.lang.Object)
> 	at org.apache.activemq.transport.ResponseCorrelator.oneway(ResponseCorrelator.java:60)
> 	at org.apache.activemq.network.DemandForwardingBridgeSupport.addSubscription(DemandForwardingBridgeSupport.java:607)
> 	at org.apache.activemq.network.DemandForwardingBridgeSupport.addConsumerInfo(DemandForwardingBridgeSupport.java:935)
> 	at org.apache.activemq.network.DemandForwardingBridgeSupport.serviceRemoteConsumerAdvisory(DemandForwardingBridgeSupport.java:544)
> 	- locked <0x0c0761a0> (a org.apache.activemq.xbean.XBeanBrokerService)
> 	at org.apache.activemq.network.DemandForwardingBridgeSupport.serviceRemoteCommand(DemandForwardingBridgeSupport.java:442)
> 	at org.apache.activemq.network.DemandForwardingBridgeSupport$2.onCommand(DemandForwardingBridgeSupport.java:166)
> 	at org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:104)
> 	at org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:68)
> 	at org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:143)
> 	at org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:210)
> 	- locked <0x0c0ceb80> (a org.apache.activemq.transport.InactivityMonitor$1)
> 	at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:84)
> 	at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:203)
> 	at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:185)
> 	at java.lang.Thread.run(Thread.java:613)
> "ActiveMQ Data File Writer" daemon prio=10 tid=0x0102d9f0 nid=0x989a00 in Object.wait()
[0xb0f90000..0xb0f90d90]
> 	at java.lang.Object.wait(Native Method)
> 	- waiting on <0x0c0b79f8> (a org.apache.activemq.kaha.impl.async.DataFileAppender$1)
> 	at java.lang.Object.wait(Object.java:474)
> 	at org.apache.activemq.kaha.impl.async.NIODataFileAppender.processQueue(NIODataFileAppender.java:79)
> 	- locked <0x0c0b79f8> (a org.apache.activemq.kaha.impl.async.DataFileAppender$1)
> 	at org.apache.activemq.kaha.impl.async.DataFileAppender$2.run(DataFileAppender.java:227)
> ...
> "VMTransport" daemon prio=5 tid=0x01028030 nid=0x9b8000 waiting for monitor entry [0xb171f000..0xb171fd90]
> 	at org.apache.activemq.broker.BrokerService.getTempDataStore(BrokerService.java:1187)
> 	- waiting to lock <0x0c0761a0> (a org.apache.activemq.xbean.XBeanBrokerService)
> 	at org.apache.activemq.broker.region.RegionBroker.getTempDataStore(RegionBroker.java:646)
> 	at org.apache.activemq.broker.region.cursors.FilePendingMessageCursor.<init>(FilePendingMessageCursor.java:72)
> 	at org.apache.activemq.broker.region.cursors.StoreDurableSubscriberCursor.<init>(StoreDurableSubscriberCursor.java:66)
> 	at org.apache.activemq.broker.region.DurableTopicSubscription.<init>(DurableTopicSubscription.java:55)
> 	at org.apache.activemq.broker.region.TopicRegion.createSubscription(TopicRegion.java:241)
> 	at org.apache.activemq.broker.jmx.ManagedTopicRegion.createSubscription(ManagedTopicRegion.java:44)
> 	at org.apache.activemq.broker.region.TopicRegion.addSubscriptionsForDestination(TopicRegion.java:175)
> 	at org.apache.activemq.broker.region.AbstractRegion.addDestination(AbstractRegion.java:129)
> 	- locked <0x0c0bb940> (a java.lang.Object)
> 	at org.apache.activemq.broker.region.RegionBroker.addDestination(RegionBroker.java:264)
> 	at org.apache.activemq.broker.BrokerFilter.addDestination(BrokerFilter.java:142)
> 	at org.apache.activemq.broker.BrokerFilter.addDestination(BrokerFilter.java:142)
> 	at org.apache.activemq.advisory.AdvisoryBroker.addDestination(AdvisoryBroker.java:149)
> 	at org.apache.activemq.broker.BrokerFilter.addDestination(BrokerFilter.java:142)
> 	at org.apache.activemq.broker.MutableBrokerFilter.addDestination(MutableBrokerFilter.java:149)
> 	at org.apache.activemq.broker.region.RegionBroker.addProducer(RegionBroker.java:331)
> 	at org.apache.activemq.broker.BrokerFilter.addProducer(BrokerFilter.java:90)
> 	at org.apache.activemq.broker.BrokerFilter.addProducer(BrokerFilter.java:90)
> 	at org.apache.activemq.advisory.AdvisoryBroker.addProducer(AdvisoryBroker.java:138)
> 	at org.apache.activemq.broker.CompositeDestinationBroker.addProducer(CompositeDestinationBroker.java:56)
> 	at org.apache.activemq.broker.MutableBrokerFilter.addProducer(MutableBrokerFilter.java:97)
> 	at org.apache.activemq.broker.TransportConnection.processAddProducer(TransportConnection.java:505)
> 	at org.apache.activemq.command.ProducerInfo.visit(ProducerInfo.java:105)
> 	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.ResponseCorrelator.onCommand(ResponseCorrelator.java:104)
> 	at org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:68)
> 	at org.apache.activemq.transport.vm.VMTransport.iterate(VMTransport.java:204)
> 	at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:122)
> 	at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:43)
> 	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:613)
> "Reference Handler" daemon prio=10 tid=0x010075f0 nid=0x813e00 in Object.wait() [0xb0984000..0xb0984d90]
> 	at java.lang.Object.wait(Native Method)
> 	- waiting on <0x0bcfc660> (a java.lang.ref.Reference$Lock)
> 	at java.lang.Object.wait(Object.java:474)
> 	at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
> 	- locked <0x0bcfc660> (a java.lang.ref.Reference$Lock)
> "main" prio=5 tid=0x010014b0 nid=0xb0801000 waiting on condition [0xb07fe000..0xb0800148]
> 	at sun.misc.Unsafe.park(Native Method)
> 	at java.util.concurrent.locks.LockSupport.park(LockSupport.java:118)
> 	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1841)
> 	at java.util.concurrent.ArrayBlockingQueue.take(ArrayBlockingQueue.java:341)
> 	at org.apache.activemq.transport.FutureResponse.getResult(FutureResponse.java:40)
> 	at org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrelator.java:80)
> 	at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1244)
> 	at org.apache.activemq.ActiveMQSession.send(ActiveMQSession.java:1691)
> 	- locked <0x0c0e0c20> (a java.lang.Object)
> 	at org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:231)
> 	at org.apache.activemq.ActiveMQMessageProducerSupport.send(ActiveMQMessageProducerSupport.java:241)
> 	at org.apache.activemq.network.SimpleNetworkTest.testFiltering(SimpleNetworkTest.java:102)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:585)
> 	at junit.framework.TestCase.runTest(TestCase.java:154)
> 	at junit.framework.TestCase.runBare(TestCase.java:127)
> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.framework.TestResult.run(TestResult.java:109)
> 	at junit.framework.TestCase.run(TestCase.java:118)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
> 	at junit.framework.TestSuite.run(TestSuite.java:203)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:585)
> 	at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:210)
> 	at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:135)
> 	at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:160)
> 	at org.apache.maven.surefire.Surefire.run(Surefire.java:81)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:585)
> 	at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:182)
> 	at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:743)
> "VM Thread" prio=9 tid=0x01006d40 nid=0x813000 runnable 
> "VM Periodic Task Thread" prio=9 tid=0x01009b90 nid=0x805800 waiting on condition 
> "Exception Catcher Thread" prio=10 tid=0x01001700 nid=0x80ac00 runnable 
> Found one Java-level deadlock:
> =============================
> "ActiveMQ Transport: tcp://localhost/127.0.0.1:61617":
>   waiting to lock monitor 0x00814e44 (object 0x0c0bb940, a java.lang.Object),
>   which is held by "VMTransport"
> "VMTransport":
>   waiting to lock monitor 0x00814e68 (object 0x0c0761a0, a org.apache.activemq.xbean.XBeanBrokerService),
>   which is held by "ActiveMQ Transport: tcp://localhost/127.0.0.1:61617"
> Java stack information for the threads listed above:
> ===================================================
> "ActiveMQ Transport: tcp://localhost/127.0.0.1:61617":
> 	at org.apache.activemq.broker.region.AbstractRegion.lookup(AbstractRegion.java:391)
> 	- waiting to lock <0x0c0bb940> (a java.lang.Object)
> 	at org.apache.activemq.broker.region.AbstractRegion.addConsumer(AbstractRegion.java:223)
> 	at org.apache.activemq.broker.region.TopicRegion.addConsumer(TopicRegion.java:108)
> 	at org.apache.activemq.broker.region.RegionBroker.addConsumer(RegionBroker.java:376)
> 	at org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:86)
> 	at org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:86)
> 	at org.apache.activemq.advisory.AdvisoryBroker.addConsumer(AdvisoryBroker.java:85)
> 	at org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:86)
> 	at org.apache.activemq.broker.MutableBrokerFilter.addConsumer(MutableBrokerFilter.java:93)
> 	at org.apache.activemq.broker.TransportConnection.processAddConsumer(TransportConnection.java:546)
> 	at org.apache.activemq.command.ConsumerInfo.visit(ConsumerInfo.java:349)
> 	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.ResponseCorrelator.onCommand(ResponseCorrelator.java:104)
> 	at org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:68)
> 	at org.apache.activemq.transport.vm.VMTransport.oneway(VMTransport.java:112)
> 	at org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:40)
> 	- locked <0x0c0daa80> (a java.lang.Object)
> 	at org.apache.activemq.transport.ResponseCorrelator.oneway(ResponseCorrelator.java:60)
> 	at org.apache.activemq.network.DemandForwardingBridgeSupport.addSubscription(DemandForwardingBridgeSupport.java:607)
> 	at org.apache.activemq.network.DemandForwardingBridgeSupport.addConsumerInfo(DemandForwardingBridgeSupport.java:935)
> 	at org.apache.activemq.network.DemandForwardingBridgeSupport.serviceRemoteConsumerAdvisory(DemandForwardingBridgeSupport.java:544)
> 	- locked <0x0c0761a0> (a org.apache.activemq.xbean.XBeanBrokerService)
> 	at org.apache.activemq.network.DemandForwardingBridgeSupport.serviceRemoteCommand(DemandForwardingBridgeSupport.java:442)
> 	at org.apache.activemq.network.DemandForwardingBridgeSupport$2.onCommand(DemandForwardingBridgeSupport.java:166)
> 	at org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:104)
> 	at org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:68)
> 	at org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:143)
> 	at org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:210)
> 	- locked <0x0c0ceb80> (a org.apache.activemq.transport.InactivityMonitor$1)
> 	at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:84)
> 	at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:203)
> 	at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:185)
> 	at java.lang.Thread.run(Thread.java:613)
> "VMTransport":
> 	at org.apache.activemq.broker.BrokerService.getTempDataStore(BrokerService.java:1187)
> 	- waiting to lock <0x0c0761a0> (a org.apache.activemq.xbean.XBeanBrokerService)
> 	at org.apache.activemq.broker.region.RegionBroker.getTempDataStore(RegionBroker.java:646)
> 	at org.apache.activemq.broker.region.cursors.FilePendingMessageCursor.<init>(FilePendingMessageCursor.java:72)
> 	at org.apache.activemq.broker.region.cursors.StoreDurableSubscriberCursor.<init>(StoreDurableSubscriberCursor.java:66)
> 	at org.apache.activemq.broker.region.DurableTopicSubscription.<init>(DurableTopicSubscription.java:55)
> 	at org.apache.activemq.broker.region.TopicRegion.createSubscription(TopicRegion.java:241)
> 	at org.apache.activemq.broker.jmx.ManagedTopicRegion.createSubscription(ManagedTopicRegion.java:44)
> 	at org.apache.activemq.broker.region.TopicRegion.addSubscriptionsForDestination(TopicRegion.java:175)
> 	at org.apache.activemq.broker.region.AbstractRegion.addDestination(AbstractRegion.java:129)
> 	- locked <0x0c0bb940> (a java.lang.Object)
> 	at org.apache.activemq.broker.region.RegionBroker.addDestination(RegionBroker.java:264)
> 	at org.apache.activemq.broker.BrokerFilter.addDestination(BrokerFilter.java:142)
> 	at org.apache.activemq.broker.BrokerFilter.addDestination(BrokerFilter.java:142)
> 	at org.apache.activemq.advisory.AdvisoryBroker.addDestination(AdvisoryBroker.java:149)
> 	at org.apache.activemq.broker.BrokerFilter.addDestination(BrokerFilter.java:142)
> 	at org.apache.activemq.broker.MutableBrokerFilter.addDestination(MutableBrokerFilter.java:149)
> 	at org.apache.activemq.broker.region.RegionBroker.addProducer(RegionBroker.java:331)
> 	at org.apache.activemq.broker.BrokerFilter.addProducer(BrokerFilter.java:90)
> 	at org.apache.activemq.broker.BrokerFilter.addProducer(BrokerFilter.java:90)
> 	at org.apache.activemq.advisory.AdvisoryBroker.addProducer(AdvisoryBroker.java:138)
> 	at org.apache.activemq.broker.CompositeDestinationBroker.addProducer(CompositeDestinationBroker.java:56)
> 	at org.apache.activemq.broker.MutableBrokerFilter.addProducer(MutableBrokerFilter.java:97)
> 	at org.apache.activemq.broker.TransportConnection.processAddProducer(TransportConnection.java:505)
> 	at org.apache.activemq.command.ProducerInfo.visit(ProducerInfo.java:105)
> 	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.ResponseCorrelator.onCommand(ResponseCorrelator.java:104)
> 	at org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:68)
> 	at org.apache.activemq.transport.vm.VMTransport.iterate(VMTransport.java:204)
> 	at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:122)
> 	at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:43)
> 	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:613)
> Found 1 deadlock.
> {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