문제

When we generate a thread dump for JBoss 4.2.3.GA using $JAVA_HOME/bin/jstack on Linux... we get this error:

Can't create thread dump - Thread 745: (state = BLOCKED) Error occurred during stack walking) 

Any ideas why this might be happening? I thought maybe someone was running a heap dump at the same time. Any other ideas?

도움이 되었습니까?

해결책

Thread dump fails when GC is running at that time.

The problem at hand makes the GC run, the very reason to make the thread dump in the first place.

We took a variety of ways to work-around this problem.

  1. cron job generates thread dump every 5 minutes (so that when the problem happens, we always have a recent thread dump that describes what the JVM was up to)
  2. Use kill -3 upon killing process.
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top