Skip to Main Content

Java HotSpot Virtual Machine

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

DestroyJavaVm Thread consumes 100% CPU Time

843811May 27 2003 — edited Jul 8 2003
Hi,

I have written a Java application that runs under Linux , listens to a socket and executes some commands periodically.
But sometimes , normaly after days or weeks , the application needs 100% CPU time (PID 6755).A threaddump shows that the DestroyJavaVM Thread is the cause.

How can i prevent this.
What does the DetroyJavaVM in detail and why is it running ?
Why consumes the DetroyJavaVM thread 100% CPU ?


thanks in advance

Mathias Dietz

--------------------------------------------------------------------------------
System:
Redhat Linux 8.0
4-way SMP Machine
Java 1.4.1_02


Full thread dump Java HotSpot(TM) Client VM (1.4.1_02-b06 mixed mode):

"Thread-57764" prio=1 tid=0x0x80ee6d8 nid=0x331f runnable [4ca96000..4ca96830]
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:183)
at java.io.BufferedInputStream.read(BufferedInputStream.java:201)
- locked <0x449171e0> (a java.io.BufferedInputStream)
at ssd.samba.endpoint.ConnectionThread.readLine(ConnectionThread.java:94)
at ssd.samba.endpoint.ConnectionThread.run(ConnectionThread.java:52)

"Thread-57739" prio=1 tid=0x0x8ccbfe0 nid=0x32ba runnable [4ca15000..4ca15830]
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:183)
at java.io.BufferedInputStream.read(BufferedInputStream.java:201)
- locked <0x44917440> (a java.io.BufferedInputStream)
at ssd.samba.endpoint.ConnectionThread.readLine(ConnectionThread.java:94)
at ssd.samba.endpoint.ConnectionThread.run(ConnectionThread.java:52)

"Thread-14701" prio=1 tid=0x0x84a5fb8 nid=0x4b6b runnable [4d403000..4d403830]
at java.io.FileInputStream.read(Native Method)
at ssd.util.ReadStream.run(ReadStream.java:37)


"Thread-14700" prio=1 tid=0x0x84a56f8 nid=0x4b6a runnable [4d382000..4d382830]
at java.io.FileInputStream.readBytes(Native Method)
at java.io.FileInputStream.read(FileInputStream.java:191)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:183)
at java.io.BufferedInputStream.read(BufferedInputStream.java:201)
- locked <0x449163f0> (a java.io.BufferedInputStream)
at ssd.util.ReadStream.run(ReadStream.java:37)

"process reaper" daemon prio=1 tid=0x0x84a5868 nid=0x4b68 runnable [4d301000..4d301830]
at java.lang.UNIXProcess.waitForProcessExit(Native Method)
at java.lang.UNIXProcess.access$1500(UNIXProcess.java:20)
at java.lang.UNIXProcess$2.run(UNIXProcess.java:127)

"SERVICE HANDLER" prio=1 tid=0x0x4d104050 nid=0x1a7e in Object.wait() [4d0b0000..4d0b0830]
at java.lang.Object.wait(Native Method)
- waiting on <0x449132f0> (a ssd.samba.endpoint.ServiceHandlerThread)
at java.lang.Object.wait(Object.java:426)
at ssd.samba.endpoint.ServiceHandlerThread.run(ServiceHandlerThread.java:41)
- locked <0x449132f0> (a ssd.samba.endpoint.ServiceHandlerThread)

"DestroyJavaVM" prio=1 tid=0x0x8051c10 nid=0x1a63 waiting on condition [0..bfffccfc]

"Thread-1" prio=1 tid=0x0x8197038 nid=0x1a6d runnable [4c994000..4c994830]
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:353)
- locked <0x44903460> (a java.net.PlainSocketImpl)
at java.net.ServerSocket.implAccept(ServerSocket.java:439)
at java.net.ServerSocket.accept(ServerSocket.java:410)
at ssd.samba.endpoint.ControlServer.waitForIncoming(ControlServer.java:184)
at ssd.samba.endpoint.ControlServer.run(ControlServer.java:100)

"Signal Dispatcher" daemon prio=1 tid=0x0x808c640 nid=0x1a6a waiting on condition [0..0]

"Finalizer" daemon prio=1 tid=0x0x8086400 nid=0x1a67 in Object.wait() [4c470000..4c470830]
at java.lang.Object.wait(Native Method)
- waiting on <0x448e2ee0> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:111)
- locked <0x448e2ee0> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:127)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)

"Reference Handler" daemon prio=1 tid=0x0x8085850 nid=0x1a66 in Object.wait() [41fbc000..41fbc830]
at java.lang.Object.wait(Native Method)
- waiting on <0x448e2e00> (a java.lang.ref.Reference$Lock)
at java.lang.Object.wait(Object.java:426)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:113)
- locked <0x448e2e00> (a java.lang.ref.Reference$Lock)

"VM Thread" prio=1 tid=0x0x8082610 nid=0x1a65 runnable

"VM Periodic Task Thread" prio=1 tid=0x0x808b210 nid=0x1a68 waiting on condition
"Suspend Checker Thread" prio=1 tid=0x0x808bbd8 nid=0x1a69 runnable

----------------------------------------------------------------------------------
Top output:
146 processes: 144 sleeping, 2 running, 0 zombie, 0 stopped
CPU0 states: 0.2% user, 0.3% system, 0.0% nice, 99.0% idle
CPU1 states: 0.5% user, 1.4% system, 0.0% nice, 97.0% idle
CPU2 states: 24.0% user, 75.4% system, 0.0% nice, 0.0% idle
CPU3 states: 0.0% user, 0.1% system, 0.0% nice, 99.4% idle
Mem: 513320K av, 463044K used, 50276K free, 0K shrd, 172948K buff
Swap: 1048568K av, 18712K used, 1029856K free 147688K cached

PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME COMMAND
6755 root 15 0 28284 24M 4368 S 99.9 4.8 1715m java
12944 root 15 0 35320 34M 8564 S 1.5 6.8 14:32 java
11247 root 15 0 1076 1076 784 R 1.5 0.2 0:00 top
1 root 15 0 480 472 424 S 0.0 0.0 0:09 init

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 5 2003
Added on May 27 2003
4 comments
3,703 views