Monday January 09, 2006
Java process hang - getting stack traces
The other day, I was looking at a java process hang and here are the basic steps followed to get the jvm/native stack traces and core file for further debugging or investigation. I got the deadlock information in the stack!
Solaris platform
Get the entire process tree from your basic command process. Say ps -ef |egrep "java" . Then running ptree pid gives the all the related processes and see the exact process that you would like to have the stack.
Run the following to command to get the stack:
kill -QUIT pid or kill -3 pid
Observe the stack or other information such as deadlock in the console where the command started or connected log or a redirected file.
Use following command to get the native process stack:
pstack pid
To get the core file, use the command - gcore pid .
Windows Platform
Use ctrl+\ on the command window for getting the stack. Not sure if the process started at the background:-(
One of the helpful page, I found is at
http://www.unixville.com/~moazam/stories/2004/05/18/debuggingHangsInTheJvm.html
Posted by Jagadesh Babu Munta
( Jan 09 2006, 12:58:22 PM PST )
Permalink
Comments [19]
Posted by 192.18.42.10 on January 10, 2006 at 02:29 AM PST #
Posted by fdg on February 01, 2006 at 07:30 AM PST #
Posted by Mr.Liu on July 14, 2006 at 02:49 AM PDT #
Posted by cvbc on July 15, 2006 at 05:43 PM PDT #
Posted by sd on July 15, 2006 at 11:42 PM PDT #
Posted by dff on July 20, 2006 at 08:32 PM PDT #
Posted by wer on July 21, 2006 at 08:35 PM PDT #
Posted by gfdgf on July 26, 2006 at 01:23 AM PDT #
Posted by werwe on August 01, 2006 at 07:15 PM PDT #
Posted by werwe on August 07, 2006 at 11:19 PM PDT #
Posted by fdsa on August 15, 2006 at 06:25 AM PDT #
Posted by werwe on September 28, 2006 at 08:35 PM PDT #
Posted by CXZ on October 01, 2006 at 06:50 PM PDT #
Posted by bvc on October 02, 2006 at 12:16 AM PDT #
Posted by asd on October 05, 2006 at 12:14 AM PDT #
Posted by werw on October 11, 2006 at 11:44 PM PDT #
Posted by fdasfdsa on October 12, 2006 at 12:47 AM PDT #
Posted by fdadsfdas on October 15, 2006 at 09:45 PM PDT #
Posted by 3465 on November 06, 2006 at 10:08 PM PST #