Deadlock detection in hprof file

Questions about YourKit Java Profiler
Post Reply
gpo
Posts: 3
Joined: Wed Oct 22, 2014 5:21 pm

Deadlock detection in hprof file

Post by gpo »

Hello,

Is it possible to use automatically detect deadlocks in HPROF snapshots?

Thanks,
George
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: Deadlock detection in hprof file

Post by Anton Katilin »

Hi George

No.

Although HPROF may contain stack traces of running threads at the moment of its creation, there is no information about monitors which is essential for deadlock detection.

Best regards,
Anton
gpo
Posts: 3
Joined: Wed Oct 22, 2014 5:21 pm

Re: Deadlock detection in hprof file

Post by gpo »

Anton Katilin wrote:Hi George

No.

Although HPROF may contain stack traces of running threads at the moment of its creation, there is no information about monitors which is essential for deadlock detection.

Best regards,
Anton
Hello Anton,

Thank you for your answer. I also have thread dumps taken with the jstack tool. Does YJP support those? if it does, can they be used for automatic deadlock detection? If not, do you know if there's anything else I can do that would help me identify a deadlock without having to attach to the running process?

Thanks.

Best regards,
George
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: Deadlock detection in hprof file

Post by Anton Katilin »

The profiler does not load jstack output because this makes no sense: jstack detects deadlocks by itself, and its output does not require any further processing. It's already a human readable text with all necessary detail.

http://docs.oracle.com/javase/7/docs/we ... gloop.html
identify a deadlock without having to attach to the running process
If you mean without attaching the profiler agent, please use jstack.
Or call the API directly, for example:
http://stackoverflow.com/questions/3958 ... mp-via-jmx
gpo
Posts: 3
Joined: Wed Oct 22, 2014 5:21 pm

Re: Deadlock detection in hprof file

Post by gpo »

Got it. Thank you for being helpful and for all your answers Anton.
Post Reply