JVM不会关闭

时间:2015-12-04 11:08:23

标签: jvm shutdown

JVM未在public static void main(String [] args)

结束时正常关闭

当我运行jstack以查看阻塞的线程时,我得到以下输出:

"Attach Listener" #25 daemon prio=9 os_prio=31 tid=0x00007f9d7d597800 nid=0x8807 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"DestroyJavaVM" #24 prio=5 os_prio=31 tid=0x00007f9d7cb23800 nid=0x1303 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"pool-2-thread-1" #22 prio=5 os_prio=31 tid=0x00007f9d7c5e6800 nid=0x8603 waiting on condition [0x0000000135843000]
   java.lang.Thread.State: TIMED_WAITING (parking)
    at sun.misc.Unsafe.park(Native Method)
    - parking to wait for  <0x00000005c02eb440> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
    at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
    at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093)
    at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)
    at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

"Monitor Ctrl-Break" #14 daemon prio=5 os_prio=31 tid=0x00007f9d7c2d2000 nid=0x7403 runnable [0x0000000134551000]
   java.lang.Thread.State: RUNNABLE
    at java.net.PlainSocketImpl.socketAccept(Native Method)
    at java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:404)
    at java.net.ServerSocket.implAccept(ServerSocket.java:545)
    at java.net.ServerSocket.accept(ServerSocket.java:513)
    at com.intellij.rt.execution.application.AppMain$1.run(AppMain.java:90)
    at java.lang.Thread.run(Thread.java:745)

"Service Thread" #13 daemon prio=9 os_prio=31 tid=0x00007f9d7b973800 nid=0x7003 runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C1 CompilerThread3" #12 daemon prio=9 os_prio=31 tid=0x00007f9d7a2b4000 nid=0x6e03 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread2" #11 daemon prio=9 os_prio=31 tid=0x00007f9d7a2a1800 nid=0x6c03 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread1" #10 daemon prio=9 os_prio=31 tid=0x00007f9d7a2a1000 nid=0x6a03 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread0" #9 daemon prio=9 os_prio=31 tid=0x00007f9d7a2aa800 nid=0x6803 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"VM JFR Buffer Thread" #8 daemon prio=5 os_prio=31 tid=0x00007f9d7c939000 nid=0x6603 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"JFR request timer" #6 daemon prio=5 os_prio=31 tid=0x00007f9d7b003800 nid=0x6403 in Object.wait() [0x0000000133501000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x00000005c1552480> (a java.util.TaskQueue)
    at java.lang.Object.wait(Object.java:502)
    at java.util.TimerThread.mainLoop(Timer.java:526)
    - locked <0x00000005c1552480> (a java.util.TaskQueue)
    at java.util.TimerThread.run(Timer.java:505)

"Signal Dispatcher" #5 daemon prio=9 os_prio=31 tid=0x00007f9d7a827800 nid=0x611b runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Surrogate Locker Thread (Concurrent GC)" #4 daemon prio=9 os_prio=31 tid=0x00007f9d7a81d800 nid=0x540b waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Finalizer" #3 daemon prio=8 os_prio=31 tid=0x00007f9d7d1de000 nid=0x4f03 in Object.wait() [0x0000000130f2b000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x00000005c1509e68> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:142)
    - locked <0x00000005c1509e68> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:158)
    at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:209)

"Reference Handler" #2 daemon prio=10 os_prio=31 tid=0x00007f9d7d1dd000 nid=0x4d03 in Object.wait() [0x0000000130e28000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x00000005c1509938> (a java.lang.ref.Reference$Lock)
    at java.lang.Object.wait(Object.java:502)
    at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:157)
    - locked <0x00000005c1509938> (a java.lang.ref.Reference$Lock)

"VM Thread" os_prio=31 tid=0x00007f9d7904b000 nid=0x4b03 runnable

"Gang worker#0 (Parallel GC Threads)" os_prio=31 tid=0x00007f9d7a001000 nid=0x2103 runnable

"Gang worker#1 (Parallel GC Threads)" os_prio=31 tid=0x00007f9d7a001800 nid=0x2303 runnable

"Gang worker#2 (Parallel GC Threads)" os_prio=31 tid=0x00007f9d7a014800 nid=0x2503 runnable

"Gang worker#3 (Parallel GC Threads)" os_prio=31 tid=0x00007f9d7c003000 nid=0x2703 runnable

"Gang worker#4 (Parallel GC Threads)" os_prio=31 tid=0x00007f9d7c003800 nid=0x2903 runnable

"Gang worker#5 (Parallel GC Threads)" os_prio=31 tid=0x00007f9d7c004000 nid=0x2b03 runnable

"Gang worker#6 (Parallel GC Threads)" os_prio=31 tid=0x00007f9d7c005000 nid=0x2d03 runnable

"Gang worker#7 (Parallel GC Threads)" os_prio=31 tid=0x00007f9d7a015000 nid=0x2f03 runnable

"G1 Main Concurrent Mark GC Thread" os_prio=31 tid=0x00007f9d7b801800 nid=0x4303 runnable

"Gang worker#0 (G1 Parallel Marking Threads)" os_prio=31 tid=0x00007f9d7c80c800 nid=0x4503 runnable

"Gang worker#1 (G1 Parallel Marking Threads)" os_prio=31 tid=0x00007f9d7c80d800 nid=0x4703 runnable

"G1 Concurrent Refinement Thread#0" os_prio=31 tid=0x00007f9d79008800 nid=0x4103 runnable

"G1 Concurrent Refinement Thread#1" os_prio=31 tid=0x00007f9d7a808800 nid=0x3f03 runnable

"G1 Concurrent Refinement Thread#2" os_prio=31 tid=0x00007f9d7a808000 nid=0x3d03 runnable

"G1 Concurrent Refinement Thread#3" os_prio=31 tid=0x00007f9d7a019800 nid=0x3b03 runnable

"G1 Concurrent Refinement Thread#4" os_prio=31 tid=0x00007f9d7a018800 nid=0x3903 runnable

"G1 Concurrent Refinement Thread#5" os_prio=31 tid=0x00007f9d7a018000 nid=0x3703 runnable

"G1 Concurrent Refinement Thread#6" os_prio=31 tid=0x00007f9d7a017000 nid=0x3503 runnable

"G1 Concurrent Refinement Thread#7" os_prio=31 tid=0x00007f9d7a016800 nid=0x3303 runnable

"G1 Concurrent Refinement Thread#8" os_prio=31 tid=0x00007f9d7a015800 nid=0x3103 runnable

"String Deduplication Thread" os_prio=31 tid=0x00007f9d7d1d4000 nid=0x4903 runnable

"VM Periodic Task Thread" os_prio=31 tid=0x00007f9d7a2a2800 nid=0x7203 waiting on condition

JNI global references: 158

任何人都知道这可能是什么原因?

使用: Java 8_25,Hibernate 4.3.10和EhCache

0 个答案:

没有答案