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

StackOverflow https://stackoverflow.com/questions/11436793

سؤال

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