JBoss 6 takes long long time to shutdown
jbossuser71 Jun 30, 2011 1:53 PMHello All,
I am using JBoss 6.0.Final release with default configuration (on Windows (Vista, 32 bit) platform).
I have noticed that if hit Ctrl+C in the console window (from where JBoss was started), 98% of the time Jboss does not stop properly/gracefully.
I see following logs in console window - but never get back the command prompt unless I manually kill the java process from task manager.
10:32:27,855 INFO [JMXConnector] JMXConnector stopped
10:32:29,577 INFO [AbstractServer] Stopped: JBossAS [6.0.0.Final "Neo"] in 2s:284ms
So, I deleted my deployed ".ear" file and just ran the jboss without deploying any custom ear.
Now when I hit Ctrl+C in the console window, still I face the same behavior.
This means the longer waiting time is happening because of something else - not because of my J2EE application.
Next, I used the "SendSignal" utility (as suggested in http://community.jboss.org/wiki/ThreadDumpWhenRunningAsAService post) to get the ThreadDump and I got the following dump - but I cannot get much understanding from this.
Can anyone please point out what might cause that longer waiting time for shutting down the JBoss-JVM?
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
10:32:27,855 INFO [JMXConnector] JMXConnector stopped
10:32:29,577 INFO [AbstractServer] Stopped: JBossAS [6.0.0.Final "Neo"] in 2s:284ms
2011-06-30 10:33:00
Full thread dump Java HotSpot(TM) Server VM (20.1-b02 mixed mode):
"Thread-13" prio=6 tid=0x35fff000 nid=0xc48 runnable [0x365ff000]
java.lang.Thread.State: RUNNABLE
at java.io.WinNTFileSystem.delete0(Native Method)
at java.io.Win32FileSystem.delete(Win32FileSystem.java:505)
at java.io.File.delete(File.java:904)
at org.jboss.as.temp.TmpDirCleanupService.delete(TmpDirCleanupService.java:101)
at org.jboss.as.temp.TmpDirCleanupService.delete(TmpDirCleanupService.java:95)
at org.jboss.as.temp.TmpDirCleanupService.delete(TmpDirCleanupService.java:95)
at org.jboss.as.temp.TmpDirCleanupService.delete(TmpDirCleanupService.java:95)
at org.jboss.as.temp.TmpDirCleanupService.delete(TmpDirCleanupService.java:95)
at org.jboss.as.temp.TmpDirCleanupService.delete(TmpDirCleanupService.java:95)
at org.jboss.as.temp.TmpDirCleanupService.delete(TmpDirCleanupService.java:95)
at org.jboss.as.temp.TmpDirCleanupService.delete(TmpDirCleanupService.java:95)
at org.jboss.as.temp.TmpDirCleanupService.delete(TmpDirCleanupService.java:95)
at org.jboss.as.temp.TmpDirCleanupService.delete(TmpDirCleanupService.java:95)
at org.jboss.as.temp.TmpDirCleanupService.delete(TmpDirCleanupService.java:95)
at org.jboss.as.temp.TmpDirCleanupService.handleEvent(TmpDirCleanupService.java:70)
at org.jboss.bootstrap.impl.base.server.AbstractServer.setState(AbstractServer.java:1086)
- locked <0x168013f8> (a org.jboss.bootstrap.impl.as.server.JBossASServerImpl)
at org.jboss.bootstrap.impl.base.server.AbstractServer.shutdown(AbstractServer.java:318)
- locked <0x168013f8> (a org.jboss.bootstrap.impl.as.server.JBossASServerImpl)
at org.jboss.Main$ShutdownHook$1.run(Main.java:994)
"Thread-1" prio=6 tid=0x378a0800 nid=0x1b34 in Object.wait() [0x3c96f000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x19368cf8> (a org.jboss.Main$ShutdownHook$1)
at java.lang.Thread.join(Thread.java:1186)
- locked <0x19368cf8> (a org.jboss.Main$ShutdownHook$1)
at java.lang.Thread.join(Thread.java:1239)
at org.jboss.Main$ShutdownHook.run(Main.java:1042)
"SIGINT handler" daemon prio=10 tid=0x3789fc00 nid=0x1438 in Object.wait() [0x359af000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x1604e4d8> (a org.jboss.Main$ShutdownHook)
at java.lang.Thread.join(Thread.java:1186)
- locked <0x1604e4d8> (a org.jboss.Main$ShutdownHook)
at java.lang.Thread.join(Thread.java:1239)
at java.lang.ApplicationShutdownHooks.runHooks(ApplicationShutdownHooks.java:79)
at java.lang.ApplicationShutdownHooks$1.run(ApplicationShutdownHooks.java:24)
at java.lang.Shutdown.runHooks(Shutdown.java:79)
at java.lang.Shutdown.sequence(Shutdown.java:123)
at java.lang.Shutdown.exit(Shutdown.java:168)
- locked <0x053b8800> (a java.lang.Class for java.lang.Shutdown)
at java.lang.Terminator$1.handle(Terminator.java:35)
at sun.misc.Signal$1.run(Signal.java:195)
at java.lang.Thread.run(Thread.java:662)
"http-127.0.0.1-8181-Poller" daemon prio=6 tid=0x3789f000 nid=0x18e4 in Object.wait() [0x3c8cf000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x1937a560> (a org.apache.tomcat.util.net.JIoEndpoint$Poller)
at org.apache.tomcat.util.net.JIoEndpoint$Poller.run(JIoEndpoint.java:764)
- locked <0x1937a560> (a org.apache.tomcat.util.net.JIoEndpoint$Poller)
at java.lang.Thread.run(Thread.java:662)
"ajp-127.0.0.1-8009-Acceptor-0" daemon prio=6 tid=0x3789e800 nid=0x18cc waiting on condition [0x3c87f000]
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:335)
at java.lang.Thread.run(Thread.java:662)
"ajp-127.0.0.1-8009-Poller" daemon prio=6 tid=0x3b43e800 nid=0xe64 in Object.wait() [0x3c82f000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x194b4c00> (a org.apache.tomcat.util.net.JIoEndpoint$Poller)
at org.apache.tomcat.util.net.JIoEndpoint$Poller.run(JIoEndpoint.java:764)
- locked <0x194b4c00> (a org.apache.tomcat.util.net.JIoEndpoint$Poller)
at java.lang.Thread.run(Thread.java:662)
"http-127.0.0.1-8080-Acceptor-0" daemon prio=6 tid=0x3b43e400 nid=0x1b84 waiting on condition [0x3c6df000]
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:335)
at java.lang.Thread.run(Thread.java:662)
"http-127.0.0.1-8080-Poller" daemon prio=6 tid=0x3b43dc00 nid=0xfd4 in Object.wait() [0x3c68f000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x194b5030> (a org.apache.tomcat.util.net.JIoEndpoint$Poller)
at org.apache.tomcat.util.net.JIoEndpoint$Poller.run(JIoEndpoint.java:764)
- locked <0x194b5030> (a org.apache.tomcat.util.net.JIoEndpoint$Poller)
at java.lang.Thread.run(Thread.java:662)
"Transaction Reaper Worker 0" daemon prio=6 tid=0x35fff800 nid=0x1f74 in Object.wait() [0x3c40f000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x18e7b6f8> (a java.util.LinkedList)
at java.lang.Object.wait(Object.java:485)
at com.arjuna.ats.arjuna.coordinator.TransactionReaper.waitForCancellations(TransactionReaper.java:318)
- locked <0x18e7b6f8> (a java.util.LinkedList)
at com.arjuna.ats.internal.arjuna.coordinator.ReaperWorkerThread.run(ReaperWorkerThread.java:66)
"Transaction Reaper" daemon prio=6 tid=0x35ffdc00 nid=0x1e10 in Object.wait() [0x3c3bf000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x18e79c58> (a com.arjuna.ats.arjuna.coordinator.TransactionReaper)
at com.arjuna.ats.internal.arjuna.coordinator.ReaperThread.run(ReaperThread.java:91)
- locked <0x18e79c58> (a com.arjuna.ats.arjuna.coordinator.TransactionReaper)
"pool-6-thread-1" prio=6 tid=0x35ffc000 nid=0x1df8 waiting on condition [0x36edf000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x18e7c100> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1987)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:399)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:662)
"GC Daemon" daemon prio=2 tid=0x3788e000 nid=0x1f58 in Object.wait() [0x36c9f000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x164b5cb0> (a sun.misc.GC$LatencyLock)
at sun.misc.GC$Daemon.run(GC.java:100)
- locked <0x164b5cb0> (a sun.misc.GC$LatencyLock)
"DestroyJavaVM" prio=6 tid=0x0133b400 nid=0x1e48 waiting on condition [0x00000000]
java.lang.Thread.State: RUNNABLE
"Low Memory Detector" daemon prio=6 tid=0x02057000 nid=0x1984 runnable [0x00000000]
java.lang.Thread.State: RUNNABLE
"C2 CompilerThread1" daemon prio=10 tid=0x02052000 nid=0x1bb0 waiting on condition [0x00000000]
java.lang.Thread.State: RUNNABLE
"C2 CompilerThread0" daemon prio=10 tid=0x02045c00 nid=0x1ea8 waiting on condition [0x00000000]
java.lang.Thread.State: RUNNABLE
"Attach Listener" daemon prio=10 tid=0x02044000 nid=0xed4 runnable [0x00000000]
java.lang.Thread.State: RUNNABLE
"Signal Dispatcher" daemon prio=10 tid=0x355a0400 nid=0x1bd0 waiting on condition [0x00000000]
java.lang.Thread.State: RUNNABLE
"Finalizer" daemon prio=8 tid=0x0203a400 nid=0x1b94 in Object.wait() [0x3557f000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x15b42c10> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:118)
- locked <0x15b42c10> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:134)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)
"Reference Handler" daemon prio=10 tid=0x02033c00 nid=0x1fa4 in Object.wait() [0x3552f000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x15fafe00> (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 <0x15fafe00> (a java.lang.ref.Reference$Lock)
"VM Thread" prio=10 tid=0x02030400 nid=0x1da0 runnable
"GC task thread#0 (ParallelGC)" prio=6 tid=0x01f83400 nid=0x1f7c runnable
"GC task thread#1 (ParallelGC)" prio=6 tid=0x01f84800 nid=0x19fc runnable
"VM Periodic Task Thread" prio=10 tid=0x355a9000 nid=0x184c waiting on condition
JNI global references: 1613
Heap
PSYoungGen total 135232K, used 25829K [0x2a690000, 0x35130000, 0x35130000)
eden space 98432K, 25% used [0x2a690000,0x2beef228,0x306b0000)
from space 36800K, 2% used [0x32d40000,0x32e1a280,0x35130000)
to space 38144K, 0% used [0x306b0000,0x306b0000,0x32bf0000)
PSOldGen total 349568K, used 76273K [0x15130000, 0x2a690000, 0x2a690000)
object space 349568K, 21% used [0x15130000,0x19bac698,0x2a690000)
PSPermGen total 47488K, used 46664K [0x05130000, 0x07f90000, 0x15130000)
object space 47488K, 98% used [0x05130000,0x07ec21c8,0x07f90000)