activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aaron Mulder" <ammul...@alumni.princeton.edu>
Subject 4.0.1 Consumer hangs while stopping
Date Mon, 21 Aug 2006 18:12:36 GMT
I ran a test where one publisher sent 10 messages to a topic with 500
connected subscribers (run as 500 threads from a single VM, but in a
different VM than the producer).  Each consumer knows how many
messages to expect, and tries to shut down once it receives the last
message.  The consumers were registered using
MessageConsumer.setMessageListener(...)

At the end of the run, the consumer VM didn't shut down.  Looking at a
thread dump, it seems like a couple of the consumers are blocked on
I/O and aren't going to shut down (though the majority did shut down).
 I've confirmed that all the consumers received all the messages they
were expecting, and did attempt to shut down (you can see
ActiveMQSession.close in the thread dump).  Any suggestions to avoid
this?

Thanks,
     Aaron

"ActiveMQ Session Task" daemon prio=1 tid=0x082a1cd0 nid=0x3723 in
Object.wait() [0x7bac5000..0x7bac6050]
	at java.lang.Object.wait(Native Method)
	- waiting on <0x97b91310> (a org.apache.activemq.thread.PooledTaskRunner$1)
	at java.lang.Object.wait(Object.java:474)
	at org.apache.activemq.thread.PooledTaskRunner.shutdown(PooledTaskRunner.java:88)
	- locked <0x97b91310> (a org.apache.activemq.thread.PooledTaskRunner$1)
	at org.apache.activemq.ActiveMQSessionExecutor.stop(ActiveMQSessionExecutor.java:113)
	at org.apache.activemq.ActiveMQSession.dispose(ActiveMQSession.java:539)
	- locked <0x9612ff30> (a org.apache.activemq.ActiveMQSession)
	at org.apache.activemq.ActiveMQSession.close(ActiveMQSession.java:516)
	at org.activemq.tests.ActiveMQClient.close(ActiveMQClient.java:77)
	at org.activemq.tests.Consumer$2$1.onMessage(Consumer.java:76)
	at org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageConsumer.java:795)
	at org.apache.activemq.ActiveMQSessionExecutor.dispatch(ActiveMQSessionExecutor.java:96)
	at org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionExecutor.java:149)
	at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:110)
	at org.apache.activemq.thread.PooledTaskRunner.access$100(PooledTaskRunner.java:25)
	at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:43)
	at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
	at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
	at java.lang.Thread.run(Thread.java:595)

"ActiveMQ Session Task" daemon prio=1 tid=0x0832fb50 nid=0x370e in
Object.wait() [0x7c4d9000..0x7c4d9e50]
	at java.lang.Object.wait(Native Method)
	- waiting on <0x97c56170> (a org.apache.activemq.thread.PooledTaskRunner$1)
	at java.lang.Object.wait(Object.java:474)
	at org.apache.activemq.thread.PooledTaskRunner.shutdown(PooledTaskRunner.java:88)
	- locked <0x97c56170> (a org.apache.activemq.thread.PooledTaskRunner$1)
	at org.apache.activemq.ActiveMQSessionExecutor.stop(ActiveMQSessionExecutor.java:113)
	at org.apache.activemq.ActiveMQSession.dispose(ActiveMQSession.java:539)
	- locked <0x96c3a0a8> (a org.apache.activemq.ActiveMQSession)
	at org.apache.activemq.ActiveMQSession.close(ActiveMQSession.java:516)
	at org.activemq.tests.ActiveMQClient.close(ActiveMQClient.java:77)
	at org.activemq.tests.Consumer$2$1.onMessage(Consumer.java:76)
	at org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageConsumer.java:795)
	at org.apache.activemq.ActiveMQSessionExecutor.dispatch(ActiveMQSessionExecutor.java:96)
	at org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionExecutor.java:149)
	at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:110)
	at org.apache.activemq.thread.PooledTaskRunner.access$100(PooledTaskRunner.java:25)
	at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:43)
	at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
	at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
	at java.lang.Thread.run(Thread.java:595)

"ActiveMQ Transport: tcp://localhost/127.0.0.1:61616" prio=1
tid=0x8185b4f0 nid=0x3623 runnable [0x7e498000..0x7e498e50]
	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:48)
	at org.apache.activemq.transport.tcp.TcpBufferedInputStream.read(TcpBufferedInputStream.java:55)
	at java.io.DataInputStream.readInt(DataInputStream.java:353)
	at org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:274)
	at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:142)
	at java.lang.Thread.run(Thread.java:595)

"ActiveMQ Transport: tcp://localhost/127.0.0.1:61616" prio=1
tid=0x81851060 nid=0x35f2 runnable [0x7eaa4000..0x7eaa5050]
	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:48)
	at org.apache.activemq.transport.tcp.TcpBufferedInputStream.read(TcpBufferedInputStream.java:55)
	at java.io.DataInputStream.readInt(DataInputStream.java:353)
	at org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:274)
	at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:142)
	at java.lang.Thread.run(Thread.java:595)

"ActiveMQ Scheduler" daemon prio=1 tid=0x081a6630 nid=0x2f16 in
Object.wait() [0x7c55a000..0x7c55afd0]
	at java.lang.Object.wait(Native Method)
	- waiting on <0x927d9a70> (a java.lang.Object)
	at java.lang.Object.wait(Object.java:432)
	at edu.emory.mathcs.backport.java.util.concurrent.TimeUnit.timedWait(TimeUnit.java:301)
	at edu.emory.mathcs.backport.java.util.concurrent.DelayQueue.take(DelayQueue.java:156)
	- locked <0x927d9a70> (a java.lang.Object)
	at edu.emory.mathcs.backport.java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:590)
	at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:477)
	at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:674)
	at java.lang.Thread.run(Thread.java:595)

"ActiveMQ Scheduler" daemon prio=1 tid=0x08856c28 nid=0x2f0f in
Object.wait() [0x7c5db000..0x7c5dc0d0]
	at java.lang.Object.wait(Native Method)
	- waiting on <0x927d9a70> (a java.lang.Object)
	at java.lang.Object.wait(Object.java:432)
	at edu.emory.mathcs.backport.java.util.concurrent.TimeUnit.timedWait(TimeUnit.java:301)
	at edu.emory.mathcs.backport.java.util.concurrent.DelayQueue.take(DelayQueue.java:156)
	- locked <0x927d9a70> (a java.lang.Object)
	at edu.emory.mathcs.backport.java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:590)
	at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:477)
	at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:674)
	at java.lang.Thread.run(Thread.java:595)

"ActiveMQ Scheduler" daemon prio=1 tid=0x088566e0 nid=0x2f0e in
Object.wait() [0x7c65c000..0x7c65d150]
	at java.lang.Object.wait(Native Method)
	- waiting on <0x927d9a70> (a java.lang.Object)
	at java.lang.Object.wait(Object.java:432)
	at edu.emory.mathcs.backport.java.util.concurrent.TimeUnit.timedWait(TimeUnit.java:301)
	at edu.emory.mathcs.backport.java.util.concurrent.DelayQueue.take(DelayQueue.java:156)
	- locked <0x927d9a70> (a java.lang.Object)
	at edu.emory.mathcs.backport.java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:590)
	at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:477)
	at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:674)
	at java.lang.Thread.run(Thread.java:595)

"ActiveMQ Scheduler" daemon prio=1 tid=0x08855088 nid=0x2f09 in
Object.wait() [0x7c6dd000..0x7c6dde50]
	at java.lang.Object.wait(Native Method)
	- waiting on <0x927d9a70> (a java.lang.Object)
	at java.lang.Object.wait(Object.java:432)
	at edu.emory.mathcs.backport.java.util.concurrent.TimeUnit.timedWait(TimeUnit.java:301)
	at edu.emory.mathcs.backport.java.util.concurrent.DelayQueue.take(DelayQueue.java:156)
	- locked <0x927d9a70> (a java.lang.Object)
	at edu.emory.mathcs.backport.java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:590)
	at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:477)
	at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:674)
	at java.lang.Thread.run(Thread.java:595)

"ActiveMQ Scheduler" daemon prio=1 tid=0x08856198 nid=0x2f08 in
Object.wait() [0x7c75e000..0x7c75eed0]
	at java.lang.Object.wait(Native Method)
	- waiting on <0x927d9a70> (a java.lang.Object)
	at java.lang.Object.wait(Object.java:432)
	at edu.emory.mathcs.backport.java.util.concurrent.TimeUnit.timedWait(TimeUnit.java:301)
	at edu.emory.mathcs.backport.java.util.concurrent.DelayQueue.take(DelayQueue.java:156)
	- locked <0x927d9a70> (a java.lang.Object)
	at edu.emory.mathcs.backport.java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:590)
	at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:477)
	at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:674)
	at java.lang.Thread.run(Thread.java:595)

"DestroyJavaVM" prio=1 tid=0x8188b488 nid=0x2cfc waiting on condition
[0x00000000..0xbfb6de00]

"Monitor Ctrl-Break" daemon prio=1 tid=0x8c602fc0 nid=0x2d0d runnable
[0x8c7fb000..0x8c7fbe50]
	at java.net.PlainSocketImpl.socketAccept(Native Method)
	at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384)
	- locked <0x9180d658> (a java.net.SocksSocketImpl)
	at java.net.ServerSocket.implAccept(ServerSocket.java:450)
	at java.net.ServerSocket.accept(ServerSocket.java:421)
	at com.intellij.rt.execution.application.AppMain$1.run(AppMain.java:53)
	at java.lang.Thread.run(Thread.java:595)

"Low Memory Detector" daemon prio=1 tid=0x08112310 nid=0x2d0b runnable
[0x00000000..0x00000000]

"CompilerThread1" daemon prio=1 tid=0x08110e40 nid=0x2d0a waiting on
condition [0x00000000..0x8d0c21b8]

"CompilerThread0" daemon prio=1 tid=0x0810fd98 nid=0x2d09 waiting on
condition [0x00000000..0x8d143278]

"AdapterThread" daemon prio=1 tid=0x0810ec20 nid=0x2d08 waiting on
condition [0x00000000..0x00000000]

"Signal Dispatcher" daemon prio=1 tid=0x0810dd80 nid=0x2d07 runnable
[0x00000000..0x00000000]

"Finalizer" daemon prio=1 tid=0x08102d00 nid=0x2d06 in Object.wait()
[0x8d2fa000..0x8d2fa1d0]
	at java.lang.Object.wait(Native Method)
	- waiting on <0x92810648> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
	- locked <0x92810648> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
	at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)

"Reference Handler" daemon prio=1 tid=0x081027a0 nid=0x2d05 in
Object.wait() [0x8d37a000..0x8d37ae50]
	at java.lang.Object.wait(Native Method)
	- waiting on <0x93ad7e68> (a java.lang.ref.Reference$Lock)
	at java.lang.Object.wait(Object.java:474)
	at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
	- locked <0x93ad7e68> (a java.lang.ref.Reference$Lock)

"VM Thread" prio=1 tid=0x08100260 nid=0x2d04 runnable

"GC task thread#0 (ParallelGC)" prio=1 tid=0x08077070 nid=0x2d02 runnable

"GC task thread#1 (ParallelGC)" prio=1 tid=0x08077cc0 nid=0x2d03 runnable

"VM Periodic Task Thread" prio=1 tid=0x081137d0 nid=0x2d0c waiting on condition

Mime
View raw message