I have a java server program that listens on unix sockets. At some point, the program just hang in there and did nothing. Here is output by sending -SIGQUIT to it.
Main thread is OK and sitting at "client=server.accept();", which is indicated by "at AnnieD.listenSocket(AnnieD.java:248)".
There is 1 connection which is indicated by "Thread-1". Though it is "runnable", it also shows it stops at line 647 as in "at ClientHandler.run(AnnieD.java:647)", which is
iByteRead=dis.read(bFrameType, 0, 1);
where
dis=new DataInputStream(client.getInputStream());
and "client" is socket to talk to a client.
So, my question is regarding this thread dump interpretation:
Does this mean that the server is waiting for data from client (though, ofcoz I am going to check if the client wrote any data to the socket at all later) ? But what are these daemons: "CompilerThread1", "CompilerThread2", "AdapterThread", and "Finalizer"? and what clue can be drawn from their status?
Thanks!
___________________Full thread dump Java HotSpot(TM) Server VM (1.5.0_11-b03 mixed mode):
"Thread-1" prio=1 tid=0x081df170 nid=0x2042 runnable [0x8cafe000..0x8cafefb0]
at org.lirc.socket.UnixSocketInputStream.nativeRead(Native Method)
at org.lirc.socket.UnixSocketInputStream.read(UnixSocketInputStream.java:60)
at java.io.DataInputStream.read(DataInputStream.java:134)
at ClientHandler.run(AnnieD.java:647)
at java.lang.Thread.run(Thread.java:595)
"Low Memory Detector" daemon prio=1 tid=0x08123bb0 nid=0x203d runnable [0x00000000..0x00000000]
"CompilerThread1" daemon prio=1 tid=0x081226d8 nid=0x203c waiting on condition [0x00000000..0x8d83a158]
"CompilerThread0" daemon prio=1 tid=0x08121628 nid=0x203b waiting on condition [0x00000000..0x8d8bafd8]
"AdapterThread" daemon prio=1 tid=0x08120548 nid=0x203a waiting on condition [0x00000000..0x00000000]
"Signal Dispatcher" daemon prio=1 tid=0x0811f668 nid=0x2039 runnable [0x00000000..0x00000000]
"Finalizer" daemon prio=1 tid=0x08116520 nid=0x2038 in Object.wait() [0x8da3e000..0x8da3f130]
at java.lang.Object.wait(Native Method)
- waiting on <0x91fbafa8> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
- locked <0x91fbafa8> (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=1 tid=0x08114e40 nid=0x2037 in Object.wait() [0x8dabf000..0x8dabffb0]
at java.lang.Object.wait(Native Method)
- waiting on <0x91f601a8> (a java.lang.ref.Reference$Lock)
at java.lang.Object.wait(Object.java:474)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
- locked <0x91f601a8> (a java.lang.ref.Reference$Lock)
"main" prio=1 tid=0x0805d460 nid=0x202e runnable [0xbfc8d000..0xbfc8dcd8]
at org.lirc.socket.UnixSocketImpl.nativeAccept(Native Method)
at org.lirc.socket.UnixSocketImpl.accept(UnixSocketImpl.java:99)
at org.lirc.socket.UnixServerSocket.accept(UnixServerSocket.java:83)
at AnnieD.listenSocket(AnnieD.java:248)
at AnnieD.main(AnnieD.java:381)
"VM Thread" prio=1 tid=0x08112900 nid=0x2036 runnable
"GC task thread#0 (ParallelGC)" prio=1 tid=0x08077d38 nid=0x2032 runnable
"GC task thread#1 (ParallelGC)" prio=1 tid=0x08078988 nid=0x2033 runnable
"GC task thread#2 (ParallelGC)" prio=1 tid=0x080795c0 nid=0x2034 runnable
"GC task thread#3 (ParallelGC)" prio=1 tid=0x0807a1f8 nid=0x2035 runnable
"VM Periodic Task Thread" prio=1 tid=0x08125150 nid=0x203e waiting on condition