jstack

Getting the Java thread id and stack trace of run-away Java thread

On my busiest production installation, on occasion I get a single thread that seems to get stuck in an infinite loop. I've not managed to figure out who is the culprit, after much research and debugging, but it seems like it should be possible. Here are the gory details: Current debugging notes: 1) ps -eL 18975 shows me the the Linux...

Java stack trace on Windows

I need to get a stack trace for a JVM process running on a client machine that uses windows. The client has the JRE installed but not the JDK. I want to use JStack but it is not installed and we can't install a JDK on the client's machine. I also tried using AdaptJ stack trace product from a Java Webstart Session but that didn't work...

jstack equavalent in C++

Hi, jstack is very helpful to me in checking stack traces of live running processes. Is there any tool in C++ to do this task. I am working with Solaris/GCC compilers. Actually GDB/DBX can do that. But my process is hanging some times that to very rarely. So when that is hanging I want to know where it is going wrong. Just track that ...

Jstack and Not enough storage is available to process this command

I'm trying to run jstack command on my java application. Application is rather big, running inside jboss AS occupying about 4gb of memory. OS is Windows Server 2003 Standard edition. Every time i get an error "Not enough storage is available to process this command". There is enough ram, 16gb, and disk space. So, any ideas? ...

Java threads: interpreting thread states of a running JVM

A Java thread is always in one of the following ten states: NEW: Just starting up, i.e., in process of being initialized. NEW_TRANS: Corresponding transition state (not used, included for completness). IN_NATIVE: Running in native code. IN_NATIVE_TRANS: Corresponding transition state. IN_VM: Running in VM. IN_VM_TRANS: Corresponding tra...

Help with understanding jstack output

I have a desktop Java/Swing application which is deployed via Java Webstart (clients are using Java 6u20 on XP). I have received intermittent reports from users of the application hanging. I managed to log on to such a system during a hang found that the UI was not being drawn (as though EDT was blocked). I used jstack to list the thre...

How 'expensive' is it to execute jstack on a running JVM?

I'm considering whipping up a script to run once a minute (or every five minutes) run jstack against a running JVM in production parse the jstack output and tally up things I'm interested in export the results for graphing 24/365 by a centralized Cacti installation on another server But I've no clue as to how expensive or invasive j...

JStack for Java 1.5?

I want to use the JStack in a Java 1.5 VM. I found in several web pages that a version of JStack exists for this version, but I can't find it. I have versions 1.5.0_22 and 1.5.0_10 of the JDK and jstack is not included. It is included in Java SDK 1.6 Is it a separate download? or is it included in a different revision? ...

Strange thread dump on deadlock

We've been experiencing a strange deadlock during the startup of our java application. When I run jstack on the application to investigate, I see that the AWT-EventQueue is in Object.wait(), but the thread is still marked as RUNNABLE. I've included the relevent parts of the thread dump, and I'm hoping that someone can shed some light o...

How do I create a thread dump via JMX?

I have a Tomcat running as a Windows Service, and those are known not to work well with jstack. jconsole is working well, on the other hand, and I can see stacks of individual threads (I'm connecting to "localhost:port" to access it). How can I use jconsole or a similar tool to dump all the thread stacks into a file? (similar to jstack)...

What to do when tomcat stops responding but access denied to jstack and jmap?

Does anyone know any reason why tomcat might stop responding or any way I can find out why this is happening? Tomcat seems to run fine for many weeks before falling over but it has happened a few times now. I have seen this question http://stackoverflow.com/questions/3063073/tomcat-6-hangs-after-a-few-hours which seems to be the same p...

How can I call jstack programmatically on a 64-bit process?

I've got a little tool to help debug client problems with our Java application. Basically it runs jps.exe to get all the Java processes running on the machine, and then calls jstack and jmap on each of them in turn. Finally, it zips everything up and FTP's it to us for forensic analysis. To run any of the commands it uses the ProcessB...