У меня есть приложение SWT, которое использует RMI.Только на мак / какао он не выключится должным образом.Я закрыл все, выключил executor-сервис, который я использую, но он не выйдет.
Это мой ThreadDump:
2012-01-03 17:48:56
Full thread dump Java HotSpot(TM) 64-Bit Server VM (20.4-b02-402 mixed mode):
"DestroyJavaVM" prio=5 tid=7ffa65000800 nid=0x10136c000 waiting on condition [00000000]
java.lang.Thread.State: RUNNABLE
Locked ownable synchronizers:
- None
"RMI TCP Connection(2)-192.168.247.101" daemon prio=9 tid=7ffa66128000 nid=0x10ecdd000 runnable [10ecdc000]
java.lang.Thread.State: RUNNABLE
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
- locked <7e0b8a0a0> (a java.io.BufferedInputStream)
at java.io.FilterInputStream.read(FilterInputStream.java:66)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:517)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
Locked ownable synchronizers:
- <7e0989490> (a java.util.concurrent.locks.ReentrantLock$NonfairSync)
"GC Daemon" daemon prio=2 tid=7ffa66059000 nid=0x10ebda000 in Object.wait() [10ebd9000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <7defe4f00> (a sun.misc.GC$LatencyLock)
at sun.misc.GC$Daemon.run(GC.java:100)
- locked <7defe4f00> (a sun.misc.GC$LatencyLock)
Locked ownable synchronizers:
- None
"RMI RenewClean-[busta-hl.dyndns.info:12000]" daemon prio=5 tid=7ffa6606f000 nid=0x10ead7000 in Object.wait() [10ead6000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <7defe4c50> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:118)
- locked <7defe4c50> (a java.lang.ref.ReferenceQueue$Lock)
at sun.rmi.transport.DGCClient$EndpointEntry$RenewCleanThread.run(DGCClient.java:516)
at java.lang.Thread.run(Thread.java:680)
Locked ownable synchronizers:
- None
"AWT-Shutdown" prio=5 tid=7ffa651c8000 nid=0x10e9d4000 in Object.wait() [10e9d3000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <7df07f988> (a java.lang.Object)
at java.lang.Object.wait(Object.java:485)
at sun.awt.AWTAutoShutdown.run(AWTAutoShutdown.java:265)
- locked <7df07f988> (a java.lang.Object)
at java.lang.Thread.run(Thread.java:680)
Locked ownable synchronizers:
- None
"JMX server connection timeout 21" daemon prio=9 tid=7ffa629dd000 nid=0x10c7c8000 in Object.wait() [10c7c7000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <7df0345e0> (a [I)
at com.sun.jmx.remote.internal.ServerCommunicatorAdmin$Timeout.run(ServerCommunicatorAdmin.java:150)
- locked <7df0345e0> (a [I)
at java.lang.Thread.run(Thread.java:680)
Locked ownable synchronizers:
- None
"RMI Scheduler(0)" daemon prio=9 tid=7ffa62b71000 nid=0x10c6c5000 waiting on condition [10c6c4000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <7df01ce80> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:196)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2025)
at java.util.concurrent.DelayQueue.take(DelayQueue.java:164)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:609)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:602)
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:680)
Locked ownable synchronizers:
- None
"RMI TCP Connection(3)-192.168.247.101" daemon prio=9 tid=7ffa65380000 nid=0x10c5c2000 runnable [10c5c1000]
java.lang.Thread.State: RUNNABLE
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
- locked <7dbef48f0> (a java.io.BufferedInputStream)
at java.io.FilterInputStream.read(FilterInputStream.java:66)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:517)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
Locked ownable synchronizers:
- <7df036b48> (a java.util.concurrent.locks.ReentrantLock$NonfairSync)
"RMI TCP Accept-0" daemon prio=9 tid=7ffa651ce000 nid=0x10c4bf000 runnable [10c4be000]
java.lang.Thread.State: RUNNABLE
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:408)
- locked <7df01d030> (a java.net.SocksSocketImpl)
at java.net.ServerSocket.implAccept(ServerSocket.java:462)
at java.net.ServerSocket.accept(ServerSocket.java:430)
at sun.management.jmxremote.LocalRMIServerSocketFactory$1.accept(LocalRMIServerSocketFactory.java:34)
at sun.rmi.transport.tcp.TCPTransport$AcceptLoop.executeAcceptLoop(TCPTransport.java:369)
at sun.rmi.transport.tcp.TCPTransport$AcceptLoop.run(TCPTransport.java:341)
at java.lang.Thread.run(Thread.java:680)
Locked ownable synchronizers:
- None
"Attach Listener" daemon prio=9 tid=7ffa661ea800 nid=0x109c7d000 waiting on condition [00000000]
java.lang.Thread.State: RUNNABLE
Locked ownable synchronizers:
- None
"Timer-0" daemon prio=5 tid=7ffa628dd000 nid=0x109a77000 in Object.wait() [109a76000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <7dee02000> (a java.util.TaskQueue)
at java.lang.Object.wait(Object.java:485)
at java.util.TimerThread.mainLoop(Timer.java:483)
- locked <7dee02000> (a java.util.TaskQueue)
at java.util.TimerThread.run(Timer.java:462)
Locked ownable synchronizers:
- None
"Poller SunPKCS11-Darwin" daemon prio=1 tid=7ffa65279000 nid=0x109643000 waiting on condition [109642000]
java.lang.Thread.State: TIMED_WAITING (sleeping)
at java.lang.Thread.sleep(Native Method)
at sun.security.pkcs11.SunPKCS11$TokenPoller.run(SunPKCS11.java:692)
at java.lang.Thread.run(Thread.java:680)
Locked ownable synchronizers:
- None
"Thread-1" daemon prio=5 tid=7ffa65101800 nid=0x7fff7d891960 runnable [00000000]
java.lang.Thread.State: RUNNABLE
Locked ownable synchronizers:
- None
"Low Memory Detector" daemon prio=5 tid=7ffa650ef000 nid=0x10917f000 runnable [00000000]
java.lang.Thread.State: RUNNABLE
Locked ownable synchronizers:
- None
"C2 CompilerThread1" daemon prio=9 tid=7ffa650ee800 nid=0x10907c000 waiting on condition [00000000]
java.lang.Thread.State: RUNNABLE
Locked ownable synchronizers:
- None
"C2 CompilerThread0" daemon prio=9 tid=7ffa650ed800 nid=0x108f79000 waiting on condition [00000000]
java.lang.Thread.State: RUNNABLE
Locked ownable synchronizers:
- None
"Signal Dispatcher" daemon prio=9 tid=7ffa650ed000 nid=0x108e76000 runnable [00000000]
java.lang.Thread.State: RUNNABLE
Locked ownable synchronizers:
- None
"Surrogate Locker Thread (Concurrent GC)" daemon prio=5 tid=7ffa650ec000 nid=0x108d73000 waiting on condition [00000000]
java.lang.Thread.State: RUNNABLE
Locked ownable synchronizers:
- None
"Finalizer" daemon prio=8 tid=7ffa6280e000 nid=0x108ab1000 in Object.wait() [108ab0000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <7dee000f0> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:118)
- locked <7dee000f0> (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)
Locked ownable synchronizers:
- None
"Reference Handler" daemon prio=10 tid=7ffa6280d000 nid=0x1089ae000 in Object.wait() [1089ad000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <7dee00108> (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 <7dee00108> (a java.lang.ref.Reference$Lock)
Locked ownable synchronizers:
- None
"VM Thread" prio=9 tid=7ffa62808800 nid=0x1088ab000 runnable
"Gang worker#0 (Parallel GC Threads)" prio=9 tid=7ffa65002000 nid=0x1046a5000 runnable
"Gang worker#1 (Parallel GC Threads)" prio=9 tid=7ffa65002800 nid=0x1047a8000 runnable
"Gang worker#2 (Parallel GC Threads)" prio=9 tid=7ffa65003000 nid=0x1048ab000 runnable
"Gang worker#3 (Parallel GC Threads)" prio=9 tid=7ffa65004000 nid=0x1049ae000 runnable
"Concurrent Mark-Sweep GC Thread" prio=9 tid=7ffa6507f000 nid=0x108551000 runnable
"VM Periodic Task Thread" prio=10 tid=7ffa65101000 nid=0x109282000 waiting on condition
"Exception Catcher Thread" prio=10 tid=7ffa65001800 nid=0x1014ce000 runnable
JNI global references: 1185
РЕДАКТИРОВАТЬ : Забыли последнеечасть:
JNI global references: 1127
Heap
par new generation total 19136K, used 18399K [7bae00000, 7bc2c0000, 7c0130000)
eden space 17024K, 95% used [7bae00000, 7bbde7f80, 7bbea0000)
from space 2112K, 100% used [7bbea0000, 7bc0b0000, 7bc0b0000)
to space 2112K, 0% used [7bc0b0000, 7bc0b0000, 7bc2c0000)
concurrent mark-sweep generation total 124636K, used 91349K [7c0130000, 7c7ae7000, 7fae00000)
concurrent-mark-sweep perm gen total 32468K, used 19605K [7fae00000, 7fcdb5000, 800000000)