jhat's warning

Hi!

I captured the heap snapshot using Java 1.4.2 in Linux and open it

using Java 6 jhat in Windows.

I noticed the following warnings (and many of them) while opening the file:

WARNING: Stack trace not found for serial # 0

WARNING: Stack trace not found for serial # 0

. . . . . . .

Snapshot read, resolving...

Resolving 41350 objects...

WARNING: Failed to resolve object id 0x90d27509 for field array$B (signature L)

WARNING: Failed to resolve object id 0x50207609 for field

array$Ljava$lang$String (signature L)

WARNING: Failed to resolve object id 0x68e33d8d for field

array$Lorg$springframework$core$io$Resource (signature L)

WARNING: Failed to resolve object id 0x90d27509 for field array$B (signature L)

WARNING: Failed to resolve object id 0x68e33d8d for field

array$Lorg$springframework$core$io$Resource (signature L)

. . . . . . .

Chasing references, expect 8 dots........

Eliminating duplicate references........

Snapshot resolved.

Started HTTP server on port 7000

Server is ready.

What does the above warning means? Does this means the heap snapshot file is not usable?

[1225 byte] By [hezjinga] at [2007-11-27 5:51:24]
# 1

Was the heap snapshot captured using the jmap -heap option? This option is intended to recover a heap dump from a core file or hung process. The mechanism is uses cannot be guaranteed to produce a reliable heap dump as it can observe the memory and data structures in an inconsistent state.

Other options for 1.4.2 are to use the -XX:+HeapDumpOnOutOfMemory option to have the VM generate a heap dump when the out of memory error is thrown. Alternatively, run the application with jdk7 and use the jmap -dump option as this allows you to capture a heap snapshot at any time. I believe a future update of 1.4.2 will add an option to allow you generate a heap dump when ctrl-\ is pressed. It's already there in recent 1.4.2 updates but it's documented/supported. Another option for 1.4.2 is of course the HPROF profiling agent but that will cause overhead for the application.

alan.batemana at 2007-7-12 15:40:32 > top of Java-index,Core,Monitoring & Management...