activemq-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "shpelda2 (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (AMQ-5409) With prefetch 0, Spring Default Message Listener Shutdown never ends
Date Tue, 18 Aug 2015 13:50:46 GMT

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

shpelda2 updated AMQ-5409:
--------------------------
    Attachment: testprefetch.tgz

Struggling with problem with same symptoms, successfuly reproduced the problem with the testcase.

Re-attaching testcase packed nicely into maven project, with enabled logging to just unpack
and execute.
 

> With prefetch 0, Spring Default Message Listener Shutdown never ends
> --------------------------------------------------------------------
>
>                 Key: AMQ-5409
>                 URL: https://issues.apache.org/jira/browse/AMQ-5409
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.9.1, 5.10.0
>         Environment: Ubuntu 13.10 64Bits
>            Reporter: Wawan
>         Attachments: PrefetchTest.java, SimpleMessageListener.java, testPrefetch_0_Deadlock.appctx.xml,
testPrefetch_0_WithTransactionManager.appctx.xml, testPrefetch_1.appctx.xml, testprefetch.tgz
>
>
> When prefetch is set to 0, the shutdown of a Spring Default Message Listener never ends.
We think there is a deadlock.
> This does not occur when prefetch is 1 or when we set a TransactionManager in the Spring
Default Message Listener.
> DeadLock :
> "jmsContainer-4@2020" prio=5 tid=0x14 nid=NA waiting
>   java.lang.Thread.State: WAITING
> 	  at java.lang.Object.wait(Object.java:-1)
> 	  at java.lang.Object.wait(Object.java:485)
> 	  at org.apache.activemq.SimplePriorityMessageDispatchChannel.dequeue(SimplePriorityMessageDispatchChannel.java:90)
> 	  at org.apache.activemq.ActiveMQMessageConsumer.dequeue(ActiveMQMessageConsumer.java:478)
> 	  at org.apache.activemq.ActiveMQMessageConsumer.receive(ActiveMQMessageConsumer.java:629)
> 	  at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveMessage(AbstractPollingMessageListenerContainer.java:430)
> 	  at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:310)
> 	  at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:263)
> 	  at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1102)
> 	  at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:996)
> 	  at java.lang.Thread.run(Thread.java:662)
> "Thread-0@594" prio=5 tid=0xb nid=NA waiting
>   java.lang.Thread.State: WAITING
> 	  at java.lang.Object.wait(Object.java:-1)
> 	  at java.lang.Object.wait(Object.java:485)
> 	  at org.springframework.jms.listener.DefaultMessageListenerContainer.doShutdown(DefaultMessageListenerContainer.java:543)
> 	  at org.springframework.jms.listener.AbstractJmsListeningContainer.shutdown(AbstractJmsListeningContainer.java:237)
> 	  at com.testprefetch.PrefetchTest.startAndStopContainer(PrefetchTest.java:43)
> 	  at com.testprefetch.PrefetchTest.testStopDMLCPrefetch0(PrefetchTest.java:15)
> 	  at sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java:-1)
> 	  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	  at java.lang.reflect.Method.invoke(Method.java:597)
> 	  at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
> 	  at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> 	  at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
> 	  at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
> 	  at org.junit.internal.runners.statements.FailOnTimeout$StatementThread.run(FailOnTimeout.java:74)
> This could be related with method org.apache.activemq.ActiveMQMessageConsumer#receive(long)
:
>             if (info.getPrefetchSize() == 0) {
>                 md = dequeue(-1); // We let the broker let us know when we timeout.
>             } else {
>                 md = dequeue(timeout);
>             }
> Issue present in versions : 
> 	ActiveMQ 5.9.1, 5.10.0
> 	Springframework 3.2.8.RELEASE, 4.0.5.RELEASE



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

Mime
View raw message