If you find yourself doing something tricky with threads, such as rooting out some insidious thread deadlocks, jconsole is invaluable. Having it analyze the threads to get the deadlocks is awesome, and the stack trace even includes identifiers about what object monitors have been locked. Way better than sorting through all that, by hand, from a text stack dump.
3 comments:
I saw "jsconsole" instead of jconsole and got all excited :)
Ooops. Fixed.
kill -QUIT is there for this purpose too, and works over SSH. There is a patch for Hadoop that will run this automatically when a forked process is killed, so that you get a stack trace of where the app was when it died.
Post a Comment