JHAT cannot analyze a memory dump
-
13-10-2019 - |
Question
I have a Memory Dump file and JHAT gives the following message and I cannot analyze anything (as no data is displayed.
Resolving 0 objects...
WARNING: hprof file does not include java.lang.Class!
WARNING: hprof file does not include java.lang.String!
WARNING: hprof file does not include java.lang.ClassLoader!
Does this mean the hprof file is incomplete or corrupt?
I am using
-XX:+HeapDumpOnOutOfMemoryError"
option in my tomcat.
Solution
I just came across this same issue with my own heap dump.
- jhat shows the warnings you describe, and there's no useful data displayed
- Eclipse MAT complains about a
NullPointerException
- VisualVM can't open the heap dump file at all
It looks like this happens when there is not enough disk space at the time that the heap is dumped, so the file is indeed incomplete/corrupt.
http://forums.oracle.com/forums/thread.jspa?threadID=1175621&tstart=135
OTHER TIPS
I have the same problem today. To clarify, I am using the option heap=sites
which is different than a memory dump. I also get the same messages from jhat
and jvisualvm
. It is possible that jhat
does not support reading HPROF
files created by heap=sites
mode.