0

We have an application runing on Ubuntu Server 12.04 and java.

java -version return :

java version "1.7.0_40"

Java(TM) SE Runtime Environment (build 1.7.0_40-b43)

Java HotSpot(TM) 64-Bit Server VM (build 24.0-b56, mixed mode

We have other applications with same technology but without problem.

Server informations : RAM: 2G OS: Ubuntu Server 12.04 Nb of CPU: 2

Application language is scala.

After running for a while, the JVM seems to sleep. One CPU continue to spin at 100%.

JVM options :

-Xms1g -Xmx1g -XX:+HeapDumpOnOutOfMemoryError -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintTenuringDistribution -XX:-DisableExplicitGC -XX:CMSFullGCsBeforeCompaction=1 -XX:+CMSClassUnloadingEnabled -XX:+CMSIncrementalMode -XX:MaxGCPauseMillis=1500 -XX:GCTimeRatio=9 -XX:CMSInitiatingOccupancyFraction=50 -XX:-UseGCOverheadLimit -XX:MaxHeapFreeRatio=60

With jstat -gcutil [PID], I have seen that FGC grow fast.

Do you have an idea for this problem ?

Thanks

Community
  • 1
  • 1
Loic
  • 1
  • 2
    **100% CPU usage** is **99.9% sign for heavy GC activity**... Also, 2G RAM for 2 cores? Seems substandard... Also, be sure to check heap dump to see what is on the heap, to be able to remedy the situation – ppeterka Oct 07 '13 at 12:09
  • And how anyone could actually help you here? There's no informations that can point out to a problem. [Should read this.](http://stackoverflow.com/help/on-topic) – Jonathan Drapeau Oct 07 '13 at 12:09
  • JIT comilation hooked in, or GC is working. Nothing wrong with that, it won't last for a long time. – David Hofmann Oct 07 '13 at 12:10
  • Are you running any heavy operation? Does it occur every time or under certain circumstances? – Sudarshan_SMD Oct 07 '13 at 12:19
  • I have analyzed heap dump and I see more java.util.concurrent.LinkedBlockingQueue under java.util.concurrent.ThreadPoolExecutor – Loic Oct 07 '13 at 12:34
  • When I have this problem, I have GC failure. And if not use this server and stand some time then I don't have this problem – Loic Oct 07 '13 at 12:35
  • You should paste your GC logs as well. – Steve Gury Oct 07 '13 at 23:30

1 Answers1

0

Do you have an idea for this problem ?

It could be any number of things. But (IMO) the most likely explanation is that you've got a bug in your application that manifests as an infinite loop.

Attach a debugger to the JVM. Or if you can't do that, send it the requisite signal to cause it to generate a Thread dump to the console output stream. Then analyse the dump to see if you can get any clues.

This is NOT the kind of problem where we can give you a magical answer. You will most likely need to figure it out for yourself, based on your knowledge of the application and your own hard work in analysing / debugging. (And the fact that this is Scala means that this could also be a bug in the Scala compiler or runtime.)

Stephen C
  • 698,415
  • 94
  • 811
  • 1,216
  • I have analyzed heap dump and I see more java.util.concurrent.LinkedBlockingQueue under java.util.concurrent.ThreadPoolExecutor – Loic Oct 07 '13 at 12:39
  • Well keep going. Next you need to work out why your code is spinning at that point. – Stephen C Oct 07 '13 at 12:41
  • Yes, I know that but I don't find. – Loic Oct 07 '13 at 12:46
  • jstack -l [PID] return : 2013-10-07 12:41:06 Full thread dump Java HotSpot(TM) 64-Bit Server VM (24.0-b56 mixed mode): "Attach Listener" daemon prio=10 tid=0x00007f5b2000d800 nid=0x659 waiting on condition [0x0000000000000000] java.lang.Thread.State: RUNNABLE Locked ownable synchronizers: - None "pool-9-thread-5" daemon prio=10 tid=0x00007f5b14016800 nid=0x514 waiting on condition [0x00007f5b0f0ef000] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) - parking to wait for <0x00000000cc20ebb8> (a – Loic Oct 07 '13 at 12:51