21.3. Backtracing virtual machine processes
When a process related to a virtual machine (VM) malfunctions, you can use the gstack
command along with the process identifier (PID) to generate an execution stack trace of the malfunctioning process. If the process is a part of a thread group then all the threads are traced as well.
Conditions préalables
Ensure that the
GDB
package is installed.For details about installing
GDB
and the available components, see Installing the GNU Debugger.Make sure you know the PID of the processes that you want to backtrace.
You can find the PID by using the
pgrep
command followed by the name of the process. For example:# pgrep libvirt 22014 22025
Procédure
Use the
gstack
utility followed by the PID of the process you wish to backtrace.For example, the following command backtraces the libvirt process with the PID 22014.
# gstack 22014 Thread 3 (Thread 0x7f33edaf7700 (LWP 22017)): #0 0x00007f33f81aef21 in poll () from /lib64/libc.so.6 #1 0x00007f33f89059b6 in g_main_context_iterate.isra () from /lib64/libglib-2.0.so.0 #2 0x00007f33f8905d72 in g_main_loop_run () from /lib64/libglib-2.0.so.0 ...
Ressources supplémentaires
-
The
gstack
man page - GNU Debugger (GDB)
Additional resources for reporting virtual machine problems and providing logs
To request additional help and support, you can:
Raise a service request using the redhat-support-tool command line option, the Red Hat Portal UI, or several different methods using FTP.
- To report problems and request support, see Open a Support Case.
Upload the SOS Report and the log files when you submit a service request.
This ensures that the Red Hat support engineer has all the necessary diagnostic information for reference.
- For more information about SOS reports, see What is an SOS Report and how to create one in Red Hat Enterprise Linux?
- For information about attaching log files, see How to provide files to Red Hat Support?