Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6215480

HPROF: broken when used with HAT, starting with 1.5.0_01, Missing thread dump

    Details

    • Subcomponent:
    • Introduced In Build:
      1.5
    • Introduced In Version:
      5.0
    • Resolved In Build:
      b03
    • CPU:
      generic
    • OS:
      generic

      Backports

        Description

        Is Hat working with java 1.5
        Posted on
        http://forum.java.sun.com/thread.jspa?threadID=584157&tstart=0


        Author: astesana Jan 5, 2005 3:07 AM
        Hello,

        I'm trying to have HAT 1.1 working ... and it's a nightmare.
        I've tried with various jdk version, various options, various classes ... and I always have the same exception running HAT :

        java.io.IOException: Thread 200003 not found for JNI local ref
        at hat.parser.HprofReader.getThreadObjectFromSequence(HprofReader.java:5
        77)
        at hat.parser.HprofReader.readHeapDump(HprofReader.java:408)
        at hat.parser.HprofReader.read(HprofReader.java:221)
        at hat.parser.Reader.readFile(Reader.java:90)
        at hat.Main.main(Main.java:149)

        Here is the very complex program I use to make my test ;-)
        public class Test {
        public static void main(String[] args) {
        System.out.println ("Hello world");
        }
        }

        I first run the Test class with jdk 1.5.0.01 using this command line :
        java -agentlib:hprof=file=dump.hprof,format=b Test

        I (try to) run hat with the following :
        java -jar hat.jar c:/chezjma/eclipseWorkspace3.0/fourreTout/dump.hprof

        and obtain the exception mentionned previously.

        I've also tried with java 1.4.2.05 ... and obtain the same result. I work on a Windows XP platform.

        Does somebody already succeed in the HAT 1.1 quest ?
        What did I do wrong ?

        Thank's for your help.
         
        Re: Is Hat working with java 1.5
        Author: timbell Jan 6, 2005 9:24 PM (reply 1 of 4)
        First of all, for anyone following along, the Heap Analysis Tool (HAT) is available here:
        https://hat.dev.java.net/

        There are some open reports on these HAT problems. Check the HAT issue list (available at the URL listed above) for more information. Look for "Issue tracker" on the left sidebar.
         
        Re: Is Hat working with java 1.5
        Author: astesana Jan 7, 2005 1:25 AM (reply 2 of 4)
        Thank's for your answer.

        I've already had a look on these issues. There are two currently opened.
        The first one says "I have problems using HAT under Suse Linux and JDK 1.3/1.4, but it works on windows".
        The second one says "I have problem with jdk 1.5 ONLY when I try to compare two dumps". Reading that, I was expecting HAT could display a very simple heap dump.

        I can't imagine that despite the jdc december communication, HAT is not working at all with jdk 1.5. I migth do something wrong :-(
         
        Re: Is Hat working with java 1.5
        Author: jdcamity Jan 8, 2005 6:03 AM (reply 3 of 4)
        Hi,

        I get an error like HPROF file does not have java.lang.Class
        -Null Pointer Exception.

        Trying with J2SE1.5_0_1 version, HAT 1.1 on Windows XP.

        Pl get back if someone ever faced similar error.

        Thanx-Srila
         
        Re: Is Hat working with java 1.5
        Author: kellyohair Jan 8, 2005 1:22 PM (reply 4 of 4)
        This looks like a regression in 1.5.0_01. This thread has exited or is in the process of exiting, so the dump is reflecting a strange situation where the thread block data still seems to reference the thread, but the thread itself no longer exists. I'll investigate this and file a bug asap.
        Thanks for the post.

        The hprof format=b output has always been experimental, but all indications early on with 1.5 showed that HAT was working ok with it in most cases. I've been trying to bring in HAT as part of the J2SE (as an unsupported tool) if for no other reason than to run some HAT tests on a regular basis and make sure things like this don't happen.

        I don't think this problem is related to Windows, it's happening on Solaris too. It probably has more to do with how fast threads can exit than anything else.
        ###@###.### 2005-1-08 21:36:23 GMT

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  ohair Kelly Ohair (Inactive)
                  Reporter:
                  ohair Kelly Ohair (Inactive)
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Imported:
                    Indexed: