Operating System - HP-UX
1819791 Members
3276 Online
109607 Solutions
New Discussion юеВ

HPJmeter NullPointerException on hprof.txt files

 
SOLVED
Go to solution
David A. Citron
Occasional Advisor

HPJmeter NullPointerException on hprof.txt files

I'm attempting to use HPJMeter 3.1.00.00 to read an hprof.txt file created with the Sun Java6 JVM using the following flags:

-agentlib:hprof=cpu=times,thread=y,cutoff=0,format=a,file=someFile.hprof.txt

HPJmeter fails to read the resultant file with the following exception:

java.lang.NullPointerException
at com.hp.jmeter.f.jb.a(Unknown Source)
at com.hp.jmeter.f.a.a(Unknown Source)
at com.hp.c.a.j.z.run(Unknown Source)
Exception in thread "HPeprofDataFileReaderThread" java.lang.AssertionError: null pointer exception from loader
at com.hp.jmeter.f.a.a(Unknown Source)
at com.hp.c.a.j.z.run(Unknown Source)

According to the documentation, this scenario should be supported, no? Am I missing something? Thanks!
18 REPLIES 18
Dennis Handly
Acclaimed Contributor

Re: HPJmeter NullPointerException on hprof.txt files

If you have a support contract you'll need to contact the Response Center for HPJmeter questions.
David A. Citron
Occasional Advisor

Re: HPJmeter NullPointerException on hprof.txt files

Really? Even though HPjmeter is a free product a support contract is required to discuss a potential bug?
Jeff Schussele
Honored Contributor

Re: HPJmeter NullPointerException on hprof.txt files

Hi David,

I believe that what Dennis is telling you is that if (and you should) have a HP SW support contract on the stock OS delivered with the system then you should draw upon that resource. It's not necessary to have a support contract on HPJmeter specifically.

This of course assume that the error is occuring on an HP server. If this is occurring on a Sun system then the ball is in their court.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
David A. Citron
Occasional Advisor

Re: HPJmeter NullPointerException on hprof.txt files

Thanks. I'm not currently using HPjmeter on an HP system and do not have a support contract.

HPjmeter is an excellent tool for analyzing "-agentlib:hprof" output files on *any* system and I've had success with it in the past on HP-UX and elsewhere.

However, HPjmeter itself is emitting the above exception during the initial parsing of the *.hprof.txt file output by a variety of JVMs that I currently have access to:

- JRockit 1.5.0_14/Windows
- Sun 1.5.0_18/Windows
- Sun 1.6.0_03/Solaris
- Sun 1.6.0_13/Windows

I would hate to give up on HPjmeter but I'm not sure how to proceed. Since the source is not provided and the bytecode is obfuscated, it's hard to tell what the exact cause of the error is.

Any help would be greatly appreciated!

Thanks,
Dave
Jeff Schussele
Honored Contributor

Re: HPJmeter NullPointerException on hprof.txt files

Well...my next step would be to contact my Sun SW contacts & inquire as to whether you are up to date on OS patches for this particular OS & 3rd party SW. Also is your Java version where it should be?
Since this is Java I can't see them wanting to charge you for support on a "free" product.
But it can't hurt to possibly getting an account (free) on the HP ITRC (Internet Tech Resouce Center - www.itrc.hp.com) and dropping a question to HP directly or to the excellent forum they host.
I can personally vouch for the top-notch quality of the talent you can find there.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
David A. Citron
Occasional Advisor

Re: HPJmeter NullPointerException on hprof.txt files

Isn't this that forum?

Further, I can't see how to submit a question without a support contract number. What am I missing?

Finally, I can't see how OS patch level would affect this particular issue. I have a plain text file that's supposed to be readable by the standalone HPjmeter analysis tool, and the tool is failing to read the file.

Sorry if I'm not being clear...

Thanks!
Dave
Jeff Schussele
Honored Contributor

Re: HPJmeter NullPointerException on hprof.txt files

Uhhhh...yeah.....NEED MORE COFFEE &>0
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Dennis Handly
Acclaimed Contributor

Re: HPJmeter NullPointerException on hprof.txt files

>Even though HPjmeter is a free product a support contract is required to discuss a potential bug?

That's correct, a HP-UX support contract. Unless there is a feedback link where you downloaded it.

>I can't see how OS patch level would affect this particular issue.

It may prevent the original problem from occurring? ;-)
Or the hprof.txt may look different?
David A. Citron
Occasional Advisor

Re: HPJmeter NullPointerException on hprof.txt files

Ok, well, we're not running HP-UX and do not have a support contract.

Dennis: I think you are overlooking one critical detail in my original post: I'm trying to use HPjmeter to analyze a *performance profiling* hprof output from the JVM. The JVM is *not* crashing. I'm instructing the JVM to create the profiling output on purpose using the "-agentlib" arguments I detailed in my initial post.

I cannot see how the format of that output would be affected by any factors external to the JVM itself. The fact that HPjmeter cannot read this file seems to indicate that either:

1) there's a bug in HPjmeter
or
2) the Sun JVM is not supported by HPjmeter

Since I have had succes in a past life using HPjmeter to read performance profiling output from the Sun JVM, I feel that there must be some bug in HPjmeter that's tripping it up while parsing my current output.

However, since HPjmeter does not come with source code, and since the exception that HPjmeter is throwing is not helpful (see the original post) I do not see how I can proceed without help from either HP or from another user who has encountered and solved this issue. Hence my original post.

The only support link on the HPjmter page that's linked from http://www.hp.com/go/java (the download location) indicates that a support contract is required, so does that mean that the product is provided "as-is" to the rest of us?

Is HP really only in bugs in HPjmeter that are discovered by people who happen to have support contracts for another HP product?

Thanks!
Dave
Dennis Handly
Acclaimed Contributor

Re: HPJmeter NullPointerException on hprof.txt files

>we're not running HP-UX and do not have a support contract.

Then as you said, as-is.

>I think you are overlooking one critical detail in my original post:

Not really, just waving my hands. :-)

>1) there's a bug in HPjmeter

Most likely. Or a user error that is hidden by that NullPointerException.

>so does that mean that the product is provided "as-is" to the rest of us?

Yes.

>Is HP really only in bugs in HPjmeter that are discovered by people who happen to have support contracts for another HP product?

(You have some verbs missing?)
Yes, you must have a HP-UX support contract.
Filip Stachowiak
New Member

Re: HPJmeter NullPointerException on hprof.txt files

Hi David.

Did you compare files generated by different JVMs? Maybe the format is different, that's why parser throws nullpointer?
David A. Citron
Occasional Advisor

Re: HPJmeter NullPointerException on hprof.txt files

Filip,

>Did you compare files generated by different JVMs? Maybe the format is different, that's why parser throws nullpointer?

Unfortunately the last time HPjmeter worked for me was on a previous job and I do not have access to those resources any more.

I would assume that, yes, there's something about the format emitted by the current Sun JVM that HPjmeter is not expecting, but given that the exception is so unhelpful, I'm not sure where to start.

Thanks,
Dave
JZ2
Advisor
Solution

Re: HPJmeter NullPointerException on hprof.txt files

Hi David,

I work on HPjmeter, and I took a look at the problem that you reported. It is indeed a bug in HPjmeter 3.1, and we fixed it a while ago in our development stream. The fix is expected to ship in our next release, which is not too far away.

In the meantime, there is a workaround that you can use. The parser is failing because there is no HEAP DUMP section in the hprof file. If you add "heap=dump" to your options, then HPjmeter 3.1 can parse the file successfully. Once the next version of HPjmeter ships, the heap=dump option will not be necessary.

Jeff
David A. Citron
Occasional Advisor

Re: HPJmeter NullPointerException on hprof.txt files

Jeff,

> add "heap=dump" to your options

Beautiful! That did the trick! Thank you so much for speaking up on behalf of the HPjmeter team--you guys write the single best (free!) hprof analysis tool I've seen and I was hoping I wouldn't have to give up on it :-)

The only thing that would be better is if HP could open-source the tool, but I understand if there are corporate/legal restrictions to doing so.

Thanks again!
Dave
JZ2
Advisor

Re: HPJmeter NullPointerException on hprof.txt files

David,

Thanks for letting us know that you like HPjmeter. I'm glad that the workaround will help you until our next release is available. If you have any suggestions for HPjmeter, feel free to email them to java-tools-support@hp.com

If you have any problems to report in the future (I hope not), you can enter them here or email them to us.

Jeff
Dennis Handly
Acclaimed Contributor

Re: HPJmeter NullPointerException on hprof.txt files

>Beautiful! That did the trick!

I'm glad Jeff was able to give you workaround after I sent him a pointer to this thread.
JZ2
Advisor

Re: HPJmeter NullPointerException on hprof.txt files

Just following up - HPjmeter 4.0 was released in May 2009 and contains the fix for this problem.
David A. Citron
Occasional Advisor

Re: HPJmeter NullPointerException on hprof.txt files

I can confirm that with version 4.0.00 I no longer see this bug.

Thank you so much for continuing development on this invaluable tool!

-Dave