一、概述

  有些时候我们需要查看下jvm中的线程执行情况,比如,发现服务器的CPU的负载突然增高了、出现了死锁、死循环等,我们该如何分析呢?

  由于程序是正常运行的,没有任何的输出,从日志方面也看不出什么问题,所以就需要看下jvm的内部线程的执行情况,然后再进行分析查找出原因。
  这个时候,就需要借助于jstack命令了,jstack的作用是将正在运行的jvm的线程情况进行快照,并且打印出来:
#用法:jstack <pid>
jstack 18424
  

E:\accp\Y2\进阶内容\JVM>jstack 18424
2020-03-03 18:15:40
Full thread dump OpenJDK 64-Bit Server VM (11.0.3+12-b304.39 mixed mode, sharing): Threads class SMR info:
_java_thread_list=0x0000000053bf4c80, length=45, elements={
0x000000000263f800, 0x000000001859c800, 0x00000000185aa000, 0x00000000185b9000,
0x00000000185bc000, 0x00000000185bf800, 0x00000000185c1000, 0x00000000185cd800,
0x0000000018587000, 0x0000000019be0800, 0x000000001a37f000, 0x000000001afef800,
0x000000001a2e7000, 0x000000001b015800, 0x000000001ba94000, 0x000000001bbaa000,
0x000000001bef3800, 0x000000001d891000, 0x000000001d88f800, 0x000000001d893800,
0x000000001dd61800, 0x000000001fc34000, 0x0000000024d3a000, 0x0000000031674800,
0x0000000038b6d800, 0x0000000038b83800, 0x0000000038b8f800, 0x0000000038b8b000,
0x0000000038b92000, 0x0000000038b97000, 0x0000000038b98000, 0x0000000038b98800,
0x0000000038b9a800, 0x000000004e0c8000, 0x000000004e0ce800, 0x000000004e0d1000,
0x000000004e0e0800, 0x0000000054720800, 0x0000000054720000, 0x000000005471d800,
0x0000000054739000, 0x000000005471b800, 0x0000000054726800, 0x000000005472b000,
0x000000005471c800
} "main" #1 prio=5 os_prio=0 cpu=1234.38ms elapsed=8454.78s tid=0x000000000263f800 nid=0x11424 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE "Reference Handler" #2 daemon prio=10 os_prio=2 cpu=46.88ms elapsed=8453.53s tid=0x000000001859c800 nid=0xffdc waiting on condition [0x000000001900f000]
java.lang.Thread.State: RUNNABLE
at java.lang.ref.Reference.waitForReferencePendingList(java.base@11.0.3/Native Method)
at java.lang.ref.Reference.processPendingReferences(java.base@11.0.3/Reference.java:241)
at java.lang.ref.Reference$ReferenceHandler.run(java.base@11.0.3/Reference.java:213) "Finalizer" #3 daemon prio=8 os_prio=1 cpu=15.63ms elapsed=8453.53s tid=0x00000000185aa000 nid=0x15ad4 in Object.wait() [0x000000001910f000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(java.base@11.0.3/Native Method)
- waiting on <no object reference available>
at java.lang.ref.ReferenceQueue.remove(java.base@11.0.3/ReferenceQueue.java:155)
- waiting to re-lock in wait() <0x00000000e0c1ddf0> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(java.base@11.0.3/ReferenceQueue.java:176)
at java.lang.ref.Finalizer$FinalizerThread.run(java.base@11.0.3/Finalizer.java:170) "Signal Dispatcher" #4 daemon prio=9 os_prio=2 cpu=0.00ms elapsed=8453.35s tid=0x00000000185b9000 nid=0xb278 runnable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE "Attach Listener" #5 daemon prio=5 os_prio=2 cpu=0.00ms elapsed=8453.35s tid=0x00000000185bc000 nid=0x1bdb4 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE "C2 CompilerThread0" #6 daemon prio=9 os_prio=2 cpu=172921.88ms elapsed=8453.35s tid=0x00000000185bf800 nid=0x15d0 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
No compile task "C1 CompilerThread0" #7 daemon prio=9 os_prio=2 cpu=32078.13ms elapsed=8453.35s tid=0x00000000185c1000 nid=0x49b0 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
No compile task "Sweeper thread" #8 daemon prio=9 os_prio=2 cpu=2796.88ms elapsed=8453.35s tid=0x00000000185cd800 nid=0x3b48 runnable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE "Common-Cleaner" #9 daemon prio=8 os_prio=1 cpu=15.63ms elapsed=8452.78s tid=0x0000000018587000 nid=0x2a58 in Object.wait() [0x0000000019b6f000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(java.base@11.0.3/Native Method)
- waiting on <no object reference available>
at java.lang.ref.ReferenceQueue.remove(java.base@11.0.3/ReferenceQueue.java:155)
- waiting to re-lock in wait() <0x00000000e0e614a8> (a java.lang.ref.ReferenceQueue$Lock)
at jdk.internal.ref.CleanerImpl.run(java.base@11.0.3/CleanerImpl.java:148)
at java.lang.Thread.run(java.base@11.0.3/Thread.java:834)
at jdk.internal.misc.InnocuousThread.run(java.base@11.0.3/InnocuousThread.java:134) "Service Thread" #10 daemon prio=9 os_prio=0 cpu=93.75ms elapsed=8450.69s tid=0x0000000019be0800 nid=0x1d1b8 runnable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE "Java2D Disposer" #12 daemon prio=10 os_prio=2 cpu=15.63ms elapsed=8445.69s tid=0x000000001a37f000 nid=0x2fe0 in Object.wait() [0x000000001aacf000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(java.base@11.0.3/Native Method)
- waiting on <no object reference available>
at java.lang.ref.ReferenceQueue.remove(java.base@11.0.3/ReferenceQueue.java:155)
- waiting to re-lock in wait() <0x00000000e0e887f8> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(java.base@11.0.3/ReferenceQueue.java:176)
at sun.java2d.Disposer.run(java.desktop@11.0.3/Disposer.java:144)
at java.lang.Thread.run(java.base@11.0.3/Thread.java:834) "AWT-Shutdown" #13 prio=5 os_prio=0 cpu=0.00ms elapsed=8445.69s tid=0x000000001afef800 nid=0xcf8 in Object.wait() [0x000000001af8f000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(java.base@11.0.3/Native Method)
- waiting on <no object reference available>
at java.lang.Object.wait(java.base@11.0.3/Object.java:328)
at sun.awt.AWTAutoShutdown.run(java.desktop@11.0.3/AWTAutoShutdown.java:291)
- waiting to re-lock in wait() <0x00000000e0e9d480> (a java.lang.Object)
at java.lang.Thread.run(java.base@11.0.3/Thread.java:834) "AWT-Windows" #14 daemon prio=6 os_prio=0 cpu=20984.38ms elapsed=8445.69s tid=0x000000001a2e7000 nid=0x1c5dc runnable [0x000000001c07f000]
java.lang.Thread.State: RUNNABLE
at sun.awt.windows.WToolkit.eventLoop(java.desktop@11.0.3/Native Method)
at sun.awt.windows.WToolkit.run(java.desktop@11.0.3/WToolkit.java:305)
at java.lang.Thread.run(java.base@11.0.3/Thread.java:834) "AWT-EventQueue-0 2019.2.1#IU-192.6262.58 IDEA, eap:false, os:Windows 10 10.0, java-version:JetBrains s.r.o 11.0.3+12-b304.39 2019.2.1#IU-192.6262.58 IDEA, eap:false, os:Windows 10 10.0, java-version:JetBrains s.r.o 11.0.3+12-b304.39" #16 prio=6 os_prio=0 cpu=85750.00ms elapsed=8445.65s tid=0x000000001b015800 nid=0x13284 waiting on condition [0x000000001c24f000]
java.lang.Thread.State: WAITING (parking)
at jdk.internal.misc.Unsafe.park(java.base@11.0.3/Native Method)
- parking to wait for <0x00000000e0e88828> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(java.base@11.0.3/LockSupport.java:194)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(java.base@11.0.3/AbstractQueuedSynchronizer.java:2081)
at java.awt.EventQueue.getNextEvent(java.desktop@11.0.3/EventQueue.java:572)
at com.intellij.ide.IdeEventQueue.getNextEvent(IdeEventQueue.java:543)
at java.awt.EventDispatchThread.pumpOneEventForFilters(java.desktop@11.0.3/EventDispatchThread.java:190)
at java.awt.EventDispatchThread.pumpEventsForFilter(java.desktop@11.0.3/EventDispatchThread.java:124)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(java.desktop@11.0.3/EventDispatchThread.java:113)
at java.awt.EventDispatchThread.pumpEvents(java.desktop@11.0.3/EventDispatchThread.java:109)
at java.awt.EventDispatchThread.pumpEvents(java.desktop@11.0.3/EventDispatchThread.java:101)
at java.awt.EventDispatchThread.run(java.desktop@11.0.3/EventDispatchThread.java:90) "Netty Builtin Server 1" #18 prio=5 os_prio=0 cpu=125.00ms elapsed=8442.88s tid=0x000000001ba94000 nid=0x29b0 runnable [0x000000001d79f000]
java.lang.Thread.State: RUNNABLE
at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(java.base@11.0.3/Native Method)
at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll(java.base@11.0.3/WindowsSelectorImpl.java:339)
at sun.nio.ch.WindowsSelectorImpl.doSelect(java.base@11.0.3/WindowsSelectorImpl.java:167)
at sun.nio.ch.SelectorImpl.lockAndDoSelect(java.base@11.0.3/SelectorImpl.java:124)
- locked <0x00000000e17fd998> (a io.netty.channel.nio.SelectedSelectionKeySet)
- locked <0x00000000e18e9d50> (a sun.nio.ch.WindowsSelectorImpl)
at sun.nio.ch.SelectorImpl.select(java.base@11.0.3/SelectorImpl.java:136)
at io.netty.channel.nio.SelectedSelectionKeySetSelector.select(SelectedSelectionKeySetSelector.java:62)
at io.netty.channel.nio.NioEventLoop.select(NioEventLoop.java:806)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:454)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:918)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at java.lang.Thread.run(java.base@11.0.3/Thread.java:834) "Periodic tasks thread" #20 daemon prio=5 os_prio=0 cpu=140.63ms elapsed=8442.56s tid=0x000000001bbaa000 nid=0x1520c waiting on condition [0x000000001ea6f000]
java.lang.Thread.State: TIMED_WAITING (parking)
at jdk.internal.misc.Unsafe.park(java.base@11.0.3/Native Method)
- parking to wait for <0x00000000e17fd9f8> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.parkNanos(java.base@11.0.3/LockSupport.java:234)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(java.base@11.0.3/AbstractQueuedSynchronizer.java:2123)
at java.util.concurrent.DelayQueue.take(java.base@11.0.3/DelayQueue.java:229)
at com.intellij.util.concurrency.AppDelayQueue.lambda$new$0(AppDelayQueue.java:40)
at com.intellij.util.concurrency.AppDelayQueue$$Lambda$206/0x0000000840265440.run(Unknown Source)
at java.lang.Thread.run(java.base@11.0.3/Thread.java:834) "Batik CleanerThread" #26 daemon prio=4 os_prio=-1 cpu=0.00ms elapsed=8440.23s tid=0x000000001bef3800 nid=0x2dec in Object.wait() [0x000000001f36f000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(java.base@11.0.3/Native Method)
- waiting on <0x00000000e208e048> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(java.base@11.0.3/ReferenceQueue.java:155)
- waiting to re-lock in wait() <0x00000000e208e048> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(java.base@11.0.3/ReferenceQueue.java:176)
at org.apache.batik.util.CleanerThread.run(CleanerThread.java:106) "fsnotifier64.exe" #29 prio=4 os_prio=-1 cpu=0.00ms elapsed=8421.44s tid=0x000000001d891000 nid=0xb62c runnable [0x000000001a8ce000]
java.lang.Thread.State: RUNNABLE
at java.lang.ProcessImpl.waitForInterruptibly(java.base@11.0.3/Native Method)
at java.lang.ProcessImpl.waitFor(java.base@11.0.3/ProcessImpl.java:484)
at com.intellij.execution.process.ProcessWaitFor.lambda$null$0(ProcessWaitFor.java:48)
at com.intellij.execution.process.ProcessWaitFor$$Lambda$368/0x0000000840605840.run(Unknown Source)
at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:208)
at com.intellij.execution.process.ProcessWaitFor.lambda$new$1(ProcessWaitFor.java:43)
at com.intellij.execution.process.ProcessWaitFor$$Lambda$365/0x0000000840603040.run(Unknown Source)
at java.util.concurrent.Executors$RunnableAdapter.call(java.base@11.0.3/Executors.java:515)
at java.util.concurrent.FutureTask.run(java.base@11.0.3/FutureTask.java:264)
at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@11.0.3/ThreadPoolExecutor.java:1128)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@11.0.3/ThreadPoolExecutor.java:628)
at java.lang.Thread.run(java.base@11.0.3/Thread.java:834) "BaseDataReader: output stream of fsnotifier64.exe" #30 prio=4 os_prio=-1 cpu=2109.38ms elapsed=8421.44s tid=0x000000001d88f800 nid=0x2cdc runnable [0x000000002143f000]
java.lang.Thread.State: RUNNABLE
at java.io.FileInputStream.readBytes(java.base@11.0.3/Native Method)
at java.io.FileInputStream.read(java.base@11.0.3/FileInputStream.java:279)
at java.io.BufferedInputStream.read1(java.base@11.0.3/BufferedInputStream.java:290)
at java.io.BufferedInputStream.read(java.base@11.0.3/BufferedInputStream.java:351)
- locked <0x00000000e2affc00> (a java.io.BufferedInputStream)
at sun.nio.cs.StreamDecoder.readBytes(java.base@11.0.3/StreamDecoder.java:284)
at sun.nio.cs.StreamDecoder.implRead(java.base@11.0.3/StreamDecoder.java:326)
at sun.nio.cs.StreamDecoder.read(java.base@11.0.3/StreamDecoder.java:178)
- locked <0x00000000e4f59810> (a com.intellij.util.io.BaseInputStreamReader)
at java.io.InputStreamReader.read(java.base@11.0.3/InputStreamReader.java:185)
at java.io.Reader.read(java.base@11.0.3/Reader.java:229)
at com.intellij.util.io.BaseOutputReader.readAvailableBlocking(BaseOutputReader.java:146)
at com.intellij.util.io.BaseDataReader.readAvailable(BaseDataReader.java:77)
at com.intellij.util.io.BaseDataReader.doRun(BaseDataReader.java:155)
at com.intellij.util.io.BaseDataReader$$Lambda$369/0x0000000840605c40.run(Unknown Source)
at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:208)
at com.intellij.util.io.BaseDataReader.lambda$start$0(BaseDataReader.java:61)
at com.intellij.util.io.BaseDataReader$$Lambda$366/0x0000000840603440.run(Unknown Source)
at java.util.concurrent.Executors$RunnableAdapter.call(java.base@11.0.3/Executors.java:515)
at java.util.concurrent.FutureTask.run(java.base@11.0.3/FutureTask.java:264)
at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@11.0.3/ThreadPoolExecutor.java:1128)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@11.0.3/ThreadPoolExecutor.java:628)
at java.lang.Thread.run(java.base@11.0.3/Thread.java:834) "BaseDataReader: error stream of fsnotifier64.exe" #31 prio=4 os_prio=-1 cpu=0.00ms elapsed=8421.44s tid=0x000000001d893800 nid=0x5fb8 runnable [0x0000000023f2e000]
java.lang.Thread.State: RUNNABLE
at java.io.FileInputStream.readBytes(java.base@11.0.3/Native Method)
at java.io.FileInputStream.read(java.base@11.0.3/FileInputStream.java:279)
at sun.nio.cs.StreamDecoder.readBytes(java.base@11.0.3/StreamDecoder.java:284)
at sun.nio.cs.StreamDecoder.implRead(java.base@11.0.3/StreamDecoder.java:326)
at sun.nio.cs.StreamDecoder.read(java.base@11.0.3/StreamDecoder.java:178)
- locked <0x00000000e4f721b0> (a com.intellij.util.io.BaseInputStreamReader)
at java.io.InputStreamReader.read(java.base@11.0.3/InputStreamReader.java:185)
at java.io.Reader.read(java.base@11.0.3/Reader.java:229)
at com.intellij.util.io.BaseOutputReader.readAvailableBlocking(BaseOutputReader.java:146)
at com.intellij.util.io.BaseDataReader.readAvailable(BaseDataReader.java:77)
at com.intellij.util.io.BaseDataReader.doRun(BaseDataReader.java:155)
at com.intellij.util.io.BaseDataReader$$Lambda$369/0x0000000840605c40.run(Unknown Source)
at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:208)
at com.intellij.util.io.BaseDataReader.lambda$start$0(BaseDataReader.java:61)
at com.intellij.util.io.BaseDataReader$$Lambda$366/0x0000000840603440.run(Unknown Source)
at java.util.concurrent.Executors$RunnableAdapter.call(java.base@11.0.3/Executors.java:515)
at java.util.concurrent.FutureTask.run(java.base@11.0.3/FutureTask.java:264)
at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@11.0.3/ThreadPoolExecutor.java:1128)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@11.0.3/ThreadPoolExecutor.java:628)
at java.lang.Thread.run(java.base@11.0.3/Thread.java:834) "Netty Builtin Server 2" #32 prio=4 os_prio=-1 cpu=31.25ms elapsed=8415.08s tid=0x000000001dd61800 nid=0xecc runnable [0x0000000025a1f000]
java.lang.Thread.State: RUNNABLE
at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(java.base@11.0.3/Native Method)
at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll(java.base@11.0.3/WindowsSelectorImpl.java:339)
at sun.nio.ch.WindowsSelectorImpl.doSelect(java.base@11.0.3/WindowsSelectorImpl.java:167)
at sun.nio.ch.SelectorImpl.lockAndDoSelect(java.base@11.0.3/SelectorImpl.java:124)
- locked <0x00000000e2060e88> (a io.netty.channel.nio.SelectedSelectionKeySet)
- locked <0x00000000e18e9f70> (a sun.nio.ch.WindowsSelectorImpl)
at sun.nio.ch.SelectorImpl.select(java.base@11.0.3/SelectorImpl.java:136)
at io.netty.channel.nio.SelectedSelectionKeySetSelector.select(SelectedSelectionKeySetSelector.java:62)
at io.netty.channel.nio.NioEventLoop.select(NioEventLoop.java:806)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:454)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:918)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at java.lang.Thread.run(java.base@11.0.3/Thread.java:834) "pool-1-thread-1" #33 prio=5 os_prio=0 cpu=125.00ms elapsed=8405.03s tid=0x000000001fc34000 nid=0x2b98 runnable [0x000000002695f000]
java.lang.Thread.State: TIMED_WAITING (parking)
at jdk.internal.misc.Unsafe.park(java.base@11.0.3/Native Method)
- parking to wait for <0x00000000e24eaab0> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.parkNanos(java.base@11.0.3/LockSupport.java:234)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(java.base@11.0.3/AbstractQueuedSynchronizer.java:2123)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(java.base@11.0.3/ScheduledThreadPoolExecutor.java:1182)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(java.base@11.0.3/ScheduledThreadPoolExecutor.java:899)
at java.util.concurrent.ThreadPoolExecutor.getTask(java.base@11.0.3/ThreadPoolExecutor.java:1054)
at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@11.0.3/ThreadPoolExecutor.java:1114)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@11.0.3/ThreadPoolExecutor.java:628)
at java.lang.Thread.run(java.base@11.0.3/Thread.java:834) "TimerQueue" #34 daemon prio=5 os_prio=0 cpu=15.63ms elapsed=8402.20s tid=0x0000000024d3a000 nid=0x7fb0 waiting on condition [0x000000002974f000]
java.lang.Thread.State: TIMED_WAITING (parking)
at jdk.internal.misc.Unsafe.park(java.base@11.0.3/Native Method)
- parking to wait for <0x00000000e565e370> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.parkNanos(java.base@11.0.3/LockSupport.java:234)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(java.base@11.0.3/AbstractQueuedSynchronizer.java:2123)
at java.util.concurrent.DelayQueue.take(java.base@11.0.3/DelayQueue.java:229)
at javax.swing.TimerQueue.run(java.desktop@11.0.3/TimerQueue.java:171)
at java.lang.Thread.run(java.base@11.0.3/Thread.java:834) "Netty Builtin Server 3" #44 prio=4 os_prio=-1 cpu=46.88ms elapsed=8359.83s tid=0x0000000031674800 nid=0x7994 runnable [0x000000003729f000]
java.lang.Thread.State: RUNNABLE
at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(java.base@11.0.3/Native Method)
at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll(java.base@11.0.3/WindowsSelectorImpl.java:339)
at sun.nio.ch.WindowsSelectorImpl.doSelect(java.base@11.0.3/WindowsSelectorImpl.java:167)
at sun.nio.ch.SelectorImpl.lockAndDoSelect(java.base@11.0.3/SelectorImpl.java:124)
- locked <0x00000000e2061398> (a io.netty.channel.nio.SelectedSelectionKeySet)
- locked <0x00000000e18e9ff8> (a sun.nio.ch.WindowsSelectorImpl)
at sun.nio.ch.SelectorImpl.select(java.base@11.0.3/SelectorImpl.java:136)
at io.netty.channel.nio.SelectedSelectionKeySetSelector.select(SelectedSelectionKeySetSelector.java:62)
at io.netty.channel.nio.NioEventLoop.select(NioEventLoop.java:806)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:454)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:918)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at java.lang.Thread.run(java.base@11.0.3/Thread.java:834) "java.exe" #59 prio=4 os_prio=-1 cpu=0.00ms elapsed=8326.94s tid=0x0000000038b6d800 nid=0xa67c runnable [0x000000003ea7e000]
java.lang.Thread.State: RUNNABLE
at java.lang.ProcessImpl.waitForInterruptibly(java.base@11.0.3/Native Method)
at java.lang.ProcessImpl.waitFor(java.base@11.0.3/ProcessImpl.java:484)
at com.intellij.execution.process.ProcessWaitFor.lambda$null$0(ProcessWaitFor.java:48)
at com.intellij.execution.process.ProcessWaitFor$$Lambda$368/0x0000000840605840.run(Unknown Source)
at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:208)
at com.intellij.execution.process.ProcessWaitFor.lambda$new$1(ProcessWaitFor.java:43)
at com.intellij.execution.process.ProcessWaitFor$$Lambda$365/0x0000000840603040.run(Unknown Source)
at java.util.concurrent.Executors$RunnableAdapter.call(java.base@11.0.3/Executors.java:515)
at java.util.concurrent.FutureTask.run(java.base@11.0.3/FutureTask.java:264)
at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@11.0.3/ThreadPoolExecutor.java:1128)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@11.0.3/ThreadPoolExecutor.java:628)
at java.lang.Thread.run(java.base@11.0.3/Thread.java:834) "BaseDataReader: output stream of java.exe" #60 prio=4 os_prio=-1 cpu=31.25ms elapsed=8326.90s tid=0x0000000038b83800 nid=0xf930 runnable [0x0000000042a9e000]
java.lang.Thread.State: RUNNABLE
at java.io.FileInputStream.readBytes(java.base@11.0.3/Native Method)
at java.io.FileInputStream.read(java.base@11.0.3/FileInputStream.java:279)
at java.io.BufferedInputStream.read1(java.base@11.0.3/BufferedInputStream.java:290)
at java.io.BufferedInputStream.read(java.base@11.0.3/BufferedInputStream.java:351)
- locked <0x00000000e75e9428> (a java.io.BufferedInputStream)
at sun.nio.cs.StreamDecoder.readBytes(java.base@11.0.3/StreamDecoder.java:284)
at sun.nio.cs.StreamDecoder.implRead(java.base@11.0.3/StreamDecoder.java:326)
at sun.nio.cs.StreamDecoder.read(java.base@11.0.3/StreamDecoder.java:178)
- locked <0x00000000e76db578> (a com.intellij.util.io.BaseInputStreamReader)
at java.io.InputStreamReader.read(java.base@11.0.3/InputStreamReader.java:185)
at java.io.Reader.read(java.base@11.0.3/Reader.java:229)
at com.intellij.util.io.BaseOutputReader.readAvailableBlocking(BaseOutputReader.java:146)
at com.intellij.util.io.BaseDataReader.readAvailable(BaseDataReader.java:77)
at com.intellij.util.io.BaseDataReader.doRun(BaseDataReader.java:155)
at com.intellij.util.io.BaseDataReader$$Lambda$369/0x0000000840605c40.run(Unknown Source)
at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:208)
at com.intellij.util.io.BaseDataReader.lambda$start$0(BaseDataReader.java:61)
at com.intellij.util.io.BaseDataReader$$Lambda$366/0x0000000840603440.run(Unknown Source)
at java.util.concurrent.Executors$RunnableAdapter.call(java.base@11.0.3/Executors.java:515)
at java.util.concurrent.FutureTask.run(java.base@11.0.3/FutureTask.java:264)
at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@11.0.3/ThreadPoolExecutor.java:1128)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@11.0.3/ThreadPoolExecutor.java:628)
at java.lang.Thread.run(java.base@11.0.3/Thread.java:834) "BaseDataReader: error stream of java.exe" #61 prio=4 os_prio=-1 cpu=0.00ms elapsed=8326.90s tid=0x0000000038b8f800 nid=0xc02c runnable [0x0000000042fbe000]
java.lang.Thread.State: RUNNABLE
at java.io.FileInputStream.readBytes(java.base@11.0.3/Native Method)
at java.io.FileInputStream.read(java.base@11.0.3/FileInputStream.java:279)
at sun.nio.cs.StreamDecoder.readBytes(java.base@11.0.3/StreamDecoder.java:284)
at sun.nio.cs.StreamDecoder.implRead(java.base@11.0.3/StreamDecoder.java:326)
at sun.nio.cs.StreamDecoder.read(java.base@11.0.3/StreamDecoder.java:178)
- locked <0x00000000e76db478> (a com.intellij.util.io.BaseInputStreamReader)
at java.io.InputStreamReader.read(java.base@11.0.3/InputStreamReader.java:185)
at java.io.Reader.read(java.base@11.0.3/Reader.java:229)
at com.intellij.util.io.BaseOutputReader.readAvailableBlocking(BaseOutputReader.java:146)
at com.intellij.util.io.BaseDataReader.readAvailable(BaseDataReader.java:77)
at com.intellij.util.io.BaseDataReader.doRun(BaseDataReader.java:155)
at com.intellij.util.io.BaseDataReader$$Lambda$369/0x0000000840605c40.run(Unknown Source)
at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:208)
at com.intellij.util.io.BaseDataReader.lambda$start$0(BaseDataReader.java:61)
at com.intellij.util.io.BaseDataReader$$Lambda$366/0x0000000840603440.run(Unknown Source)
at java.util.concurrent.Executors$RunnableAdapter.call(java.base@11.0.3/Executors.java:515)
at java.util.concurrent.FutureTask.run(java.base@11.0.3/FutureTask.java:264)
at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@11.0.3/ThreadPoolExecutor.java:1128)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@11.0.3/ThreadPoolExecutor.java:628)
at java.lang.Thread.run(java.base@11.0.3/Thread.java:834) "RMI TCP Accept-0" #62 daemon prio=4 os_prio=-1 cpu=140.63ms elapsed=8323.37s tid=0x0000000038b8b000 nid=0x1c858 runnable [0x00000000428af000]
java.lang.Thread.State: RUNNABLE
at java.net.PlainSocketImpl.accept0(java.base@11.0.3/Native Method)
at java.net.PlainSocketImpl.socketAccept(java.base@11.0.3/PlainSocketImpl.java:159)
at java.net.AbstractPlainSocketImpl.accept(java.base@11.0.3/AbstractPlainSocketImpl.java:458)
at java.net.ServerSocket.implAccept(java.base@11.0.3/ServerSocket.java:551)
at java.net.ServerSocket.accept(java.base@11.0.3/ServerSocket.java:519)
at sun.rmi.transport.tcp.TCPTransport$AcceptLoop.executeAcceptLoop(java.rmi@11.0.3/TCPTransport.java:394)
at sun.rmi.transport.tcp.TCPTransport$AcceptLoop.run(java.rmi@11.0.3/TCPTransport.java:366)
at java.lang.Thread.run(java.base@11.0.3/Thread.java:834) "RMI Reaper" #63 prio=4 os_prio=-1 cpu=0.00ms elapsed=8323.36s tid=0x0000000038b92000 nid=0x1969c in Object.wait() [0x0000000042dcf000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(java.base@11.0.3/Native Method)
- waiting on <0x00000000e74beaf8> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(java.base@11.0.3/ReferenceQueue.java:155)
- waiting to re-lock in wait() <0x00000000e74beaf8> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(java.base@11.0.3/ReferenceQueue.java:176)
at sun.rmi.transport.ObjectTable$Reaper.run(java.rmi@11.0.3/ObjectTable.java:349)
at java.lang.Thread.run(java.base@11.0.3/Thread.java:834) "RMI GC Daemon" #64 daemon prio=2 os_prio=-2 cpu=0.00ms elapsed=8323.36s tid=0x0000000038b97000 nid=0xb140 in Object.wait() [0x000000004448f000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(java.base@11.0.3/Native Method)
- waiting on <no object reference available>
at sun.rmi.transport.GC$Daemon.run(java.rmi@11.0.3/GC.java:126)
- waiting to re-lock in wait() <0x00000000e7754e88> (a sun.rmi.transport.GC$LatencyLock)
at java.lang.Thread.run(java.base@11.0.3/Thread.java:834)
at jdk.internal.misc.InnocuousThread.run(java.base@11.0.3/InnocuousThread.java:134) "RMI Scheduler(0)" #65 daemon prio=4 os_prio=-1 cpu=46.88ms elapsed=8323.32s tid=0x0000000038b98000 nid=0x156a0 waiting on condition [0x000000004458f000]
java.lang.Thread.State: TIMED_WAITING (parking)
at jdk.internal.misc.Unsafe.park(java.base@11.0.3/Native Method)
- parking to wait for <0x00000000e74bef78> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.parkNanos(java.base@11.0.3/LockSupport.java:234)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(java.base@11.0.3/AbstractQueuedSynchronizer.java:2123)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(java.base@11.0.3/ScheduledThreadPoolExecutor.java:1182)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(java.base@11.0.3/ScheduledThreadPoolExecutor.java:899)
at java.util.concurrent.ThreadPoolExecutor.getTask(java.base@11.0.3/ThreadPoolExecutor.java:1054)
at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@11.0.3/ThreadPoolExecutor.java:1114)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@11.0.3/ThreadPoolExecutor.java:628)
at java.lang.Thread.run(java.base@11.0.3/Thread.java:834) "RMI RenewClean-[127.0.0.1:41158]" #66 daemon prio=4 os_prio=-1 cpu=265.63ms elapsed=8323.23s tid=0x0000000038b98800 nid=0x8788 in Object.wait() [0x000000004468f000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(java.base@11.0.3/Native Method)
- waiting on <no object reference available>
at java.lang.ref.ReferenceQueue.remove(java.base@11.0.3/ReferenceQueue.java:155)
- waiting to re-lock in wait() <0x00000000e7754f30> (a java.lang.ref.ReferenceQueue$Lock)
at sun.rmi.transport.DGCClient$EndpointEntry$RenewCleanThread.run(java.rmi@11.0.3/DGCClient.java:558)
at java.lang.Thread.run(java.base@11.0.3/Thread.java:834) "RMI TCP Connection(idle)" #68 daemon prio=4 os_prio=-1 cpu=718.75ms elapsed=8323.12s tid=0x0000000038b9a800 nid=0x3e1c waiting on condition [0x0000000044a8f000]
java.lang.Thread.State: TIMED_WAITING (parking)
at jdk.internal.misc.Unsafe.park(java.base@11.0.3/Native Method)
- parking to wait for <0x00000000e77550f8> (a java.util.concurrent.SynchronousQueue$TransferStack)
at java.util.concurrent.locks.LockSupport.parkNanos(java.base@11.0.3/LockSupport.java:234)
at java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(java.base@11.0.3/SynchronousQueue.java:462)
at java.util.concurrent.SynchronousQueue$TransferStack.transfer(java.base@11.0.3/SynchronousQueue.java:361)
at java.util.concurrent.SynchronousQueue.poll(java.base@11.0.3/SynchronousQueue.java:937)
at java.util.concurrent.ThreadPoolExecutor.getTask(java.base@11.0.3/ThreadPoolExecutor.java:1053)
at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@11.0.3/ThreadPoolExecutor.java:1114)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@11.0.3/ThreadPoolExecutor.java:628)
at java.lang.Thread.run(java.base@11.0.3/Thread.java:834) "DefaultDispatcher-worker-1" #118 daemon prio=4 os_prio=-1 cpu=125.00ms elapsed=7870.85s tid=0x000000004e0c8000 nid=0x18478 waiting on condition [0x00000000457cf000]
java.lang.Thread.State: TIMED_WAITING (parking)
at jdk.internal.misc.Unsafe.park(java.base@11.0.3/Native Method)
at java.util.concurrent.locks.LockSupport.parkNanos(java.base@11.0.3/LockSupport.java:357)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.doPark(CoroutineScheduler.kt:850)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.cpuWorkerIdle(CoroutineScheduler.kt:823)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:729) "DefaultDispatcher-worker-2" #119 daemon prio=4 os_prio=-1 cpu=0.00ms elapsed=7870.85s tid=0x000000004e0ce800 nid=0x19ea4 waiting on condition [0x00000000483af000]
java.lang.Thread.State: TIMED_WAITING (parking)
at jdk.internal.misc.Unsafe.park(java.base@11.0.3/Native Method)
at java.util.concurrent.locks.LockSupport.parkNanos(java.base@11.0.3/LockSupport.java:357)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.doPark(CoroutineScheduler.kt:850)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.cpuWorkerIdle(CoroutineScheduler.kt:823)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:729) "DefaultDispatcher-worker-3" #120 daemon prio=4 os_prio=-1 cpu=0.00ms elapsed=7870.84s tid=0x000000004e0d1000 nid=0x5d84 waiting on condition [0x0000000056f7f000]
java.lang.Thread.State: TIMED_WAITING (parking)
at jdk.internal.misc.Unsafe.park(java.base@11.0.3/Native Method)
at java.util.concurrent.locks.LockSupport.parkNanos(java.base@11.0.3/LockSupport.java:357)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.doPark(CoroutineScheduler.kt:850)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.cpuWorkerIdle(CoroutineScheduler.kt:823)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:729) "DefaultDispatcher-worker-4" #128 daemon prio=4 os_prio=-1 cpu=0.00ms elapsed=7832.04s tid=0x000000004e0e0800 nid=0x77b0 waiting on condition [0x000000005788f000]
java.lang.Thread.State: TIMED_WAITING (parking)
at jdk.internal.misc.Unsafe.park(java.base@11.0.3/Native Method)
at java.util.concurrent.locks.LockSupport.parkNanos(java.base@11.0.3/LockSupport.java:357)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.doPark(CoroutineScheduler.kt:850)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.cpuWorkerIdle(CoroutineScheduler.kt:823)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:729) "java.exe" #169 prio=4 os_prio=-1 cpu=0.00ms elapsed=7157.24s tid=0x0000000054720800 nid=0x31fc runnable [0x000000001ed6f000]
java.lang.Thread.State: RUNNABLE
at java.lang.ProcessImpl.waitForInterruptibly(java.base@11.0.3/Native Method)
at java.lang.ProcessImpl.waitFor(java.base@11.0.3/ProcessImpl.java:484)
at com.intellij.execution.process.ProcessWaitFor.lambda$null$0(ProcessWaitFor.java:48)
at com.intellij.execution.process.ProcessWaitFor$$Lambda$368/0x0000000840605840.run(Unknown Source)
at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:208)
at com.intellij.execution.process.ProcessWaitFor.lambda$new$1(ProcessWaitFor.java:43)
at com.intellij.execution.process.ProcessWaitFor$$Lambda$365/0x0000000840603040.run(Unknown Source)
at java.util.concurrent.Executors$RunnableAdapter.call(java.base@11.0.3/Executors.java:515)
at java.util.concurrent.FutureTask.run(java.base@11.0.3/FutureTask.java:264)
at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@11.0.3/ThreadPoolExecutor.java:1128)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@11.0.3/ThreadPoolExecutor.java:628)
at java.lang.Thread.run(java.base@11.0.3/Thread.java:834) "BaseDataReader: error stream of java.exe" #170 prio=4 os_prio=-1 cpu=0.00ms elapsed=7157.24s tid=0x0000000054720000 nid=0x8368 runnable [0x000000002a79e000]
java.lang.Thread.State: RUNNABLE
at java.io.FileInputStream.readBytes(java.base@11.0.3/Native Method)
at java.io.FileInputStream.read(java.base@11.0.3/FileInputStream.java:279)
at sun.nio.cs.StreamDecoder.readBytes(java.base@11.0.3/StreamDecoder.java:284)
at sun.nio.cs.StreamDecoder.implRead(java.base@11.0.3/StreamDecoder.java:326)
at sun.nio.cs.StreamDecoder.read(java.base@11.0.3/StreamDecoder.java:178)
- locked <0x00000000e9ec1668> (a com.intellij.util.io.BaseInputStreamReader)
at java.io.InputStreamReader.read(java.base@11.0.3/InputStreamReader.java:185)
at java.io.Reader.read(java.base@11.0.3/Reader.java:229)
at com.intellij.util.io.BaseOutputReader.readAvailableBlocking(BaseOutputReader.java:146)
at com.intellij.util.io.BaseDataReader.readAvailable(BaseDataReader.java:77)
at com.intellij.util.io.BaseDataReader.doRun(BaseDataReader.java:155)
at com.intellij.util.io.BaseDataReader$$Lambda$369/0x0000000840605c40.run(Unknown Source)
at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:208)
at com.intellij.util.io.BaseDataReader.lambda$start$0(BaseDataReader.java:61)
at com.intellij.util.io.BaseDataReader$$Lambda$366/0x0000000840603440.run(Unknown Source)
at java.util.concurrent.Executors$RunnableAdapter.call(java.base@11.0.3/Executors.java:515)
at java.util.concurrent.FutureTask.run(java.base@11.0.3/FutureTask.java:264)
at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@11.0.3/ThreadPoolExecutor.java:1128)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@11.0.3/ThreadPoolExecutor.java:628)
at java.lang.Thread.run(java.base@11.0.3/Thread.java:834) "BaseDataReader: output stream of java.exe" #171 prio=4 os_prio=-1 cpu=0.00ms elapsed=7157.24s tid=0x000000005471d800 nid=0x1e08c runnable [0x000000002f81e000]
java.lang.Thread.State: RUNNABLE
at java.io.FileInputStream.readBytes(java.base@11.0.3/Native Method)
at java.io.FileInputStream.read(java.base@11.0.3/FileInputStream.java:279)
at java.io.BufferedInputStream.read1(java.base@11.0.3/BufferedInputStream.java:290)
at java.io.BufferedInputStream.read(java.base@11.0.3/BufferedInputStream.java:351)
- locked <0x00000000e9e328e8> (a java.io.BufferedInputStream)
at sun.nio.cs.StreamDecoder.readBytes(java.base@11.0.3/StreamDecoder.java:284)
at sun.nio.cs.StreamDecoder.implRead(java.base@11.0.3/StreamDecoder.java:326)
at sun.nio.cs.StreamDecoder.read(java.base@11.0.3/StreamDecoder.java:178)
- locked <0x00000000e9e32940> (a com.intellij.util.io.BaseInputStreamReader)
at java.io.InputStreamReader.read(java.base@11.0.3/InputStreamReader.java:185)
at java.io.Reader.read(java.base@11.0.3/Reader.java:229)
at com.intellij.util.io.BaseOutputReader.readAvailableBlocking(BaseOutputReader.java:146)
at com.intellij.util.io.BaseDataReader.readAvailable(BaseDataReader.java:77)
at com.intellij.util.io.BaseDataReader.doRun(BaseDataReader.java:155)
at com.intellij.util.io.BaseDataReader$$Lambda$369/0x0000000840605c40.run(Unknown Source)
at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:208)
at com.intellij.util.io.BaseDataReader.lambda$start$0(BaseDataReader.java:61)
at com.intellij.util.io.BaseDataReader$$Lambda$366/0x0000000840603440.run(Unknown Source)
at java.util.concurrent.Executors$RunnableAdapter.call(java.base@11.0.3/Executors.java:515)
at java.util.concurrent.FutureTask.run(java.base@11.0.3/FutureTask.java:264)
at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@11.0.3/ThreadPoolExecutor.java:1128)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@11.0.3/ThreadPoolExecutor.java:628)
at java.lang.Thread.run(java.base@11.0.3/Thread.java:834) "JobScheduler FJ pool 4/3" #246 daemon prio=4 os_prio=-1 cpu=828.13ms elapsed=1447.77s tid=0x0000000054739000 nid=0x161b4 waiting on condition [0x0000000044d8f000]
java.lang.Thread.State: WAITING (parking)
at jdk.internal.misc.Unsafe.park(java.base@11.0.3/Native Method)
- parking to wait for <0x00000000e0e26ae8> (a java.util.concurrent.ForkJoinPool)
at java.util.concurrent.locks.LockSupport.park(java.base@11.0.3/LockSupport.java:194)
at java.util.concurrent.ForkJoinPool.runWorker(java.base@11.0.3/ForkJoinPool.java:1628)
at java.util.concurrent.ForkJoinWorkerThread.run(java.base@11.0.3/ForkJoinWorkerThread.java:177) "ApplicationImpl pooled thread 108" #271 prio=4 os_prio=-1 cpu=93.75ms elapsed=693.08s tid=0x000000005471b800 nid=0x17864 waiting on condition [0x000000001ec6f000]
java.lang.Thread.State: TIMED_WAITING (parking)
at jdk.internal.misc.Unsafe.park(java.base@11.0.3/Native Method)
- parking to wait for <0x00000000e11ed0c8> (a java.util.concurrent.SynchronousQueue$TransferStack)
at java.util.concurrent.locks.LockSupport.parkNanos(java.base@11.0.3/LockSupport.java:234)
at java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(java.base@11.0.3/SynchronousQueue.java:462)
at java.util.concurrent.SynchronousQueue$TransferStack.transfer(java.base@11.0.3/SynchronousQueue.java:361)
at java.util.concurrent.SynchronousQueue.poll(java.base@11.0.3/SynchronousQueue.java:937)
at java.util.concurrent.ThreadPoolExecutor.getTask(java.base@11.0.3/ThreadPoolExecutor.java:1053)
at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@11.0.3/ThreadPoolExecutor.java:1114)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@11.0.3/ThreadPoolExecutor.java:628)
at java.lang.Thread.run(java.base@11.0.3/Thread.java:834) "JobScheduler FJ pool 0/3" #278 daemon prio=4 os_prio=-1 cpu=187.50ms elapsed=88.30s tid=0x0000000054726800 nid=0x161bc waiting on condition [0x000000002a9af000]
java.lang.Thread.State: TIMED_WAITING (parking)
at jdk.internal.misc.Unsafe.park(java.base@11.0.3/Native Method)
- parking to wait for <0x00000000e0e26ae8> (a java.util.concurrent.ForkJoinPool)
at java.util.concurrent.locks.LockSupport.parkUntil(java.base@11.0.3/LockSupport.java:275)
at java.util.concurrent.ForkJoinPool.runWorker(java.base@11.0.3/ForkJoinPool.java:1619)
at java.util.concurrent.ForkJoinWorkerThread.run(java.base@11.0.3/ForkJoinWorkerThread.java:177) "Swing-Shell" #281 daemon prio=10 os_prio=2 cpu=203.13ms elapsed=87.00s tid=0x000000005472b000 nid=0x15ae8 waiting on condition [0x00000000379af000]
java.lang.Thread.State: WAITING (parking)
at jdk.internal.misc.Unsafe.park(java.base@11.0.3/Native Method)
- parking to wait for <0x00000000d509e3a8> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(java.base@11.0.3/LockSupport.java:194)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(java.base@11.0.3/AbstractQueuedSynchronizer.java:2081)
at java.util.concurrent.LinkedBlockingQueue.take(java.base@11.0.3/LinkedBlockingQueue.java:433)
at java.util.concurrent.ThreadPoolExecutor.getTask(java.base@11.0.3/ThreadPoolExecutor.java:1054)
at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@11.0.3/ThreadPoolExecutor.java:1114)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@11.0.3/ThreadPoolExecutor.java:628)
at sun.awt.shell.Win32ShellFolderManager2$ComInvoker$1.run(java.desktop@11.0.3/Win32ShellFolderManager2.java:557)
at java.lang.Thread.run(java.base@11.0.3/Thread.java:834) "ApplicationImpl pooled thread 115" #284 prio=4 os_prio=-1 cpu=0.00ms elapsed=17.07s tid=0x000000005471c800 nid=0x114c0 waiting on condition [0x000000001eb6f000]
java.lang.Thread.State: TIMED_WAITING (parking)
at jdk.internal.misc.Unsafe.park(java.base@11.0.3/Native Method)
- parking to wait for <0x00000000e11ed0c8> (a java.util.concurrent.SynchronousQueue$TransferStack)
at java.util.concurrent.locks.LockSupport.parkNanos(java.base@11.0.3/LockSupport.java:234)
at java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(java.base@11.0.3/SynchronousQueue.java:462)
at java.util.concurrent.SynchronousQueue$TransferStack.transfer(java.base@11.0.3/SynchronousQueue.java:361)
at java.util.concurrent.SynchronousQueue.poll(java.base@11.0.3/SynchronousQueue.java:937)
at java.util.concurrent.ThreadPoolExecutor.getTask(java.base@11.0.3/ThreadPoolExecutor.java:1053)
at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@11.0.3/ThreadPoolExecutor.java:1114)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@11.0.3/ThreadPoolExecutor.java:628)
at java.lang.Thread.run(java.base@11.0.3/Thread.java:834) "VM Thread" os_prio=2 cpu=3203.13ms elapsed=8453.70s tid=0x000000000270e800 nid=0xc0b0 runnable "GC Thread#0" os_prio=2 cpu=1453.13ms elapsed=8454.61s tid=0x0000000002651000 nid=0x1dd20 runnable "GC Thread#1" os_prio=2 cpu=1468.75ms elapsed=8448.55s tid=0x0000000019f8d800 nid=0x279c runnable "GC Thread#2" os_prio=2 cpu=1406.25ms elapsed=8443.64s tid=0x000000001b7e5800 nid=0xeed4 runnable "GC Thread#3" os_prio=2 cpu=1421.88ms elapsed=8443.64s tid=0x000000001b7e0800 nid=0x1b6c4 runnable "CMS Main Thread" os_prio=2 cpu=6078.13ms elapsed=8454.57s tid=0x0000000002694000 nid=0x13f84 runnable "VM Periodic Task Thread" os_prio=2 cpu=343.75ms elapsed=8450.69s tid=0x0000000019be1800 nid=0x1c984 waiting on condition JNI global refs: 141, weak refs: 1707

打印内容

二、线程的状态

  

在Java中线程的状态一共被分成6种:

  1、初始态(NEW)

    创建一个Thread对象,但还未调用start()启动线程时,线程处于初始态。

  2、运行态(RUNNABLE)

        在Java中,运行态包括 就绪态 和 运行态。

    ①就绪态

      该状态下的线程已经获得执行所需的所有资源,只要CPU分配执行权就能运行。
      所有就绪态的线程存放在就绪队列中。

    ②运行态

      获得CPU执行权,正在执行的线程。
      由于一个CPU同一时刻只能执行一条线程,因此每个CPU每个时刻只有一条运行态的线程。

  3、阻塞态(BLOCKED)

    当一条正在执行的线程请求某一资源失败时,就会进入阻塞态。
    而在Java中,阻塞态专指请求锁失败时进入的状态。
    由一个阻塞队列存放所有阻塞态的线程。
    处于阻塞态的线程会不断请求资源,一旦请求成功,就会进入就绪队列,等待执行。

  4、等待态(WAITING)

    当前线程中调用wait、join、park函数时,当前线程就会进入等待态。
    也有一个等待队列存放所有等待态的线程。
    线程处于等待态表示它需要等待其他线程的指示才能继续运行。
    进入等待态的线程会释放CPU执行权,并释放资源(如:锁)

  5、超时等待态(TIMED_WAITING)

    当运行中的线程调用sleep(time)、wait、join、parkNanos、parkUntil时,就会进入该状态;
    它和等待态一样,并不是因为请求不到资源,而是主动进入,并且进入后需要其他线程唤醒;
    进入该状态后释放CPU执行权 和 占有的资源。
    与等待态的区别:到了超时时间后自动进入阻塞队列,开始竞争锁。

  6、终止态(TERMINATED)

    线程执行结束后的状态。

三、死锁问题

  如果在生产环境发生了死锁,我们将看到的是部署的程序没有任何反应了,这个时候我们可以借助jstack进行分析

1、构造死锁

  编写代码,启动2个线程,Thread1拿到了obj1锁,准备去拿obj2锁时,obj2已经被Thread2锁定,所以发送了死锁。
package com.zn;

public class LockTest {
//定义资源
private static Object obj1=new Object();
private static Object obj2=new Object();
//线程A:先获取到资源1,然后休眠2s,再获取资源2
private static class ThreadA implements Runnable{
@Override
public void run() {
synchronized (obj1){
System.out.println("ThreadA获取到了OBJ1资源"); try {
//休眠2s,因为我们要将CPU资源让渡出去,这样线程B就可以先抢占obj2资源
Thread.sleep(2000);
} catch (InterruptedException e) {
e.printStackTrace();
} synchronized (obj2){
System.out.println("ThreadA获取到了OBJ2资源");
}
}
}
}
private static class ThreadB implements Runnable{
@Override
public void run() {
synchronized (obj2){
System.out.println("ThreadB获取到了OBJ2资源"); try {
//休眠2s,因为我们要将CPU资源让渡出去,这样线程B就可以先抢占obj2资源
Thread.sleep(2000);
} catch (InterruptedException e) {
e.printStackTrace();
} synchronized (obj1){
System.out.println("ThreadA获取到了OBJ1资源");
}
}
}
} public static void main(String[] args) {
new Thread(new ThreadA()).start();
new Thread(new ThreadB()).start();
}
}

  控制台状态:

    

2、使用jstack进行分析

jstack 40360

  

可以清晰的看到:
  

  Thread2获取了 <0x00000000d5e8f4d0> 的锁,等待获取 <0x00000000d5e8f4c0> 这个锁

  Thread1获取了 <0x00000000d5e8f4c0> 的锁,等待获取 <0x00000000d5e8f4d0> 这个锁

     由此可见,发生了死锁
 

jstack的使用的更多相关文章

  1. 【java】jstack

    介绍 jstack用于打印出给定的java进程ID或core file或远程调试服务的Java堆栈信息,如果是在64位机器上,需要指定选项"-J-d64",Windows的jsta ...

  2. jvm系列(四):jvm调优-命令大全(jps jstat jmap jhat jstack jinfo)

    文章同步发布于github博客地址,阅读效果更佳,欢迎品尝 运用jvm自带的命令可以方便的在生产监控和打印堆栈的日志信息帮忙我们来定位问题!虽然jvm调优成熟的工具已经有很多:jconsole.大名鼎 ...

  3. jstack+top定位性能问题

    定位性能问题,尤其是cpu使用率过高时,经常需要查找cpu消耗较高的线程,然后查看其堆栈,从而进入代码定位问题. 该场景下, jstack+top是一种非常经典的方式. jstack+top:   1 ...

  4. jstack工具查看系统线程问题

    背景: 最近在做项目系统的异常测试,项目依赖于nkv,需要模拟依赖组件nkv异常时系统的响应及性能情况.通过tc工具模拟当服务器发送到nkv的请求超时时系统的响应.发现接口返回错误率100%,查看服务 ...

  5. 使用jstack分析cpu消耗过高的问题

    我们使用jdk自带的jstack来分析.当linux出现cpu被java程序消耗过高时,以下过程说不定可以帮上你的忙: 1.top查找出哪个进程消耗的cpu高 21125 co_ad2    18   ...

  6. Jstack Jmap jstat

    jstack jmap jstat 代码,这里以这个为例怎样使用jstack诊断Java应用程序故障 public class DeadLock { public static void main(S ...

  7. Win下,通过Jstack截取Java进程中的堆栈信息

    在Java软件的使用过程中,有时会莫名的出现奇怪的问题.而这些问题常常无法使用日志信息定位,这时我们就需要通过查看进程内部线程的堆栈调用关系来分析问题出在哪里. 举个例子,当我们在做某个操作时,莫名的 ...

  8. JVM性能调优监控工具jps、jstack、jmap、jhat、jstat、hprof使用详解

    摘要: JDK本身提供了很多方便的JVM性能调优监控工具,除了集成式的VisualVM和jConsole外,还有jps.jstack.jmap.jhat.jstat.hprof等小巧的工具,本博客希望 ...

  9. java jstack命令详解

    名称jstack: stack trace 摘要: jstack [ option ] pid jstack [ option ] executable core jstack [ option ] ...

  10. jstack简单使用,定位死循环、线程阻塞、死锁等问题

    当我们运行java程序时,发现程序不动,但又不知道是哪里出问题时,可以使用JDK自带的jstack工具去定位: 废话不说,直接上例子吧,在window平台上的: 死循环 写个死循环的程序如下: pac ...

随机推荐

  1. Mac环境下 Python3安装及配置

    1.mac 环境下安装 python3 .查看 mac 自带系统版本 #查看系统自带的python open /System/Library/Frameworks/Python.framework/V ...

  2. win10+CUDA9.0176、CUDNN7.6.0安装

    在github上下载了一个文本分类的代码,包含了CNN.LSTM等分类模型,运行时说我的CUDA版本不行,我原来是9.1,让我安装9.0 然后开始卸载9.1啊,在此感谢博主:https://blog. ...

  3. 使用js/jquery动态提交表单数据到搜索引擎或者接口

    现在一般需要用jquery等方式动态提交到某个接口,比如通过iframe <iframe id="mainIframe" name="mainIframe" ...

  4. 数据结构与算法——认识O(NlogN)的排序(1)

    归并排序 1) 整体就是一个简单递归,左边排好序.右边排好序.让其整体有序 2) 让其整体有序的过程里用了外排序方法 3) 利用master公式来求解时间复杂度 4) 归并排序的实质 时间复杂度0(N ...

  5. LeetCode No.136,137,138

    No.136 SingleNumber 只出现一次的数字 题目 给定一个非空整数数组,除了某个元素只出现一次以外,其余每个元素均出现两次.找出那个只出现了一次的元素. 说明:你的算法应该具有线性时间复 ...

  6. Point Estimation

    Point Estimation \(\bullet\)What is point estimation? Example: \(\bullet\) Bevan, Kullberg, and Rice ...

  7. vue 起步(一)

    准备 安装nodejs(下载),Windows 安装包(.msi) npm相关 打开cmd查看npm版本, npm -v,如果没有安装npm,执行npm install npm -g进行安装 查询当前 ...

  8. ByteCode Instrumentation

    Bytecode Instrumentation 定义 我们首先来看看,什么叫"Instrumentation"?Instrumentation这个词有很多意思,在维基百科中,它是 ...

  9. centos xshell wireshark

    centos安装wireshark yum install wireshark yum install wireshark-gnome 本地windows安装Xming Xming X Server ...

  10. Golang Middleware Part 1 · To Be A Better Man

    如何在Golang中实现中间件-Part 1 当使用net/http包实现服务的时候,一般使用的是如下的两中处理方式: http.HandleFunc http.Handle http.HandleF ...