Hi, I'm profiling a Java app (Java HotSpot(TM) 64-Bit Server VM; 1.6.0_45; 20.45-b01; mixed mode) on RHEL (2.6.18-194.32.1.el5) and YourKit is showing on the Threads tab a lot of red blocked threads. But in the bottom panel there are no stack traces - the [BLOCKED] threads just have java.lang.Thread.run(). VisualVM on the other hand shows the threads as idle, not blocked, most of the time. What is going on? Are these threads really blocked? Why won't it show me their stack traces? I can't make sense of what the Monitor Usage tab is telling me.
Thanks.
Stack traces of blocked threads not shown
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
Re: Stack traces of blocked threads not shown
Hello,
Please change the "Details:" level to "Full stacks" (it's in the right upper corner of the "Stack traces" tab.)
Best regards,
Anton
Please change the "Details:" level to "Full stacks" (it's in the right upper corner of the "Stack traces" tab.)
Best regards,
Anton
-
- Posts: 3
- Joined: Tue Nov 18, 2014 12:58 pm
Re: Stack traces of blocked threads not shown
Thanks Anton. My threads are now shown as BLOCKED on java.lang.Object.wait(long). But other threads are shown as WAITING on java.lang.Object.wait(long). What is the difference? It seems a bit misleading for it to tell me I have a load of threads blocked if they are just waiting. I thought I had a lock contention problem.
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
Re: Stack traces of blocked threads not shown
The thread statuses are reported by JVM. The profiler shows them as is.
Please use Monitors profiling to investigate thread contention:
http://www.yourkit.com/docs/java/help/m ... filing.jsp
Please use Monitors profiling to investigate thread contention:
http://www.yourkit.com/docs/java/help/m ... filing.jsp
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
Re: Stack traces of blocked threads not shown
Do you use the latest version of the profiler?