Deadlock during tests when using log4j to log to the stdout in multiple threads


(Jon Sabados) #1

Using gradle 1.0-rc-3 Encountered this in a unit test which fires up an embedded active MQ broker, looks like something do do with gradle consuming stdout is preventing the log4j call from the blocking thread from completing while log4j has a lock on the category that the blocked thread is trying to log to.

Able to work around by limiting log4j to FATAL during tests to basically silence it, but it doesn’t seem ideal that a log operation gets hung up.

Thread dump: 2012-05-25 13:06:49 Full thread dump Java HotSpot™ Client VM (17.1-b03 mixed mode):

“ActiveMQConnection[ID:cbdenbldd1-44881-1337971850846-4:377] Scheduler” daemon prio=10 tid=0x099fc400 nid=0x4ba3 in Object.wait() [0x67419000]

java.lang.Thread.State: WAITING (on object monitor)

at java.lang.Object.wait(Native Method)

at java.lang.Object.wait(Object.java:485)

at java.util.TimerThread.mainLoop(Timer.java:483)

  • locked <0x9f8fd7f0> (a java.util.TaskQueue)

at java.util.TimerThread.run(Timer.java:462)

“ActiveMQ Task-37” daemon prio=10 tid=0x0b4ffc00 nid=0x4ba2 waiting for monitor entry [0x67284000]

java.lang.Thread.State: BLOCKED (on object monitor)

at org.apache.log4j.Category.callAppenders(Category.java:204)

  • waiting to lock <0x8d9772f8> (a org.apache.log4j.spi.RootLogger)

at org.apache.log4j.Category.forcedLog(Category.java:391)

at org.apache.log4j.Category.log(Category.java:856)

at org.slf4j.impl.Log4jLoggerAdapter.debug(Log4jLoggerAdapter.java:204)

at org.apache.activemq.transport.failover.FailoverTransport.getConnectList(FailoverTransport.java:683)

at org.apache.activemq.transport.failover.FailoverTransport.doReconnect(FailoverTransport.java:801)

  • locked <0x9f8f7590> (a java.lang.Object)

at org.apache.activemq.transport.failover.FailoverTransport$2.iterate(FailoverTransport.java:136)

  • locked <0x9f8f7598> (a java.lang.Object)

at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:127)

at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:48)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

at java.lang.Thread.run(Thread.java:662)

“ActiveMQConnection[ID:cbdenbldd1-44881-1337971850846-4:376] Scheduler” daemon prio=10 tid=0x0b0c1c00 nid=0x4ba1 in Object.wait() [0x68622000]

java.lang.Thread.State: WAITING (on object monitor)

at java.lang.Object.wait(Native Method)

at java.lang.Object.wait(Object.java:485)

at java.util.TimerThread.mainLoop(Timer.java:483)

  • locked <0x9f8f83e0> (a java.util.TaskQueue)

at java.util.TimerThread.run(Timer.java:462)

“ActiveMQ Connection Executor: unconnected” daemon prio=10 tid=0x0b501000 nid=0x4b9e waiting for monitor entry [0x68808000]

java.lang.Thread.State: BLOCKED (on object monitor)

at org.apache.log4j.Category.callAppenders(Category.java:204)

  • waiting to lock <0x8d9772f8> (a org.apache.log4j.spi.RootLogger)

at org.apache.log4j.Category.forcedLog(Category.java:391)

at org.apache.log4j.Category.log(Category.java:856)

at org.slf4j.impl.Log4jLoggerAdapter.debug(Log4jLoggerAdapter.java:204)

at org.apache.activemq.transport.failover.FailoverTransport.stop(FailoverTransport.java:321)

  • locked <0x9f821580> (a java.lang.Object)

at org.apache.activemq.transport.TransportFilter.stop(TransportFilter.java:65)

at org.apache.activemq.transport.TransportFilter.stop(TransportFilter.java:65)

at org.apache.activemq.transport.ResponseCorrelator.stop(ResponseCorrelator.java:132)

at org.apache.activemq.util.ServiceSupport.dispose(ServiceSupport.java:43)

at org.apache.activemq.ActiveMQConnection$5.run(ActiveMQConnection.java:1863)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

at java.lang.Thread.run(Thread.java:662)

“ActiveMQConnection[ID:cbdenbldd1-44881-1337971850846-4:375] Scheduler” daemon prio=10 tid=0x0b01e800 nid=0x4b95 in Object.wait() [0x6750c000]

java.lang.Thread.State: WAITING (on object monitor)

at java.lang.Object.wait(Native Method)

at java.lang.Object.wait(Object.java:485)

at java.util.TimerThread.mainLoop(Timer.java:483)

  • locked <0x9f8e5fd8> (a java.util.TaskQueue)

at java.util.TimerThread.run(Timer.java:462)

“ActiveMQ Task-36” daemon prio=10 tid=0x0b144800 nid=0x4b8a waiting for monitor entry [0x7ef67000]

java.lang.Thread.State: BLOCKED (on object monitor)

at org.apache.log4j.Category.callAppenders(Category.java:204)

  • waiting to lock <0x8d9772f8> (a org.apache.log4j.spi.RootLogger)

at org.apache.log4j.Category.forcedLog(Category.java:391)

at org.apache.log4j.Category.log(Category.java:856)

at org.slf4j.impl.Log4jLoggerAdapter.debug(Log4jLoggerAdapter.java:204)

at org.apache.activemq.transport.failover.FailoverTransport.getConnectList(FailoverTransport.java:683)

at org.apache.activemq.transport.failover.FailoverTransport.doReconnect(FailoverTransport.java:801)

  • locked <0x9f898ae0> (a java.lang.Object)

at org.apache.activemq.transport.failover.FailoverTransport$2.iterate(FailoverTransport.java:136)

  • locked <0x9f898ae8> (a java.lang.Object)

at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:127)

at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:48)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

at java.lang.Thread.run(Thread.java:662)

“ActiveMQ Connection Executor: unconnected” daemon prio=10 tid=0x0b4edc00 nid=0x4b74 waiting for monitor entry [0x67233000]

java.lang.Thread.State: BLOCKED (on object monitor)

at org.apache.log4j.Category.callAppenders(Category.java:204)

  • waiting to lock <0x8d9772f8> (a org.apache.log4j.spi.RootLogger)

at org.apache.log4j.Category.forcedLog(Category.java:391)

at org.apache.log4j.Category.log(Category.java:856)

at org.slf4j.impl.Log4jLoggerAdapter.debug(Log4jLoggerAdapter.java:204)

at org.apache.activemq.transport.failover.FailoverTransport.stop(FailoverTransport.java:321)

  • locked <0x9f82a840> (a java.lang.Object)

at org.apache.activemq.transport.TransportFilter.stop(TransportFilter.java:65)

at org.apache.activemq.transport.TransportFilter.stop(TransportFilter.java:65)

at org.apache.activemq.transport.ResponseCorrelator.stop(ResponseCorrelator.java:132)

at org.apache.activemq.util.ServiceSupport.dispose(ServiceSupport.java:43)

at org.apache.activemq.ActiveMQConnection$5.run(ActiveMQConnection.java:1863)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

at java.lang.Thread.run(Thread.java:662)

“Async Exception Handler” daemon prio=10 tid=0x0b02a000 nid=0x4b3e waiting for monitor entry [0x6704d000]

java.lang.Thread.State: BLOCKED (on object monitor)

at org.apache.log4j.Category.callAppenders(Category.java:204)

  • waiting to lock <0x8d9772f8> (a org.apache.log4j.spi.RootLogger)

at org.apache.log4j.Category.forcedLog(Category.java:391)

at org.apache.log4j.Category.log(Category.java:856)

at org.slf4j.impl.Log4jLoggerAdapter.debug(Log4jLoggerAdapter.java:281)

at org.apache.activemq.broker.TransportConnection.serviceTransportException(TransportConnection.java:230)

at org.apache.activemq.broker.TransportConnection.serviceException(TransportConnection.java:265)

at org.apache.activemq.broker.TransportConnection$2.run(TransportConnection.java:250)

“InactivityMonitor WriteCheck” daemon prio=10 tid=0x0b13d400 nid=0x4b37 waiting for monitor entry [0x66f09000]

java.lang.Thread.State: BLOCKED (on object monitor)

at org.apache.log4j.Category.callAppenders(Category.java:204)

  • waiting to lock <0x8d9772f8> (a org.apache.log4j.spi.RootLogger)

at org.apache.log4j.Category.forcedLog(Category.java:391)

at org.apache.log4j.Category.log(Category.java:856)

at org.slf4j.impl.Log4jLoggerAdapter.debug(Log4jLoggerAdapter.java:204)

at org.apache.activemq.transport.InactivityMonitor$2.run(InactivityMonitor.java:109)

at org.apache.activemq.thread.SchedulerTimerTask.run(SchedulerTimerTask.java:33)

at java.util.TimerThread.mainLoop(Timer.java:512)

at java.util.TimerThread.run(Timer.java:462)

“InactivityMonitor ReadCheck” daemon prio=10 tid=0x0b163800 nid=0x4b36 waiting for monitor entry [0x66f5a000]

java.lang.Thread.State: BLOCKED (on object monitor)

at org.apache.log4j.Category.callAppenders(Category.java:204)

  • waiting to lock <0x8d9772f8> (a org.apache.log4j.spi.RootLogger)

at org.apache.log4j.Category.forcedLog(Category.java:391)

at org.apache.log4j.Category.log(Category.java:856)

at org.slf4j.impl.Log4jLoggerAdapter.debug(Log4jLoggerAdapter.java:204)

at org.apache.activemq.transport.InactivityMonitor$1.run(InactivityMonitor.java:82)

at org.apache.activemq.thread.SchedulerTimerTask.run(SchedulerTimerTask.java:33)

at java.util.TimerThread.mainLoop(Timer.java:512)

at java.util.TimerThread.run(Timer.java:462)

“ActiveMQ Connection Executor: unconnected” daemon prio=10 tid=0x0b4ee400 nid=0x4b33 waiting on condition [0x66ffc000]

java.lang.Thread.State: WAITING (parking)

at sun.misc.Unsafe.park(Native Method)

  • parking to wait for <0x9f81d7f0> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)

at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)

at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1987)

at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:399)

at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)

at java.lang.Thread.run(Thread.java:662)

“ActiveMQ Task-34” daemon prio=10 tid=0x0a755400 nid=0x4b31 waiting for monitor entry [0x7ef16000]

java.lang.Thread.State: BLOCKED (on object monitor)

at org.apache.log4j.Category.callAppenders(Category.java:204)

  • waiting to lock <0x8d9772f8> (a org.apache.log4j.spi.RootLogger)

at org.apache.log4j.Category.forcedLog(Category.java:391)

at org.apache.log4j.Category.log(Category.java:856)

at org.slf4j.impl.Log4jLoggerAdapter.debug(Log4jLoggerAdapter.java:204)

at org.apache.activemq.broker.TransportConnection.doStop(TransportConnection.java:991)

at org.apache.activemq.broker.TransportConnection$3.run(TransportConnection.java:952)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

at java.lang.Thread.run(Thread.java:662)

“ActiveMQConnection[ID:cbdenbldd1-44881-1337971850846-4:374] Scheduler” daemon prio=10 tid=0x0b1e8000 nid=0x4ac7 in Object.wait() [0x67d46000]

java.lang.Thread.State: WAITING (on object monitor)

at java.lang.Object.wait(Native Method)

at java.lang.Object.wait(Object.java:485)

at java.util.TimerThread.mainLoop(Timer.java:483)

  • locked <0x9f899990> (a java.util.TaskQueue)

at java.util.TimerThread.run(Timer.java:462)

“ActiveMQ Task-33” daemon prio=10 tid=0x0a599400 nid=0x4ac6 waiting for monitor entry [0x6797a000]

java.lang.Thread.State: BLOCKED (on object monitor)

at org.apache.log4j.Category.callAppenders(Category.java:204)

  • waiting to lock <0x8d9772f8> (a org.apache.log4j.spi.RootLogger)

at org.apache.log4j.Category.forcedLog(Category.java:391)

at org.apache.log4j.Category.log(Category.java:856)

at org.slf4j.impl.Log4jLoggerAdapter.error(Log4jLoggerAdapter.java:493)

at org.apache.activemq.transport.failover.FailoverTransport.doReconnect(FailoverTransport.java:923)

  • locked <0x9f882bb8> (a java.lang.Object)

at org.apache.activemq.transport.failover.FailoverTransport$2.iterate(FailoverTransport.java:136)

  • locked <0x9f882bc0> (a java.lang.Object)

at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:127)

at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:48)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

at java.lang.Thread.run(Thread.java:662)

“ActiveMQ Connection Executor: unconnected” daemon prio=10 tid=0x0b0c1400 nid=0x4ac3 waiting on condition [0x68163000]

java.lang.Thread.State: WAITING (parking)

at sun.misc.Unsafe.park(Native Method)

  • parking to wait for <0x9f8203b0> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)

at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)

at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1987)

at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:399)

at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)

at java.lang.Thread.run(Thread.java:662)

“ActiveMQConnection[ID:cbdenbldd1-44881-1337971850846-4:373] Scheduler” daemon prio=10 tid=0x09f99800 nid=0x4ac1 in Object.wait() [0x68580000]

java.lang.Thread.State: WAITING (on object monitor)

at java.lang.Object.wait(Native Method)

at java.lang.Object.wait(Object.java:485)

at java.util.TimerThread.mainLoop(Timer.java:483)

  • locked <0x9f896608> (a java.util.TaskQueue)

at java.util.TimerThread.run(Timer.java:462)

“ActiveMQ Task-31” daemon prio=10 tid=0x0b13fc00 nid=0x4ac0 waiting for monitor entry [0x7f384000]

java.lang.Thread.State: BLOCKED (on object monitor)

at org.apache.log4j.Category.callAppenders(Category.java:204)

  • waiting to lock <0x8d9772f8> (a org.apache.log4j.spi.RootLogger)

at org.apache.log4j.Category.forcedLog(Category.java:391)

at org.apache.log4j.Category.log(Category.java:856)

at org.slf4j.impl.Log4jLoggerAdapter.error(Log4jLoggerAdapter.java:493)

at org.apache.activemq.transport.failover.FailoverTransport.doReconnect(FailoverTransport.java:923)

  • locked <0x9f892d68> (a java.lang.Object)

at org.apache.activemq.transport.failover.FailoverTransport$2.iterate(FailoverTransport.java:136)

  • locked <0x9f892d70> (a java.lang.Object)

at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:127)

at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:48)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

at java.lang.Thread.run(Thread.java:662)

“ActiveMQConnection[ID:cbdenbldd1-44881-1337971850846-4:372] Scheduler” daemon prio=10 tid=0x0b501400 nid=0x4abf in Object.wait() [0x68766000]

java.lang.Thread.State: WAITING (on object monitor)

at java.lang.Object.wait(Native Method)

at java.lang.Object.wait(Object.java:485)

at java.util.TimerThread.mainLoop(Timer.java:483)

  • locked <0x9f8939b0> (a java.util.TaskQueue)

at java.util.TimerThread.run(Timer.java:462)

“ActiveMQConnection[ID:cbdenbldd1-44881-1337971850846-4:371] Scheduler” daemon prio=10 tid=0x0b39f000 nid=0x4abd in Object.wait() [0x672d5000]

java.lang.Thread.State: WAITING (on object monitor)

at java.lang.Object.wait(Native Method)

at java.lang.Object.wait(Object.java:485)

at java.util.TimerThread.mainLoop(Timer.java:483)

  • locked <0x9f883890> (a java.util.TaskQueue)

at java.util.TimerThread.run(Timer.java:462)

“ActiveMQ Task-30” daemon prio=10 tid=0x0b164800 nid=0x4ab2 waiting for monitor entry [0x67326000]

java.lang.Thread.State: BLOCKED (on object monitor)

at org.apache.activemq.broker.region.RegionBroker.removeConsumer(RegionBroker.java:468)

  • waiting to lock <0x8f3dbce0> (a org.apache.activemq.broker.region.RegionBroker$1)

at org.apache.activemq.broker.BrokerFilter.removeConsumer(BrokerFilter.java:117)

at org.apache.activemq.advisory.AdvisoryBroker.removeConsumer(AdvisoryBroker.java:225)

at org.apache.activemq.broker.BrokerFilter.removeConsumer(BrokerFilter.java:117)

at org.apache.activemq.broker.BrokerFilter.removeConsumer(BrokerFilter.java:117)

at org.apache.activemq.broker.BrokerFilter.removeConsumer(BrokerFilter.java:117)

at org.apache.activemq.broker.MutableBrokerFilter.removeConsumer(MutableBrokerFilter.java:123)

at org.apache.activemq.broker.TransportConnection.processRemoveConsumer(TransportConnection.java:575)

at org.apache.activemq.broker.TransportConnection.processRemoveSession(TransportConnection.java:613)

at org.apache.activemq.broker.TransportConnection.processRemoveConnection(TransportConnection.java:726)

  • locked <0x95735e28> (a org.apache.activemq.broker.TransportConnection)

at org.apache.activemq.broker.TransportConnection.doStop(TransportConnection.java:1025)

at org.apache.activemq.broker.TransportConnection$3.run(TransportConnection.java:952)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

at java.lang.Thread.run(Thread.java:662)

“ActiveMQ Transport: tcp:///127.0.0.1:57747” daemon prio=10 tid=0x0b316c00 nid=0x4ab1 waiting for monitor entry [0x7f7a1000]

java.lang.Thread.State: BLOCKED (on object monitor)

at org.apache.log4j.Category.callAppenders(Category.java:204)

  • waiting to lock <0x8d9772f8> (a org.apache.log4j.spi.RootLogger)

at org.apache.log4j.Category.forcedLog(Category.java:391)

at org.apache.log4j.Category.log(Category.java:856)

at org.slf4j.impl.Log4jLoggerAdapter.debug(Log4jLoggerAdapter.java:204)

at org.apache.activemq.transport.InactivityMonitor.configuredOk(InactivityMonitor.java:331)

at org.apache.activemq.transport.InactivityMonitor.startMonitorThreads(InactivityMonitor.java:302)

  • locked <0x9f875b88> (a org.apache.activemq.transport.InactivityMonitor)

at org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:217)

  • locked <0x9f875b88> (a org.apache.activemq.transport.InactivityMonitor)

at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)

at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:220)

at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:202)

at java.lang.Thread.run(Thread.java:662)

“ActiveMQ Transport: tcp://cbdenbldd1/127.0.0.1:61618” prio=10 tid=0x0b4eec00 nid=0x4aaf runnable [0x7fda4000]

java.lang.Thread.State: RUNNABLE

at java.net.SocketInputStream.socketRead0(Native Method)

at java.net.SocketInputStream.read(SocketInputStream.java:129)

at org.apache.activemq.transport.tcp.TcpBufferedInputStream.fill(TcpBufferedInputStream.java:50)

at org.apache.activemq.transport.tcp.TcpTransport$2.fill(TcpTransport.java:576)

at org.apache.activemq.transport.tcp.TcpBufferedInputStream.read(TcpBufferedInputStream.java:58)

at org.apache.activemq.transport.tcp.TcpTransport$2.read(TcpTransport.java:561)

at java.io.DataInputStream.readInt(DataInputStream.java:370)

at org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:269)

at org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java:227)

at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:219)

at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:202)

at java.lang.Thread.run(Thread.java:662)

“ActiveMQ Task-28” daemon prio=10 tid=0x0a48a000 nid=0x4aab waiting for monitor entry [0x66fab000]

java.lang.Thread.State: BLOCKED (on object monitor)

at org.apache.log4j.Category.callAppenders(Category.java:204)

  • waiting to lock <0x8d9772f8> (a org.apache.log4j.spi.RootLogger)

at org.apache.log4j.Category.forcedLog(Category.java:391)

at org.apache.log4j.Category.log(Category.java:856)

at org.slf4j.impl.Log4jLoggerAdapter.debug(Log4jLoggerAdapter.java:204)

at org.apache.activemq.transport.failover.FailoverTransport.doReconnect(FailoverTransport.java:899)

  • locked <0x957f0288> (a java.lang.Object)

at org.apache.activemq.transport.failover.FailoverTransport$2.iterate(FailoverTransport.java:136)

  • locked <0x957f0290> (a java.lang.Object)

at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:127)

at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:48)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

at java.lang.Thread.run(Thread.java:662)

“ActiveMQ Transport: tcp:///127.0.0.1:57745” daemon prio=10 tid=0x0af7b800 nid=0x4aa9 waiting on condition [0x67191000]

java.lang.Thread.State: WAITING (parking)

at sun.misc.Unsafe.park(Native Method)

  • parking to wait for <0x9f83d808> (a java.util.concurrent.locks.ReentrantReadWriteLock$NonfairSync)

at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)

at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:811)

at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireShared(AbstractQueuedSynchronizer.java:941)

at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireShared(AbstractQueuedSynchronizer.java:1261)

at java.util.concurrent.locks.ReentrantReadWriteLock$ReadLock.lock(ReentrantReadWriteLock.java:594)

at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:173)

at org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:69)

at org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:113)

at org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:227)

  • locked <0x9f83b3c8> (a org.apache.activemq.transport.InactivityMonitor$1)

at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)

at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:220)

at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:202)

at java.lang.Thread.run(Thread.java:662)

“ActiveMQ Connection Executor: unconnected” daemon prio=10 tid=0x0b01d800 nid=0x4aa5 waiting on condition [0x671e2000]

java.lang.Thread.State: WAITING (parking)

at sun.misc.Unsafe.park(Native Method)

  • parking to wait for <0x9f805628> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)

at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)

at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1987)

at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:399)

at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)

at java.lang.Thread.run(Thread.java:662)

“ActiveMQConnection[ID:cbdenbldd1-44881-1337971850846-4:370] Scheduler” daemon prio=10 tid=0x09a90800 nid=0x4a9e in Object.wait() [0x690fe000]

java.lang.Thread.State: WAITING (on object monitor)

at java.lang.Object.wait(Native Method)

at java.lang.Object.wait(Object.java:485)

at java.util.TimerThread.mainLoop(Timer.java:483)

  • locked <0x9f82bcf0> (a java.util.TaskQueue)

at java.util.TimerThread.run(Timer.java:462)

“ActiveMQ Connection Executor: unconnected” daemon prio=10 tid=0x0b501c00 nid=0x4a9c waiting on condition [0x68715000]

java.lang.Thread.State: WAITING (parking)

at sun.misc.Unsafe.park(Native Method)

  • parking to wait for <0x9f807db0> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)

at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)

at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1987)

at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:399)

at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)

at java.lang.Thread.run(Thread.java:662)

“ActiveMQConnection[ID:cbdenbldd1-44881-1337971850846-4:369] Scheduler” daemon prio=10 tid=0x09a92c00 nid=0x4a9a in Object.wait() [0x690ad000]

java.lang.Thread.State: WAITING (on object monitor)

at java.lang.Object.wait(Native Method)

at java.lang.Object.wait(Object.java:485)

at java.util.TimerThread.mainLoop(Timer.java:483)

  • locked <0x9f822370> (a java.util.TaskQueue)

at java.util.TimerThread.run(Timer.java:462)

“ActiveMQ Task-23” daemon prio=10 tid=0x0b112800 nid=0x4a99 waiting on condition [0x670ef000]

java.lang.Thread.State: RUNNABLE

at java.util.Arrays.copyOf(Arrays.java:2882)

at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)

at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390)

at java.lang.StringBuilder.append(StringBuilder.java:119)

at org.gradle.api.internal.tasks.testing.junit.JUnitXmlReportGenerator.output(JUnitXmlReportGenerator.java:61)

at org.gradle.api.internal.tasks.testing.results.StateTrackingTestResultProcessor.output(StateTrackingTestResultProcessor.java:79)

at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)

at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)

at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)

at org.gradle.messaging.dispatch.BroadcastDispatch.dispatch(BroadcastDispatch.java:88)

at org.gradle.messaging.dispatch.BroadcastDispatch.dispatch(BroadcastDispatch.java:32)

at org.gradle.messaging.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)

at $Proxy3.output(Unknown Source)

at org.gradle.api.internal.tasks.testing.processors.CaptureTestOutputTestResultProcessor$StdOutForwarder.onOutput(CaptureTestOutputTestResultProcessor.java:90)

at org.gradle.logging.internal.DefaultStandardOutputRedirector$WriteAction.execute(DefaultStandardOutputRedirector.java:83)

at org.gradle.logging.internal.DefaultStandardOutputRedirector$WriteAction.execute(DefaultStandardOutputRedirector.java:79)

at org.gradle.util.LineBufferingOutputStream$StringOutput.write(LineBufferingOutputStream.java:148)

at org.gradle.util.LineBufferingOutputStream.flush(LineBufferingOutputStream.java:121)

at org.gradle.util.LineBufferingOutputStream.write(LineBufferingOutputStream.java:93)

at java.io.OutputStream.write(OutputStream.java:99)

at java.io.PrintStream.write(PrintStream.java:430)

  • locked <0x9f88bfd0> (a java.io.PrintStream)

at org.gradle.util.LinePerThreadBufferingOutputStream.write(LinePerThreadBufferingOutputStream.java:215)

at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:202)

at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:272)

at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:276)

at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:122)

  • locked <0x8d9889d8> (a java.io.OutputStreamWriter)

at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:212)

at org.apache.log4j.helpers.QuietWriter.flush(QuietWriter.java:59)

at org.apache.log4j.WriterAppender.subAppend(WriterAppender.java:324)

at org.apache.log4j.WriterAppender.append(WriterAppender.java:162)

at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:251)

  • locked <0x8d97e918> (a org.apache.log4j.ConsoleAppender)

at org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:66)

at org.apache.log4j.Category.callAppenders(Category.java:206)

  • locked <0x8d9772f8> (a org.apache.log4j.spi.RootLogger)

at org.apache.log4j.Category.forcedLog(Category.java:391)

at org.apache.log4j.Category.log(Category.java:856)

at org.slf4j.impl.Log4jLoggerAdapter.debug(Log4jLoggerAdapter.java:204)

at org.apache.activemq.transport.tcp.TcpTransport.doStop(TcpTransport.java:508)

at org.apache.activemq.util.ServiceSupport.stop(ServiceSupport.java:69)

at org.apache.activemq.transport.tcp.TcpTransport.stop(TcpTransport.java:549)

at org.apache.activemq.transport.InactivityMonitor.stop(InactivityMonitor.java:132)

at org.apache.activemq.transport.TransportFilter.stop(TransportFilter.java:65)

at org.apache.activemq.transport.WireFormatNegotiator.stop(WireFormatNegotiator.java:91)

at org.apache.activemq.transport.failover.FailoverTransport.doReconnect(FailoverTransport.java:902)

  • locked <0x9f8957d8> (a java.lang.Object)

at org.apache.activemq.transport.failover.FailoverTransport$2.iterate(FailoverTransport.java:136)

  • locked <0x9f8957e0> (a java.lang.Object)

at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:127)

at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:48)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

at java.lang.Thread.run(Thread.java:662)

“ActiveMQConnection[ID:cbdenbldd1-44881-1337971850846-4:368] Scheduler” daemon prio=10 tid=0x0b399800 nid=0x4a98 in Object.wait() [0x674bb000]

java.lang.Thread.State: WAITING (on object monitor)

at java.lang.Object.wait(Native Method)

at java.lang.Object.wait(Object.java:485)

at java.util.TimerThread.mainLoop(Timer.java:483)

  • locked <0x9f81f800> (a java.util.TaskQueue)

at java.util.TimerThread.run(Timer.java:462)

“ActiveMQ Task-22” daemon prio=10 tid=0x0b226800 nid=0x4a95 waiting for monitor entry [0x68bd4000]

java.lang.Thread.State: BLOCKED (on object monitor)

at org.apache.activemq.transport.failover.FailoverTransport.doReconnect(FailoverTransport.java:758)

  • waiting to lock <0x9f821580> (a java.lang.Object)

at org.apache.activemq.transport.failover.FailoverTransport$2.iterate(FailoverTransport.java:136)

  • locked <0x9f821588> (a java.lang.Object)

at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:127)

at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:48)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

at java.lang.Thread.run(Thread.java:662)

“ActiveMQConnection[ID:cbdenbldd1-44881-1337971850846-4:367] Scheduler” daemon prio=10 tid=0x0b284c00 nid=0x4a92 in Object.wait() [0x7eec5000]

java.lang.Thread.State: WAITING (on object monitor)

at java.lang.Object.wait(Native Method)

at java.lang.Object.wait(Object.java:485)

at java.util.TimerThread.mainLoop(Timer.java:483)

  • locked <0x9f81cc20> (a java.util.TaskQueue)

at java.util.TimerThread.run(Timer.java:462)

“ActiveMQ Task-21” daemon prio=10 tid=0x0b1fec00 nid=0x4a8f waiting for monitor entry [0x692a5000]

java.lang.Thread.State: BLOCKED (on object monitor)

at org.apache.activemq.transport.failover.FailoverTransport.doReconnect(FailoverTransport.java:758)

  • waiting to lock <0x9f82a840> (a java.lang.Object)

at org.apache.activemq.transport.failover.FailoverTransport$2.iterate(FailoverTransport.java:136)

  • locked <0x9f82a848> (a java.lang.Object)

at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:127)

at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:48)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

at java.lang.Thread.run(Thread.java:662)

“ActiveMQ Task-20” daemon prio=10 tid=0x0a574000 nid=0x4a8c waiting for monitor entry [0x69254000]

java.lang.Thread.State: BLOCKED (on object monitor)

at org.apache.log4j.Category.callAppenders(Category.java:204)

  • waiting to lock <0x8d9772f8> (a org.apache.log4j.spi.RootLogger)

at org.apache.log4j.Category.forcedLog(Category.java:391)

at org.apache.log4j.Category.log(Category.java:856)

at org.slf4j.impl.Log4jLoggerAdapter.debug(Log4jLoggerAdapter.java:204)

at org.apache.activemq.transport.failover.FailoverTransport.getConnectList(FailoverTransport.java:683)

at org.apache.activemq.transport.failover.FailoverTransport.doReconnect(FailoverTransport.java:801)

  • loc

How can I avoid slow builds and even hangs when connecting to repositories?