From the course: Java Concurrency Troubleshooting: Latency and Throughput
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Identify blocked threads in thread dumps - Java Tutorial
From the course: Java Concurrency Troubleshooting: Latency and Throughput
Identify blocked threads in thread dumps
- [Teacher] So you've captured a couple of thread dumps. Remember, one thread dump, usually isn't any good, but now what? Your department is looking at you to figure out why loading a page is taking a long time or something. First, you'll need to understand some of the key pieces of information in a thread dump. So, in the thread dump, you can find the name of the thread, it's ID, it's daemon status, the thread ID according to the operating system which is separate from its ID within the JVM, it status, the timing parameter that has the CPU and the elapsed time. Fun fact, this was contributed to the OpenJDK by the group over at SAP. So how can you use this to troubleshoot a thread dump? At the most basic level, you want to be sure that the word blocked isn't anywhere in any of the thread dumps you have. Here's why. Threads in Java have a couple of statuses, but for the purposes of troubleshooting latency and…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
(Locked)
Find the source of a blockage4m 46s
-
(Locked)
Collect thread dumps5m 41s
-
(Locked)
Challenge: Find the sleeping method1m 4s
-
(Locked)
Solution: Find the sleeping method3m 27s
-
(Locked)
Identify blocked threads in thread dumps4m 46s
-
(Locked)
View blocked threads with Java Mission Control6m 20s
-
(Locked)
View blocked threads with Java Flight Recorder5m 43s
-
(Locked)
Microbenchmarks in Java with JMH7m 53s
-
(Locked)
Challenge: Run JMH benchmarks and compare28s
-
(Locked)
Solution: Run JMH benchmarks and compare2m 58s
-
(Locked)
-