My java application stopped working . While looking into stack dump I found out that there are 28 threads which are waiting for a particular thread . I am using newSingleThreadScheduledExecutor at the start of application and stop it during shutdown of application.
I am not sure how to proceed from here . Is it the root cause of issue or am I missing something ?
"ForkJoinPool.commonPool-worker-29" #1326 daemon prio=5 os_prio=0 tid=0x00007ff8d8054000 nid=0x2644 waiting on condition [0x00007ff87154a000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000000804e10c8> (a java.util.concurrent.ForkJoinPool)
Grep result from stack dump
- parking to wait for <0x00000000804e10c8> (a java.util.concurrent.ForkJoinPool)
- parking to wait for <0x00000000804e10c8> (a java.util.concurrent.ForkJoinPool)
- parking to wait for <0x00000000804e10c8> (a java.util.concurrent.ForkJoinPool)
- parking to wait for <0x00000000804e10c8> (a java.util.concurrent.ForkJoinPool)
- parking to wait for <0x00000000804e10c8> (a java.util.concurrent.ForkJoinPool)
- parking to wait for <0x00000000804e10c8> (a java.util.concurrent.ForkJoinPool)
- parking to wait for <0x00000000804e10c8> (a java.util.concurrent.ForkJoinPool)
- parking to wait for <0x00000000804e10c8> (a java.util.concurrent.ForkJoinPool)
- parking to wait for <0x00000000804e10c8> (a java.util.concurrent.ForkJoinPool)
- parking to wait for <0x00000000804e10c8> (a java.util.concurrent.ForkJoinPool)
- parking to wait for <0x00000000804e10c8> (a java.util.concurrent.ForkJoinPool)
- parking to wait for <0x00000000804e10c8> (a java.util.concurrent.ForkJoinPool)
- parking to wait for <0x00000000804e10c8> (a java.util.concurrent.ForkJoinPool)
- parking to wait for <0x00000000804e10c8> (a java.util.concurrent.ForkJoinPool)
- parking to wait for <0x00000000804e10c8> (a java.util.concurrent.ForkJoinPool)
- parking to wait for <0x00000000804e10c8> (a java.util.concurrent.ForkJoinPool)
- parking to wait for <0x00000000804e10c8> (a java.util.concurrent.ForkJoinPool)
- parking to wait for <0x00000000804e10c8> (a java.util.concurrent.ForkJoinPool)
- parking to wait for <0x00000000804e10c8> (a java.util.concurrent.ForkJoinPool)
- parking to wait for <0x00000000804e10c8> (a java.util.concurrent.ForkJoinPool)
- parking to wait for <0x00000000804e10c8> (a java.util.concurrent.ForkJoinPool)
- parking to wait for <0x00000000804e10c8> (a java.util.concurrent.ForkJoinPool)
- parking to wait for <0x00000000804e10c8> (a java.util.concurrent.ForkJoinPool)
- parking to wait for <0x00000000804e10c8> (a java.util.concurrent.ForkJoinPool)
- parking to wait for <0x00000000804e10c8> (a java.util.concurrent.ForkJoinPool)
- parking to wait for <0x00000000804e10c8> (a java.util.concurrent.ForkJoinPool)
ForkJoinPool
is used by the parallel stream operations. You should revise how you use theparallel()
call on your streams (and - probably - rethink it, since waiting implies either blocking or synchronization, and neither should be used inside parallel streams).