activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Danielius Jurna (JIRA)" <j...@apache.org>
Subject [jira] Updated: (AMQ-2054) Deadlock in org.apache.activemq.usage.Usage
Date Thu, 08 Jan 2009 08:23:01 GMT

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

Danielius Jurna updated AMQ-2054:
---------------------------------

    Patch Info: [Patch Available]

> Deadlock in org.apache.activemq.usage.Usage
> -------------------------------------------
>
>                 Key: AMQ-2054
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2054
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.2.0
>            Reporter: Danielius Jurna
>            Priority: Critical
>         Attachments: Usage.java.patch
>
>
> In highly concurrent environment, client deadlocks with this stack trace. Obiously, there
are too many synchronized statements in Usage class. Either you add statements on method declaration,
or use synchronized on mutex object. Now for example stop method is declared as synchronized
and also locks usageMutex and this causes deadlock.
> Found one Java-level deadlock:
> =============================
> "jmsConnector.dispatcher.486":
>   waiting to lock monitor 0x08528fb0 (object 0xa4b01390, a java.lang.Object),
>   which is held by "ActiveMQ Transport: tcp://localhost/127.0.0.1:61616"
> "ActiveMQ Transport: tcp://localhost/127.0.0.1:61616":
>   waiting to lock monitor 0x08528a38 (object 0xa4b01348, a org.apache.activemq.usage.MemoryUsage),
>   which is held by "jmsConnector.dispatcher.486"
> Java stack information for the threads listed above:
> ===================================================
> "jmsConnector.dispatcher.486":
>         at org.apache.activemq.usage.Usage.stop(Usage.java:306)
>         - waiting to lock <0xa4b01390> (a java.lang.Object)
>         - locked <0xa4b01348> (a org.apache.activemq.usage.MemoryUsage)
>         at org.apache.activemq.ActiveMQMessageProducer.dispose(ActiveMQMessageProducer.java:156)
>         at org.apache.activemq.ActiveMQSession.dispose(ActiveMQSession.java:589)
>         - locked <0xa4b091d8> (a org.apache.activemq.ActiveMQSession)
>         at org.apache.activemq.ActiveMQSession.close(ActiveMQSession.java:555)
>         at org.apache.activemq.pool.SessionPool.destroyObject(SessionPool.java:81)
>         at org.apache.commons.pool.impl.GenericObjectPool.addObjectToPool(GenericObjectPool.java:1128)
>         at org.apache.commons.pool.impl.GenericObjectPool.returnObject(GenericObjectPool.java:1076)
>         at org.apache.activemq.pool.SessionPool.returnSession(SessionPool.java:67)
>         at org.apache.activemq.pool.PooledSession.close(PooledSession.java:124)
>         at org.mule.providers.jms.JmsConnector.close(JmsConnector.java:1003)
>         at org.mule.providers.jms.JmsConnector.closeQuietly(JmsConnector.java:1017)
>         at org.mule.providers.jms.JmsMessageDispatcher.dispatchMessage(JmsMessageDispatcher.java:323)
>         at org.mule.providers.jms.JmsMessageDispatcher.doDispatch(JmsMessageDispatcher.java:64)
>         at org.mule.providers.AbstractMessageDispatcher$Worker.run(AbstractMessageDispatcher.java:561)
>         at org.mule.impl.work.WorkerContext.run(WorkerContext.java:310)
>         at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:987)
>         at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:528)
>         at java.lang.Thread.run(Thread.java:619)
> "ActiveMQ Transport: tcp://localhost/127.0.0.1:61616":
>         at org.apache.activemq.usage.Usage.getExecutor(Usage.java:404)
>         - waiting to lock <0xa4b01348> (a org.apache.activemq.usage.MemoryUsage)
>         at org.apache.activemq.usage.Usage.fireEvent(Usage.java:271)
>         at org.apache.activemq.usage.Usage.setPercentUsage(Usage.java:232)
>         - locked <0xa4b01390> (a java.lang.Object)
>         at org.apache.activemq.usage.MemoryUsage.decreaseUsage(MemoryUsage.java:146)
>         at org.apache.activemq.ActiveMQMessageProducer.onProducerAck(ActiveMQMessageProducer.java:289)
>         at org.apache.activemq.ActiveMQConnection$2.processProducerAck(ActiveMQConnection.java:1675)
>         at org.apache.activemq.command.ProducerAck.visit(ProducerAck.java:56)
>         at org.apache.activemq.ActiveMQConnection.onCommand(ActiveMQConnection.java:1647)
>         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.failover.FailoverTransport$3.onCommand(FailoverTransport.java:167)
>         at org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:143)
>         at org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:206)
>         - locked <0x752c53e8> (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:619)
> Found 1 deadlock.

-- 
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