5 Replies Latest reply on Jul 12, 2002 11:06 AM by 843798

    Hat tool for -Xrunhprof can't find Stack # 0

    843798
      I'm trying to track down an apparent memory leak in a server application.

      I'm using jdk 1.4.0 on Solaris 2.7-sparc with
      Java HotSpot(TM) Server VM (1.4.0-b92 mixed mode).

      After letting the program run for a while generating binary profiling output,
      I stop it and grab the output file. When loading the file with hat, I get
      the following error:

      ./hat ~/java.hprof
      Started HTTP server on port 7000
      Reading from /home/lenox/java.hprof...
      Dump file created Thu Feb 28 14:03:28 CST 2002
      java.io.IOException: Stack trace not found for serial # 0
      at hat.parser.HprofReader.getStackTraceFromSerial(HprofReader.java:612)
      at hat.parser.HprofReader.readArray(HprofReader.java:778)
      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 reason I had downloaded hat was because I couldn't find TRACE 0 in the output
      generated from heap=all. Here is the top of the SITES portion of the text version:

      HEAP DUMP END
      SITES BEGIN (ordered by live bytes) Thu Feb 28 09:33:57 2002
      percent live alloc'ed stack class
      rank self accum bytes objs bytes objs trace name
      1 44.79% 44.79% 13414880 1144 13414880 1144 0 [I
      2 4.37% 49.16% 1309216 326 4670608 1163 17135 [I
      3 2.19% 51.34% 654608 163 2546144 634 18786 [I
      4 1.28% 52.62% 382976 1408 1146752 4216 17170 [B


      The formatting is screwed up now, but it basically says that
      whatever is creating 13MB of int arrays can be found in stack trace
      0. Well, maybe I'm stupid, but there just isn't a "stack trace 0" that
      I can find. The others in the listing exist as expected.


      Any Ideas?

      Thanks
      Mike Lenox