I recently ran across a problem debugging a memory leak that produced a .PHD heapdump file on IBM's Java5 JVM. The verbose gc output clearly indicated the heap was exhausted, but the PHD file that was created when the OutOfMemoryError occured only showed 68Mb of objects in a 256Mb heap. Where were the missing objects and bytes? As it turns out, there is a bug in the current (as of this writing) PHD dump file writer that can incorrectly report the size of some non-primitive arrays. Luckily, you can workaround this problem by enabling the old style .TXT file heap dump file (if your heap analysis tool, like the excellent Heap Analyzer can accept them).
The JVM option for getting the .TXT format heap dumps is: -Xdump:heap:opts=CLASSIC
This problem should be corrected in IBM Java5 SR7.
Brian Martin[Read More]
News and Thoughts from the WebSphere Extended Deployment Senior Architecture Team
with Tags: java X