sheki
sheki

Reputation: 9359

JHAT cannot analyze a memory dump

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.

Upvotes: 4

Views: 2836

Answers (2)

kevinarpe
kevinarpe

Reputation: 21309

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.

Upvotes: 0

Matt Ball
Matt Ball

Reputation: 359906

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

Upvotes: 4

Related Questions