RE: Tomcat 6 not shutting down
Chuck, Thank you greatly for the help. I searched our code and found the timer in question. I added a call to cancel this timer when the other thread dies and Tomcat now shuts down properly. Thank you, April -Original Message- From: April Easton Sent: Wednesday, December 15, 2010 3:58 PM To: 'users@tomcat.apache.org' Subject: 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=0x51218400 nid=0x666e waiting on condition [0x..0x416a3d00] java.lang.Thread.State: RUNNABLE http-8443-1 daemon prio=10 tid=0x50fd0c00 nid=0x677e in Object.wait() [0x40fcb000..0x40fcbb10] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on 0x2aaade50fbf0 (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 0x2aaade50fbf0 (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=0x50cd7800 nid=0x677d in Object.wait() [0x40b71000..0x40b71c90] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on 0x2aaadff4b5a8 (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 0x2aaadff4b5a8 (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=0x5127c800 nid=0x66ce in Object.wait() [0x41f5..0x41f50d90] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on 0x2aaaed3fa590 (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 0x2aaaed3fa590 (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=0x509ac000 nid=0x66ca waiting on condition [0x41d4e000..0x41d4eb90] 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=0x517c9c00 nid=0x66c7 waiting on condition [0x41aa7000..0x41aa7b10] 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=0x2aaaf89d6800 nid=0x66a2 waiting on condition [0x40dc9000..0x40dc9c90] 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=0x50b72800 nid=0x6697 in Object.wait() [0x4096f000..0x4096fd10] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on 0x2aaab3e20cf0 (a
RE: Tomcat 6 not shutting down
From: April Easton [mailto:aeas...@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=0x50b72800 nid=0x6697 in Object.wait() [0x4096f000..0x4096fd10] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on 0x2aaab3e20cf0 (a java.util.TaskQueue) at java.lang.Object.wait(Object.java:485) at java.util.TimerThread.mainLoop(Timer.java:483) - locked 0x2aaab3e20cf0 (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-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org