activemq-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ARTEMIS-1485) ActiveMQTestBase.threadDump should print information about locks and deadlocks
Date Mon, 30 Oct 2017 09:26:00 GMT

    [ https://issues.apache.org/jira/browse/ARTEMIS-1485?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16224550#comment-16224550
] 

ASF GitHub Bot commented on ARTEMIS-1485:
-----------------------------------------

GitHub user dudaerich opened a pull request:

    https://github.com/apache/activemq-artemis/pull/1622

    ARTEMIS-1485 ActiveMQTestBase.threadDump should print information about locks and deadlocks

    Improved implementation of ActiveMQTestBase.threadDump which uses ThreadMXBean
    for getting information about threads including locks and deadlocks.
    
    Sample of the thread dump
    
    ```
    Complete Thread dump  - fired by MultiThreadRandomReattachTestBase::runTestMultipleThreads
(AMQ119014: Timed out after waiting 30,000 ms for response when sending packet 105)
    "Thread-4 (ActiveMQ-scheduled-threads)" Id=183 WAITING on java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject@2dc00c99
    	at sun.misc.Unsafe.park(Native Method)
    	-  waiting on java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject@2dc00c99
    	at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
    	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
    	at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1088)
    	at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)
    	at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    	at java.lang.Thread.run(Thread.java:748)
    
    "Thread-34 (ActiveMQ-remoting-threads-ActiveMQServerImpl::serverUUID=1a0105d4-bd4f-11e7-973f-fa163e2a7ec6-440938038)"
Id=160 WAITING on java.util.concurrent.CountDownLatch$Sync@41e2c73f
    	at sun.misc.Unsafe.park(Native Method)
    	-  waiting on java.util.concurrent.CountDownLatch$Sync@41e2c73f
    	at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
    	at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:836)
    	at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:997)
    	at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1304)
    	at java.util.concurrent.CountDownLatch.await(CountDownLatch.java:231)
    	at org.apache.activemq.artemis.utils.SimpleFutureImpl.get(SimpleFutureImpl.java:62)
    	at org.apache.activemq.artemis.core.protocol.core.ServerSessionPacketHandler.transferConnection(ServerSessionPacketHandler.java:911)
    	at org.apache.activemq.artemis.core.protocol.core.impl.ActiveMQPacketHandler.handleReattachSession(ActiveMQPacketHandler.java:242)
    	at org.apache.activemq.artemis.core.protocol.core.impl.ActiveMQPacketHandler.handlePacket(ActiveMQPacketHandler.java:103)
    	at org.apache.activemq.artemis.core.protocol.core.impl.ChannelImpl.handlePacket(ChannelImpl.java:638)
    	at org.apache.activemq.artemis.core.protocol.core.impl.RemotingConnectionImpl.doBufferReceived(RemotingConnectionImpl.java:392)
    	-  locked java.lang.Object@1409cb91
    	at org.apache.activemq.artemis.core.protocol.core.impl.RemotingConnectionImpl.bufferReceived(RemotingConnectionImpl.java:374)
    	at org.apache.activemq.artemis.core.remoting.server.impl.RemotingServiceImpl$DelegatingBufferHandler.bufferReceived(RemotingServiceImpl.java:642)
    	at org.apache.activemq.artemis.core.remoting.impl.invm.InVMConnection$1.run(InVMConnection.java:196)
    	at org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:42)
    	at org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:31)
    	at org.apache.activemq.artemis.utils.actors.ProcessorBase$ExecutorTask.run(ProcessorBase.java:53)
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    	at java.lang.Thread.run(Thread.java:748)
    
    	Number of locked synchronizers = 1
    	- java.util.concurrent.ThreadPoolExecutor$Worker@1f764375
    
    ===============================================================================
    End Thread dump  - fired by MultiThreadRandomReattachTestBase::runTestMultipleThreads
(AMQ119014: Timed out after waiting 30,000 ms for response when sending packet 105)
    *******************************************************************************
    ```

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/dudaerich/activemq-artemis ARTEMIS-1485

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/activemq-artemis/pull/1622.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1622
    
----
commit 726158d77fe2bdf4890586ee4435f93f5ad42852
Author: Erich Duda <dudaerich@gmail.com>
Date:   2017-10-30T08:41:23Z

    ARTEMIS-1485 ActiveMQTestBase.threadDump should print information about locks and deadlocks
    
    Improved implementation of ActiveMQTestBase.threadDump which uses ThreadMXBean
    for getting information about threads including locks and deadlocks.

----


> ActiveMQTestBase.threadDump should print information about locks and deadlocks
> ------------------------------------------------------------------------------
>
>                 Key: ARTEMIS-1485
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-1485
>             Project: ActiveMQ Artemis
>          Issue Type: Improvement
>    Affects Versions: 2.3.0
>            Reporter: Erich Duda
>
> {{ActiveMQTestBase}} contains method for printing thread dump of current JVM. This method
is used in the test suite for checking state of threads when something goes wrong in a test.
Current implementation does not print information about locks and deadlocks. It would be nice
to have this information in the thread dump.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message