java threadump significance of "waiting on condition"
Asked Answered
P

1

7

I have a threaddump of an app which showed 3 threads like below.

===============

"http-443-11" daemon prio=10 tid=0x00000000473bc800 nid=0x3590 waiting on condition [0x0000000061818000]
   java.lang.Thread.State: WAITING (parking)
    at sun.misc.Unsafe.park(Native Method)
    - parking to wait for  <0x00000007612a3880> (a java.util.concurrent.Semaphore$NonfairSync)

"http-443-4" daemon prio=10 tid=0x00000000451f6000 nid=0x243a waiting on condition [0x0000000055354000]
   java.lang.Thread.State: WAITING (parking)
    at sun.misc.Unsafe.park(Native Method)
    - parking to wait for  <0x00000007612a3880> (a java.util.concurrent.Semaphore$NonfairSync)

"http-443-7" daemon prio=10 tid=0x000000004602e000 nid=0x2974 waiting on condition [0x000000005e6e7000]
   java.lang.Thread.State: WAITING (parking)
    at sun.misc.Unsafe.park(Native Method)
    - parking to wait for  <0x00000007612a3880> (a java.util.concurrent.Semaphore$NonfairSync)

===============

What is the significance of the "waiting on condition []" ? What does the number in the [] signifiy ?

Piefer answered 26/11, 2013 at 13:9 Comment(0)
G
1

In the thread stack we can see that threads are daemon threads and are waiting for task to come. Since these threads are created on JVM startup , they dont get killed unless JVM exits or any non daemon thread i not running, thus they wait for tasks to come. Say Garbage collection thread is a daemoon thread which might not be running all the time, it could be in waiting state.

Gabriellia answered 26/11, 2013 at 13:16 Comment(1)
the 3 threads we see are daemon threads -- created by the Tomcat AppServer. these threads are NOT created on "JVM" startup., though.Piefer

© 2022 - 2024 — McMap. All rights reserved.