You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by April Easton <AE...@shawneecourt.org> on 2010/12/15 22:58:12 UTC

Tomcat 6 not shutting down

Good day,
     I've been searching for information on how to determine what process is keeping Tomcat from shutting down properly.  From other posts, I've been able to determine that the threads started from an Axis2 1.5.3 servlet on Tomcat were still processing when the shutdown.sh command was issued.  I have worked on that issue and now the threads created are being terminated no more than 2 minutes after the ServletContextListener executes the destroy method.  I don't see the threads that I created in this new dump file.  How do I determine what process is keeping Tomcat from shutting down properly?  Is it a problem if I'm not terminating the Axis2 threads immediately after the servlet is destroyed?  I'm using Tomcat 6.0.18 on RHEL5 update 5 with Java 6 update 7.   I have included the dump file below.  Thank you in advance for your help.

2010-12-15 14:46:38
Full thread dump Java HotSpot(TM) 64-Bit Server VM (10.0-b23 mixed mode):

"DestroyJavaVM" prio=10 tid=0x0000000051218400 nid=0x666e waiting on condition [0x0000000000000000..0x00000000416a3d00]
   java.lang.Thread.State: RUNNABLE

"http-8443-1" daemon prio=10 tid=0x0000000050fd0c00 nid=0x677e in Object.wait() [0x0000000040fcb000..0x0000000040fcbb10]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x00002aaade50fbf0> (a org.apache.tomcat.util.net.JIoEndpoint$Worker)
        at java.lang.Object.wait(Object.java:485)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.await(JIoEndpoint.java:416)
        - locked <0x00002aaade50fbf0> (a org.apache.tomcat.util.net.JIoEndpoint$Worker)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:442)
        at java.lang.Thread.run(Thread.java:619)

"http-8088-1" daemon prio=10 tid=0x0000000050cd7800 nid=0x677d in Object.wait() [0x0000000040b71000..0x0000000040b71c90]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x00002aaadff4b5a8> (a org.apache.tomcat.util.net.JIoEndpoint$Worker)
        at java.lang.Object.wait(Object.java:485)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.await(JIoEndpoint.java:416)
        - locked <0x00002aaadff4b5a8> (a org.apache.tomcat.util.net.JIoEndpoint$Worker)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:442)
        at java.lang.Thread.run(Thread.java:619)

"TP-Processor4" daemon prio=10 tid=0x000000005127c800 nid=0x66ce in Object.wait() [0x0000000041f50000..0x0000000041f50d90]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x00002aaaed3fa590> (a org.apache.jk.common.ChannelSocket)
        at java.lang.Object.wait(Object.java:485)
        at org.apache.jk.common.ChannelSocket.accept(ChannelSocket.java:300)
        - locked <0x00002aaaed3fa590> (a org.apache.jk.common.ChannelSocket)
        at org.apache.jk.common.ChannelSocket.acceptConnections(ChannelSocket.java:660)
        at org.apache.jk.common.ChannelSocket$SocketAcceptor.runIt(ChannelSocket.java:870)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
        at java.lang.Thread.run(Thread.java:619)

"http-8443-Acceptor-0" daemon prio=10 tid=0x00000000509ac000 nid=0x66ca waiting on condition [0x0000000041d4e000..0x0000000041d4eb90]
   java.lang.Thread.State: TIMED_WAITING (sleeping)
        at java.lang.Thread.sleep(Native Method)
        at org.apache.tomcat.util.net.JIoEndpoint$Acceptor.run(JIoEndpoint.java:302)
        at java.lang.Thread.run(Thread.java:619)

"http-8088-Acceptor-0" daemon prio=10 tid=0x00000000517c9c00 nid=0x66c7 waiting on condition [0x0000000041aa7000..0x0000000041aa7b10]
   java.lang.Thread.State: TIMED_WAITING (sleeping)
        at java.lang.Thread.sleep(Native Method)
        at org.apache.tomcat.util.net.JIoEndpoint$Acceptor.run(JIoEndpoint.java:302)
        at java.lang.Thread.run(Thread.java:619)

"Thread-6" daemon prio=10 tid=0x00002aaaf89d6800 nid=0x66a2 waiting on condition [0x0000000040dc9000..0x0000000040dc9c90]
   java.lang.Thread.State: TIMED_WAITING (sleeping)
        at java.lang.Thread.sleep(Native Method)
        at oracle.jdbc.pool.OracleImplicitConnectionCacheThread.run(OracleImplicitConnectionCacheThread.java:87)

"Timer-2" prio=10 tid=0x0000000050b72800 nid=0x6697 in Object.wait() [0x000000004096f000..0x000000004096fd10]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x00002aaab3e20cf0> (a java.util.TaskQueue)
        at java.lang.Object.wait(Object.java:485)
        at java.util.TimerThread.mainLoop(Timer.java:483)
        - locked <0x00002aaab3e20cf0> (a java.util.TaskQueue)
        at java.util.TimerThread.run(Timer.java:462)

"Timer-0" daemon prio=10 tid=0x00002aaaf89c4800 nid=0x6693 in Object.wait() [0x000000004086e000..0x000000004086ea10]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x00002aaab3f15770> (a java.util.TaskQueue)
        at java.util.TimerThread.mainLoop(Timer.java:509)
        - locked <0x00002aaab3f15770> (a java.util.TaskQueue)
        at java.util.TimerThread.run(Timer.java:462)

"Low Memory Detector" daemon prio=10 tid=0x000000005091dc00 nid=0x6677 runnable [0x0000000000000000..0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"CompilerThread1" daemon prio=10 tid=0x000000005091b800 nid=0x6676 waiting on condition [0x0000000000000000..0x00000000417a34e0]
   java.lang.Thread.State: RUNNABLE

"CompilerThread0" daemon prio=10 tid=0x0000000050918000 nid=0x6675 waiting on condition [0x0000000000000000..0x0000000041599460]
   java.lang.Thread.State: RUNNABLE

"Signal Dispatcher" daemon prio=10 tid=0x0000000050916800 nid=0x6674 runnable [0x0000000000000000..0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Finalizer" daemon prio=10 tid=0x00000000508eb000 nid=0x6673 in Object.wait() [0x00000000422c2000..0x00000000422c2d10]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x00002aaab3ab2160> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
        - locked <0x00002aaab3ab2160> (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=10 tid=0x00000000508e9c00 nid=0x6672 in Object.wait() [0x00000000421c1000..0x00000000421c1a90]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x00002aaab37e4c80> (a java.lang.ref.Reference$Lock)
        at java.lang.Object.wait(Object.java:485)
        at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
        - locked <0x00002aaab37e4c80> (a java.lang.ref.Reference$Lock)

"VM Thread" prio=10 tid=0x00000000508e4800 nid=0x6671 runnable

"GC task thread#0 (ParallelGC)" prio=10 tid=0x000000005086f400 nid=0x666f runnable

"GC task thread#1 (ParallelGC)" prio=10 tid=0x0000000050870800 nid=0x6670 runnable

"VM Periodic Task Thread" prio=10 tid=0x000000005091f800 nid=0x6678 waiting on condition

JNI global references: 904


April

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Tomcat 6 not shutting down

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: April Easton [mailto:AEaston@shawneecourt.org] 
> Subject: Tomcat 6 not shutting down

> How do I determine what process is keeping Tomcat from shutting 
> down properly?

Thread, not process.

This is the culprit:

"Timer-2" prio=10 tid=0x0000000050b72800 nid=0x6697 in Object.wait() [0x000000004096f000..0x000000004096fd10]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x00002aaab3e20cf0> (a java.util.TaskQueue)
        at java.lang.Object.wait(Object.java:485)
        at java.util.TimerThread.mainLoop(Timer.java:483)
        - locked <0x00002aaab3e20cf0> (a java.util.TaskQueue)
        at java.util.TimerThread.run(Timer.java:462)

Note that it is not a daemon thread, so it will prevent JVM termination.  Unfortunately, a simple stack trace won't tell you who started this thread - you'll need to either run a profiler and catch it, or carefully search your code.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org