I do have a jenkins instance that is stuck in some kind of endless loop without any visible activity.
I can get the pid
of the running process so how do I generate a trace that I can use for a bug report?
I'm running on linux.
I do have a jenkins instance that is stuck in some kind of endless loop without any visible activity.
I can get the pid
of the running process so how do I generate a trace that I can use for a bug report?
I'm running on linux.
Take a look at VisualVM. There is a lot of nice profiling tools with it, and you can perform a thread dump.
Take a thread dump. Connect through Visual VM and request a dump. Or if on unix then kill -3 pid or on windows Ctrl+Break on the process console would do it for you. The dump goes straight to the console. You can also use jstack to throw a dump.
In *nix, with
top
by pressingH
you can see the threads.Then with
jps
you can see thepid
bear in mind that if the process was started with privileges then you must execute it withsudo
for instance.If you take the thread id and converted it to hexadecimal then you can cross that data with the
jstack pid
output.Both tools are in
$JAVA_HOME/bin
.Ctrl+\
on linux (which sendsSIGQUIT
)Ctrl+Break
on windows (which sendsSIGBREAK
under MSVCRT)Try with jstack. It'll give you a full list of what your threads are doing. All it needs is the process pid.