简体   繁体   中英

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM