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.
Try with jstack. It'll give you a full list of what your threads are doing. All it needs is the process pid.
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.
Ctrl+\
on linux (which sends SIGQUIT
)
Ctrl+Break
on windows (which sends SIGBREAK
under MSVCRT)
In *nix, with top
by pressing H
you can see the threads.
Then with jps
you can see the pid
bear in mind that if the process was started with privileges then you must execute it with sudo
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
.