.hprof file
I am running the 64-bit version of 1.5.0_11-b03 on Solaris 8. I have the -XX:+HeapDumpOnOutOfMemoryError option set on, and recently, our production system experienced an OutOfMemory Error. So now I have a 1.8 G .hprof file. HAT will not read the file, regardless of what options I use with it, telling me "java.io.IOException: I'm sorry, but I can't deal with an identifier size of 8. I can only deal with 4." - I am assuming that the problem here has to do with the 64-bit size of the JVM in use, as I've used HAT earlier with a 32-bit JVM. However, I would really like to view this file and see if I can figure out what caused the problem, but the file is binary, and I don't know of any other tool that can read a binary .hprof file - or convert from binary to ASCII, for that matter. Does anyone know of such a tool?
Thanks!
Lynn.
[858 byte] By [
gmhollera] at [2007-11-26 23:46:54]

# 2
So the problem is that the version of HAT I have (1.1) doesn't "do" 64-bit .hprof files? Can I get jhat anywhere other than in JDK6 (it was like pulling teeth to get our Solaris system moved to 1.5!)?
However, I can probably download JDK6 to my PC - if I do that, can I read the .hprof file that was generated by another server?
# 3
Correct, the object ID is 64-bits in dumps generated by 64-bit VMs. Also, the original HPROF format limited heap dumps to 4GB which isn't sufficient for large numbers. The format was upgraded to address these issues and jhat (which is HAT + bugs fixes + OQL) handles the updated format. You don't need to run the application with jdk6 to use jhat - just install it into your own directory). You can also copy the dump to a PC and use it but if this PC is Windows 32-bit then beware that you are limited to 2GB of virtual memory and that might not be sufficient to open a multi-GB heap dump from your 64-bit server.
# 4
Thank you!!! I did not realize that I didn't need to run the application with jdk6! I put it in my own directory - and now I have jhat running on the Solaris system, which has jdk1.5.0_08 on it. It successfully resolved all 3.3 million objects in the dump - now I've got to see if I can figure out what it's telling me! Thanks again!!