Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Jstack log thread analysis

Shulou Source: shulou.com Published: 2022-06-03 04:54:41 11月25日 Update

There are several kinds of thread stack states:

1 、 NEW

2 、 RUNNABLE

3. Before BLOCKED# enters synchronized

4. WAITING# has entered synchronized and called wait ()

5. TIMED_WAITING# has entered synchronized and called sleep ()

6. TERMINATED# thread ends

Thread lock interpretation:

When a thread holds a lock, the thread stack prints a-locked

When a thread is waiting for another thread to release the lock, the thread stack prints a-waiting to lock

When a thread holds a lock but executes on the lock's wait, the thread stack first prints the locked and then prints-waiting on

Tags: Thread stack time current state log analysis Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft Docker vpn NVidia MariaDB