Error Opening heap dump

5.2k views Asked by At

I'm unable to open a heap dump using the standalone eclipse memory analyzer, or visualVM. I've tried two different hprof files. VisualVM just hangs at loading heap dump, and eclipse memory analyzer gives me the below error.

Error opening heap dump 'java_pid15751.hprof'. Check the error log for further details.
Error opening heap dump 'java_pid15751.hprof'. Check the error log for further     details.
Not a HPROF heap dump (java.io.IOException)
Not a HPROF heap dump

I'm using windows 7 32 bit. The application server is on jboss 7.1.1 with the java version below. OpenJDK Runtime Environment (IcedTea6 1.10.6) (rhel-1.43.1.10.6.el6_2-x86_64) OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)

2

There are 2 answers

0
SwimJim On

These heapdumps were taken due to out of memory issues in JBoss, where automatic heaps were taken. I used jmap to take one, and it opened fine. I'm thinking the heap dump was corrupted for some reason.

0
Ram Lakshmanan On

I suspect your heap dump file is corrupted. How did you capture the heap dump file? This article outlines several different options to capture heap dumps. 'jmap' tool that is present in JDK is a great tool to capture heap dumps. You can invoke it by passing following command:

  jmap -dump:format=b,file=<heap-dump-file-path> <process-id>

where
heap-dump-file-path: is the file path where heap dump will be written in to.
process-id: is the Java Process Id, whose heap dump should be captured

Example:
jmap -dump:format=b,file=/opt/tmp/heapdump.bin 37320