arthas排查程序卡住问题
arthas排查程序卡住问题
线程状态转换图
@startuml
title Java Thread State Transition
skinparam backgroundColor #FFFFFF
skinparam state {
BackgroundColor<<New>> LightBlue
BackgroundColor<<Runnable>> LightGreen
BackgroundColor<<Blocked>> LightCoral
BackgroundColor<<Waiting>> Khaki
BackgroundColor<<Timed_Waiting>> LightGoldenrodYellow
BackgroundColor<<Terminated>> LightGray
BorderColor Black
FontColor Black
FontSize 12
FontName "Segoe UI"
RoundCorner 15
}
skinparam ArrowColor DarkSlateGray
skinparam ArrowFontSize 11
skinparam ArrowFontName "Segoe UI"
skinparam ArrowFontColor DarkSlateGray
legend right
|= 状态 |= 说明 |
| <&circle> New | 新建状态,线程刚创建 |
| <&circle> Runnable | 可运行状态,等待CPU调度 |
| <&circle> Blocked | 阻塞,等待锁监视器 |
| <&circle> Waiting | 无限期等待 |
| <&circle> Timed_Waiting | 有限期等待 |
| <&circle> Terminated | 线程终止 |
endlegend
state "New" as New <<New>>
state "Runnable" as Runnable <<Runnable>>
state "Blocked" as Blocked <<Blocked>>
state "Waiting" as Waiting <<Waiting>>
state "Timed Waiting" as Timed_Waiting <<Timed_Waiting>>
state "Terminated" as Terminated <<Terminated>>
[*] --> New : 线程被创建
New --> Runnable : start()
Runnable --> Blocked : synchronized\n(waiting to enter monitor)
Blocked --> Runnable : synchronized\n(enter monitor)
Runnable --> Waiting : wait()\njoin()\nLockSupport.park()
Waiting --> Runnable : notify()/notifyAll()\n子线程结束\nLockSupport.unpark()\ninterrupt()且enter monitor
Waiting --> Blocked : notify()/notifyAll()\ninterrupt()且wait to enter monitor
Runnable --> Timed_Waiting : sleep()\nwait(long)\njoin(long)\nLockSupport.parkNanos()\nLockSupport.parkUntil()
Timed_Waiting --> Runnable : Timed Waiting结束\nnotify()/notifyAll()\nLockSupport.unpark()\ninterrupt()且enter monitor
Timed_Waiting --> Blocked : Timed Waiting结束\nnotify()/notifyAll()\ninterrupt()且wait to enter monitor
Runnable --> Terminated : 1、线程执行结束\n2、发生异常
Waiting --> Terminated : Exception
Timed_Waiting --> Terminated : Exception
@enduml
arthas排查
dashboard