-
Bug
-
Resolution: Not a Bug
-
Normal
-
None
-
rhel-9.6
-
No
-
Moderate
-
rhel-virt-core
-
ssg_virtualization
-
None
-
QE ack
-
False
-
False
-
-
None
-
Red Hat Enterprise Linux
-
None
-
None
-
Automated
-
-
All
-
Linux
-
None
What were you trying to do that didn't work?
When QEs are trying to use the `dump-guest-memory /tmp/vmcore X86_64` command on a VM, the following Python exception is thrown:
Core was generated by `/usr/libexec/qemu-kvm -name avocado-vt-vm1 -sandbox on,elevateprivileges=deny,o'. Program terminated with signal SIGSEGV, Segmentation fault. #0 0x00007ff4ef701cde in ?? () [Current thread is 1 (LWP 35580)] guest RAM blocks: target_start target_end host_addr message count ---------------- ---------------- ---------------- ------- ----- Python Exception <class 'gdb.MemoryError'>: Cannot access memory at address 0x1a2ba58 /home/gdb_command:3: Error in sourced command file: Error occurred in Python: Cannot access memory at address 0x1a2ba58
Please provide the package NVR for which bug is seen:
- kernel-5.14.0-539.el9.x86_64
- edk2-ovmf-20240524-7.el9.noarch
- swtpm-0.8.0-2.el9_4.x86_64
- qemu-kvm-core-9.1.0-1.el9.x86_64
How reproducible:
100%
Steps to reproduce
1. Boot up a KVM guest with `dump-guest-core=on` and x86 add `-device vmcoreinfo`.
2. Kill the qemu-kvm process with SIGSEGV, as root:
3. Open the "coredump" file with gdb, and load the extension with the following command line.
# cat /home/gdb_command source /usr/share/qemu-kvm/dump-guest-memory.py set height 0 dump-guest-memory /tmp/vmcore X86_64 bt quit # file /var/core.35580 /var/core.35580: ELF 64-bit LSB core file, x86-64, version 1 (SYSV), SVR4-style, from '/usr/libexec/qemu-kvm -name avocado-vt-vm1 -sandbox on,elevateprivileges=deny,o', real uid: 0, effective uid: 0, real gid: 0, effective gid: 0, execfn: '/usr/libexec/qemu-kvm', platform: 'x86_64' # gdb /usr/libexec/qemu-kvm --core /var/core.35580 --command=/home/gdb_command
Expected results
guest RAM blocks: target_start target_end host_addr message count ---------------- ---------------- ---------------- ------- ----- 0000000000000000 00000000000a0000 00007f4d3b600000 added 1 00000000000a0000 00000000000b0000 00007f4d3a000000 added 2 ... dumping range at 00007f4d3b400000 for length 0000000000040000 dumping range at 00007f4dfb600000 for length 0000000095100000
Actual results
guest RAM blocks: target_start target_end host_addr message count ---------------- ---------------- ---------------- ------- ----- Python Exception <class 'gdb.MemoryError'>: Cannot access memory at address 0x1a2ba58 /home/gdb_command:3: Error in sourced command file: Error occurred in Python: Cannot access memory at address 0x1a2ba58