사용자 도구

사이트 도구


java:performance:threaddump

문서의 이전 판입니다!


Java ThreadDump

waiting 하고 있는 monitor가 있는데 어느 쓰레드가 해당 monitor를 locking 하고 있는지 정보가 없는 상황

  • Thread Dump를 떴을 때 분명 wait for <monitor_num>은 존재하는데 locked <nonitor_num>은 존재하지 않는 경우가 있음.
  • TDA 가 출력한 내용에 따르면,
    • a VM Thread is holding it.
    • This lock is a java.util.concurrent lock and the thread holding it is not reported in the stack tracebecause the JVM option -XX:+PrintConcurrentLocks is not present.
    • This lock is a custom java.util.concurrent lock either not based off of AbstractOwnableSynchronizer or not setting the exclusive owner when a lock is granted.
  • 일반적으로는 java.util.concurrent lock 인 경우로 보이며 JVM option -XX:+PrintConcurrentLocks로 JVM을 띄워야 명백히 lock을 잡은 쓰레드가 보임.

nid/tid

  • tid : java가 스스로 붙이는 쓰레드 단위 ID
  • nid : Native ID. OS 차원의 쓰레드 ID, linux에서는 top -H로 볼 때 PID라고 보임.
  • topjstack 조합하기 : Inspecting Java threads in Linux using top

참조

java/performance/threaddump.1523003576.txt.gz · 마지막으로 수정됨: 2018/04/06 17:02 저자 kwon37xi