You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Paul Smith (JIRA)" <ji...@apache.org> on 2015/02/25 06:23:04 UTC

[jira] [Updated] (AMQ-5343) org.apache.activemq.thread.PooledTaskRunner.shutdown Waiting state

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

Paul Smith updated AMQ-5343:
----------------------------
    Attachment: threaddump.13574.txt

I _think_ we hit something similar, see attached thread dump file (threaddump.13574.txt)

The background here is that we have a process that is a consuming client of ActiveMQ 5.10.0.  This process regularly shuts itself down and starts up (cleaning up some leaky resources from another area unrelated).  This application which processes several thousand items and then shutsdown, to be started again by an external process has worked really well for weeks in production handling thousands of messages, but today one of these consumers hung on the attempt to shutdown cleanly.

Given this shutdown happens in an orderly fashion, the message is processed, a certain count of messages processed is checked and if exceeded goes through the shutdown process, I can't see why this wouldn't just work, but perhaps there's a timing issue in there somewhere.

> org.apache.activemq.thread.PooledTaskRunner.shutdown Waiting state
> ------------------------------------------------------------------
>
>                 Key: AMQ-5343
>                 URL: https://issues.apache.org/jira/browse/AMQ-5343
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: JMS client
>    Affects Versions: 5.10.0
>            Reporter: Mohit Anchlia
>         Attachments: threaddump.13574.txt
>
>
> I am using a framework with async request/response pattern where I cache session and connections. I also cache temp queue destination and use it with future to get the response. The problem seems to be when I try to close the connection I see threads are waiting forever:
> "pool-2-thread-9" prio=10 tid=0x00007f76843f4800 nid=0xadb in Object.wait() [0x00007f765194d000]
>    java.lang.Thread.State: WAITING (on object monitor)
>         at java.lang.Object.wait(Native Method)
>         at org.apache.activemq.thread.PooledTaskRunner.shutdown(PooledTaskRunner.java:104)
>         - locked <0x00000000950ddca8> (a org.apache.activemq.thread.PooledTaskRunner$1)
>         at org.apache.activemq.thread.PooledTaskRunner.shutdown(PooledTaskRunner.java:112)
>         at org.apache.activemq.ActiveMQSessionExecutor.stop(ActiveMQSessionExecutor.java:152)
>         - locked <0x0000000094f1ae10> (a org.apache.activemq.ActiveMQSessionExecutor)
>         at org.apache.activemq.ActiveMQSession.dispose(ActiveMQSession.java:720)
>         - locked <0x00000000950c89f8> (a org.apache.activemq.ActiveMQSession)
>         at org.apache.activemq.ActiveMQSession.doClose(ActiveMQSession.java:656)
>         at org.apache.activemq.ActiveMQSession.close(ActiveMQSession.java:649)
>         at com.sony.am.snei.stress.async.jms.JMSClient.cleanUp(JMSClient.java:172)
>         at com.sony.am.snei.stress.command.FDBIdentityAndAccessCommand.doWrite(FDBIdentityAndAccessCommand.java:142)
>         at com.sony.am.snei.stress.command.FDBIdentityAndAccessCommand.call(FDBIdentityAndAccessCommand.java:46)
>         at com.sony.am.snei.stress.command.FDBIdentityAndAccessCommand.call(FDBIdentityAndAccessCommand.java:22)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:262)
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>         at java.lang.Thread.run(Thread.java:745)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)