You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Kevin Kilroy <ke...@gmail.com> on 2011/11/25 16:11:03 UTC

Send failed, thread stuck?

Hi,

I've got a problem with Active MQ v 5.5.0. There seems to be a
situation where after a send the session/connection waits for a
response and waits forever. This is causing my app to hang because of
locking further up the call stack. See the stack trace for the thread
that is hung.

I believe I could put a timeout in the send, but I'd rather try to
understand the problem, as I really need all messages to be sent
successfully. If somebody could help explain what is happenning here I
would greatly appreciate it.

Thanks in advance,

Kevin.

Stack trace:
 sun.misc.Unsafe.park(Native Method)
java.util.concurrent.locks.LockSupport.park(LockSupport.java:156)
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1987)
java.util.concurrent.ArrayBlockingQueue.take(ArrayBlockingQueue.java:317)
org.apache.activemq.transport.FutureResponse.getResult(FutureResponse.java:40)
org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrelator.java:87)
org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1284)
org.apache.activemq.ActiveMQSession.send(ActiveMQSession.java:1760)
   - locked java.lang.Object@28c04b6b
org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:231)
org.apache.activemq.ActiveMQMessageProducerSupport.send(ActiveMQMessageProducerSupport.java:241)
org.springframework.jms.core.JmsTemplate.doSend(JmsTemplate.java:592)
org.springframework.jms.core.JmsTemplate.doSend(JmsTemplate.java:569)
org.springframework.jms.core.JmsTemplate$3.doInJms(JmsTemplate.java:536)
org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:466)
org.springframework.jms.core.JmsTemplate.send(JmsTemplate.java:534)
com.process.change.ChangeSetTransformer.sendDTOToClient(Unknown Source)
com.process.change.ChangeSetTransformer.processChangeSetList(Unknown Source)
sun.reflect.GeneratedMethodAccessor141.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.springframework.integration.util.DefaultMethodInvoker.invokeMethod(DefaultMethodInvoker.java:97)
org.springframework.integration.handler.MessageMappingMethodInvoker.doInvokeMethod(MessageMappingMethodInvoker.java:135)
org.springframework.integration.handler.MessageMappingMethodInvoker.invokeMethod(MessageMappingMethodInvoker.java:107)
org.springframework.integration.handler.ServiceActivatingHandler.handleRequestMessage(ServiceActivatingHandler.java:49)
org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:91)
org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:59)
org.springframework.integration.dispatcher.UnicastingDispatcher.doDispatch(UnicastingDispatcher.java:103)
org.springframework.integration.dispatcher.UnicastingDispatcher.access$0(UnicastingDispatcher.java:93)
org.springframework.integration.dispatcher.UnicastingDispatcher$1.run(UnicastingDispatcher.java:85)
org.springframework.integration.util.ErrorHandlingTaskExecutor$1.run(ErrorHandlingTaskExecutor.java:49)
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
java.lang.Thread.run(Thread.java:662)

Re: Send failed, thread stuck?

Posted by Gary Tully <ga...@gmail.com>.
Check with jmx to see the memory limits for that destination or for
the store or temp usage to see if limits have been reached.
Check in the broker log4j log to see if there are any warnings?
Last call, post a thread dump of the broker to see what that request
thread is doing.

On 25 November 2011 15:11, Kevin Kilroy <ke...@gmail.com> wrote:
> Hi,
>
> I've got a problem with Active MQ v 5.5.0. There seems to be a
> situation where after a send the session/connection waits for a
> response and waits forever. This is causing my app to hang because of
> locking further up the call stack. See the stack trace for the thread
> that is hung.
>
> I believe I could put a timeout in the send, but I'd rather try to
> understand the problem, as I really need all messages to be sent
> successfully. If somebody could help explain what is happenning here I
> would greatly appreciate it.
>
> Thanks in advance,
>
> Kevin.
>
> Stack trace:
>  sun.misc.Unsafe.park(Native Method)
> java.util.concurrent.locks.LockSupport.park(LockSupport.java:156)
> java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1987)
> java.util.concurrent.ArrayBlockingQueue.take(ArrayBlockingQueue.java:317)
> org.apache.activemq.transport.FutureResponse.getResult(FutureResponse.java:40)
> org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrelator.java:87)
> org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1284)
> org.apache.activemq.ActiveMQSession.send(ActiveMQSession.java:1760)
>   - locked java.lang.Object@28c04b6b
> org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:231)
> org.apache.activemq.ActiveMQMessageProducerSupport.send(ActiveMQMessageProducerSupport.java:241)
> org.springframework.jms.core.JmsTemplate.doSend(JmsTemplate.java:592)
> org.springframework.jms.core.JmsTemplate.doSend(JmsTemplate.java:569)
> org.springframework.jms.core.JmsTemplate$3.doInJms(JmsTemplate.java:536)
> org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:466)
> org.springframework.jms.core.JmsTemplate.send(JmsTemplate.java:534)
> com.process.change.ChangeSetTransformer.sendDTOToClient(Unknown Source)
> com.process.change.ChangeSetTransformer.processChangeSetList(Unknown Source)
> sun.reflect.GeneratedMethodAccessor141.invoke(Unknown Source)
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> java.lang.reflect.Method.invoke(Method.java:597)
> org.springframework.integration.util.DefaultMethodInvoker.invokeMethod(DefaultMethodInvoker.java:97)
> org.springframework.integration.handler.MessageMappingMethodInvoker.doInvokeMethod(MessageMappingMethodInvoker.java:135)
> org.springframework.integration.handler.MessageMappingMethodInvoker.invokeMethod(MessageMappingMethodInvoker.java:107)
> org.springframework.integration.handler.ServiceActivatingHandler.handleRequestMessage(ServiceActivatingHandler.java:49)
> org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:91)
> org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:59)
> org.springframework.integration.dispatcher.UnicastingDispatcher.doDispatch(UnicastingDispatcher.java:103)
> org.springframework.integration.dispatcher.UnicastingDispatcher.access$0(UnicastingDispatcher.java:93)
> org.springframework.integration.dispatcher.UnicastingDispatcher$1.run(UnicastingDispatcher.java:85)
> org.springframework.integration.util.ErrorHandlingTaskExecutor$1.run(ErrorHandlingTaskExecutor.java:49)
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> java.lang.Thread.run(Thread.java:662)
>



-- 
http://fusesource.com
http://blog.garytully.com