activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ron Koerner (JIRA)" <>
Subject [jira] [Created] (AMQ-3873) Occasional deadlock during startup
Date Fri, 01 Jun 2012 17:07:23 GMT
Ron Koerner created AMQ-3873:

             Summary: Occasional deadlock during startup
                 Key: AMQ-3873
             Project: ActiveMQ
          Issue Type: Bug
    Affects Versions: 5.6.0
         Environment: Suse Linux, CentOS Linux
Out-of-the-Box standalone broker with additional beans
            Reporter: Ron Koerner

During startup I occasionally get deadlocks. I never had those on earlier versions including
a 5.6-SNAPSHOT from January.

My activemq.xml contains a number of beans which each autowire the BrokerService and make
connections to brokerService.getVmConnectorURI().toString()+"?async=false"

To avoid beans to be started faster than the broker and create a second broker by trying to
connect, the broker is instantiated with start=false and a special bean listening for the
Spring ContextRefreshedEvent will start the broker and run each beans connection methods.

Therefore a number of VmConnections will be done serially but in a rapid succession.

This fails at different points, but always with the following thread lock analysis:

Found one Java-level deadlock:
"ActiveMQ Task-3":
  waiting for ownable synchronizer 0x9f288120, (a java.util.concurrent.locks.ReentrantLock$NonfairSync),
  which is held by "BrokerService[smcufs02] Task-1"
"BrokerService[smcufs02] Task-1":
  waiting to lock monitor 0x0807a650 (object 0x9f2880d8, a java.util.concurrent.atomic.AtomicBoolean),
  which is held by "ActiveMQ Task-3"

Java stack information for the threads listed above:
"ActiveMQ Task-3":
        at sun.misc.Unsafe.park(Native Method)
        - parking to wait for  <0x9f288120> (a java.util.concurrent.locks.ReentrantLock$NonfairSync)
        at java.util.concurrent.locks.LockSupport.park(
        at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(
        at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(
        at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(
        at java.util.concurrent.locks.ReentrantLock$NonfairSync.lock(
        at java.util.concurrent.locks.ReentrantLock.lock(
        at org.apache.activemq.transport.MutexTransport.oneway(
        at org.apache.activemq.transport.ResponseCorrelator.oneway(
        at org.apache.activemq.transport.ResponseCorrelator.onCommand(
        at org.apache.activemq.transport.MutexTransport.onCommand(
        at org.apache.activemq.transport.vm.VMTransport.doDispatch(
        at org.apache.activemq.transport.vm.VMTransport.start(
        - locked <0x9f2880d8> (a java.util.concurrent.atomic.AtomicBoolean)
        at org.apache.activemq.transport.TransportFilter.start(
        at org.apache.activemq.transport.TransportFilter.start(
        - locked <0x9f2e4f98> (a
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(
        at java.util.concurrent.ThreadPoolExecutor$
"BrokerService[smcufs02] Task-1":
        at org.apache.activemq.transport.vm.VMTransport.dispatch(
        - waiting to lock <0x9f2880d8> (a java.util.concurrent.atomic.AtomicBoolean)
        at org.apache.activemq.transport.vm.VMTransport.oneway(
        at org.apache.activemq.transport.MutexTransport.oneway(
        at org.apache.activemq.transport.ResponseCorrelator.oneway(
        at org.apache.activemq.thread.PooledTaskRunner.runTask(
        at org.apache.activemq.thread.PooledTaskRunner$
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(
        at java.util.concurrent.ThreadPoolExecutor$

Found 1 deadlock.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message