Reputation: 79
I am new to java programming, found a process continuously consuming ~100% cpu.
And here is the pstack of the same thread.
Thread 99 (Thread 0x7f3ea8121700 (LWP 7133)):
#0 0x000000350920e82d in read () from /lib64/libpthread.so.0
#1 0x00007f3eb5245431 in JVM_Read () from /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.191.x86_64/jre/lib/amd64/server/libjvm.so
#2 0x00007f3eb46c1b57 in ?? () from /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.191.x86_64/jre/lib/amd64/libjava.so
#3 0x00007f3ead08f4c6 in ?? ()
#4 0x00000006c5ebc440 in ?? ()
#5 0x0000000000000000 in ?? ()
What measures can be taken to stop consuming CPU?
Thanks in advance.
Upvotes: 1
Views: 60
Reputation: 44970
JVM_Read
implies that data is read from a file descriptor into a char array. This suggests that whatever is running on JVM is busy doing actual work.
It would be more practical to either take and inspect a thread dump (kill -3 <PID>
) or read the program source code. There could be other factors involved e.g. background GC threads.
Upvotes: 0