This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Generate heap dump for application running on JRockit Release 27 JVM

 
Jacob Tom
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

We are getting
java.lang.outofmemory
issues in our production application running on BEA Jrockit JVM Release 27. This release of the JVM does not seem to support heap diagnostics options which can be used to generate heap dumps on occurrence of outofmemory error.

Could anyone please advise what other options can be used to generate heap dump for applications running on Jrockit R27 on occurrence of
java.lang.outofmemory
error?

Jrockit provides JRCMD utility which generates a heap diagnostics report but that is not of the same format as the typical HPROF format of heap dumps.

Regards,
Jacob
 
anandraj tadkal
Ranch Hand
Posts: 98
Oracle Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can try using -XXdumpFullState argument for JRockit JVM R27.5.

With this option we will save all the process state including the heap.

http://docs.oracle.com/cd/E13150_01/jrockit_jvm/jrockit/jrdocs/refman/optionXX.html

If you want to read the JRA recording please refer the below post.

http://weblogic-wonders.com/weblogic/2010/12/07/understanding-jrockit-runtime-analyzer-jra-recordings/

 
Jacob Tom
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks AnandRaj.

-XXdumpFullState - I think I would have to run it in default mode of "large" to get heap dump. As per documentation, it needs considerable disk space. Heap size for the JVM process is 1 GB. Would the size of the generated heap dump be around 1 GB?

Also this option is said to create dump only when "JVM" crashes. To use -XXdumpFullState then, would I also have to set "-XX:+CrashOnOutOfMemoryError" or "-XX:+ExitOnOutOfMemoryError"? Niether of the these 2 options seem to be supported for R27.1.

Regards,
Jacob
 
Ramakanta Sahoo
Ranch Hand
Posts: 256
Fedora Firefox Browser Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no support for generating HPROF heap dumps before R28. The only option you have if you absolutely need HPROF heap dumps is to upgrade to R28.

Thus, for instance, there is no way to get HPROF dumps on JRockit (any version) if using 1.4.2 classes, as JRockit R28 supports only JDK 5.0 and 6.

In latest version you can use

JRCMD <pid> heap_diagnostics
jrcmd <pid> help print_object_summary
%JROCKIT_HOME%\bin\jrcmd <pid of target JVM> hprofdump filename=<full path name to the target dump file name>

JRA or JFR are pretty cool tools, but these are NOT the tools of choice to troubleshoot an OutOfMemoryError condition.
hprofdump: This feature dumps some image of the heap at one point in time, enabling remote or later analysis of the memory leak.From this dump, that you can analyze using tools such as "jhat" (provided with the JVM) or "Eclipse MAT" (where MAT stands for "Memory Analyzer Tool"), you can retrieve why a particular set of objects remain live in the heap.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic