If I try to use the dump with hat, it will fail with an EOFException:
Read heap sub-record type 34 at position 0x00271311
java.io.EOFException
at java.io.DataInputStream.readInt(DataInputStream.java:398)
at hat.parser.HprofReader.readID(HprofReader.java:476)
at hat.parser.HprofReader.readArray(HprofReader.java:852)
at hat.parser.HprofReader.readHeapDump(HprofReader.java:432)
at hat.parser.HprofReader.read(HprofReader.java:222)
at hat.parser.Reader.readFile(Reader.java:91)
at hat.Main.main(Main.java:135)
the problem is some garbage randomly inserted into the stream just after
the 0x22 (OBJ_ARRAY) header:
00271300 00 00 11 7C 40 00 11 7B 58 00 12 87 C0 00 12 88 ...|@..{X..À..À
00271310 40 22 01 0B 4C 9B D0 00 00 00 07 00 4D 52 F8 5B @"..L.Ð.....MRø[
OBJ_ARRAY --^^ ^^-- start of garbage
00271320 5B 43 02 0B 4C 9B D0 00 00 00 10 00 00 03 1E 00 [C..L.Ð.........
00271330 10 C6 48 00 00 00 00 00 4D 52 F8 00 10 C6 68 00 .ÆH.....MRø..Æh.
end of gargabe -----^^ ^^-- continuation of the header
00271340 00 00 01 00 00 00 66 00 10 C6 48 00 10 C6 A8 00 ......f..ÆH..ƨ.
00271350 10 C9 08 00 10 C9 68 00 10 C9 C8 00 10 CA 28 00 .É...Éh..ÉÈ..Ê(.
00271360 10 CA 88 00 10 CA E8 00 10 CB 48 00 10 CB A8 00 .Ê...Êè..ËH..˨.
00271370 10 CC 08 00 10 CC 68 00 10 CC C8 00 10 CD 28 00 .Ì...Ìh..ÌÈ..Í(.
Note: only some of the OBJ_ARRAY headers are broken, there were several
correct OBJ_ARRAY records in the stream before this failure.
There are also more failures after this point.
I've reproduced the problem on a simple application with both 1.4-b92 and 1.4.1-b12 JDKs. With 1.3.1 JDK it works correctly.
A colleague of mine have also reported it on Linux
I'm usually using hprof with depth=0, that is why there is always
00 00 00 01 stack trace reference in the dumps but I've reproduced the problem
also without depth=0 hprof option
Read heap sub-record type 34 at position 0x00271311
java.io.EOFException
at java.io.DataInputStream.readInt(DataInputStream.java:398)
at hat.parser.HprofReader.readID(HprofReader.java:476)
at hat.parser.HprofReader.readArray(HprofReader.java:852)
at hat.parser.HprofReader.readHeapDump(HprofReader.java:432)
at hat.parser.HprofReader.read(HprofReader.java:222)
at hat.parser.Reader.readFile(Reader.java:91)
at hat.Main.main(Main.java:135)
the problem is some garbage randomly inserted into the stream just after
the 0x22 (OBJ_ARRAY) header:
00271300 00 00 11 7C 40 00 11 7B 58 00 12 87 C0 00 12 88 ...|@..{X..À..À
00271310 40 22 01 0B 4C 9B D0 00 00 00 07 00 4D 52 F8 5B @"..L.Ð.....MRø[
OBJ_ARRAY --^^ ^^-- start of garbage
00271320 5B 43 02 0B 4C 9B D0 00 00 00 10 00 00 03 1E 00 [C..L.Ð.........
00271330 10 C6 48 00 00 00 00 00 4D 52 F8 00 10 C6 68 00 .ÆH.....MRø..Æh.
end of gargabe -----^^ ^^-- continuation of the header
00271340 00 00 01 00 00 00 66 00 10 C6 48 00 10 C6 A8 00 ......f..ÆH..ƨ.
00271350 10 C9 08 00 10 C9 68 00 10 C9 C8 00 10 CA 28 00 .É...Éh..ÉÈ..Ê(.
00271360 10 CA 88 00 10 CA E8 00 10 CB 48 00 10 CB A8 00 .Ê...Êè..ËH..˨.
00271370 10 CC 08 00 10 CC 68 00 10 CC C8 00 10 CD 28 00 .Ì...Ìh..ÌÈ..Í(.
Note: only some of the OBJ_ARRAY headers are broken, there were several
correct OBJ_ARRAY records in the stream before this failure.
There are also more failures after this point.
I've reproduced the problem on a simple application with both 1.4-b92 and 1.4.1-b12 JDKs. With 1.3.1 JDK it works correctly.
A colleague of mine have also reported it on Linux
I'm usually using hprof with depth=0, that is why there is always
00 00 00 01 stack trace reference in the dumps but I've reproduced the problem
also without depth=0 hprof option
- duplicates
-
JDK-4747238 HPROF: 1.4 hprof dump doesnt work with HAT
- Closed