Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
This bug will also affect live snapshot, followed by stopping the VM, followed by reverting to the snapshot, if the VM had a host cpu passthrough. Basically, any time we restart a qemu process based on state from a previously running qemu, we have to ensure that we are restarting the new qemu with the same cpu setup.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
http://rhn.redhat.com/errata/RHSA-2012-0748.html
Description of problem: When using 'virsh managedsave' followed by 'virsh start' of a <cpu mode='host-model'> virtual machine, libvirtd crashes inside x86ModelFind(). Version-Release number of selected component (if applicable): libvirt-0.9.10-4.el6.x86_64 How reproducible: Always. Steps to Reproduce: # cat crash-libvirt.sh cat > /tmp/crashvm.xml <<EOF <domain type='kvm'> <name>crashvm</name> <memory>1048576</memory> <currentMemory>1048576</currentMemory> <vcpu>16</vcpu> <os> <type arch='x86_64' machine='pc'>hvm</type> </os> <features> <acpi/> <apic/> <pae/> </features> <cpu mode='host-model' match='exact'> <model fallback='forbid'/> <topology sockets='2' cores='4' threads='2'/> </cpu> <clock offset='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> </domain> EOF virsh define /tmp/crashvm.xml virsh start crashvm virsh managedsave crashvm virsh start crashvm # # sh -x crash-libvirt.sh + cat + virsh define /tmp/crashvm.xml Domain crashvm defined from /tmp/crashvm.xml + virsh start crashvm Domain crashvm started + virsh managedsave crashvm Domain crashvm state saved by libvirt + virsh start crashvm error: Failed to start domain crashvm error: End of file while reading data: Input/output error # Additional info: I couldn't reproduce it on Fedora 16, using libvirt-0.9.6-4.fc16.x86_64. gdb backtrace: Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7f956298d700 (LWP 8093)] 0x00000030437249ea in __strcmp_sse42 () from /lib64/libc.so.6 (gdb) up #1 0x00007f95688e8871 in x86ModelFind (cpu=0x7f954c000fe0, map=0x7f954c000ae0, policy=1) at cpu/cpu_x86.c:791 791 if (STREQ(model->name, name)) (gdb) p name $1 = 0x0 (gdb) up #2 x86ModelFromCPU (cpu=0x7f954c000fe0, map=0x7f954c000ae0, policy=1) at cpu/cpu_x86.c:810 810 if ((model = x86ModelFind(map, cpu->model)) == NULL) { (gdb) p cpu->model $2 = 0x0 (gdb) bt #0 0x00000030437249ea in __strcmp_sse42 () from /lib64/libc.so.6 #1 0x00007f95688e8871 in x86ModelFind (cpu=0x7f954c000fe0, map=0x7f954c000ae0, policy=1) at cpu/cpu_x86.c:791 #2 x86ModelFromCPU (cpu=0x7f954c000fe0, map=0x7f954c000ae0, policy=1) at cpu/cpu_x86.c:810 #3 0x00007f95688e9215 in x86Compute (host=<value optimized out>, cpu=0x7f954c000fe0, guest=0x7f956298beb0) at cpu/cpu_x86.c:1164 #4 0x0000000000475800 in qemuBuildCpuArgStr (conn=0x7f952c000bd0, driver=0x7f9554007280, def=0x7f954c009e10, monitor_chr=0x7f954c005ec0, monitor_json=true, qemuCaps=0x7f954c005f10, migrateFrom=0x4f3343 "stdio", migrateFd=20, snapshot=0x0, vmop=VIR_NETDEV_VPORT_PROFILE_OP_RESTORE) at qemu/qemu_command.c:3677 #5 qemuBuildCommandLine (conn=0x7f952c000bd0, driver=0x7f9554007280, def=0x7f954c009e10, monitor_chr=0x7f954c005ec0, monitor_json=true, qemuCaps=0x7f954c005f10, migrateFrom=0x4f3343 "stdio", migrateFd=20, snapshot=0x0, vmop=VIR_NETDEV_VPORT_PROFILE_OP_RESTORE) at qemu/qemu_command.c:4009 #6 0x000000000048ca06 in qemuProcessStart (conn=0x7f952c000bd0, driver=0x7f9554007280, vm=0x7f9544001570, migrateFrom=0x4f3343 "stdio", start_paused=true, autodestroy=false, stdin_fd=20, stdin_path=0x7f954c000b30 "/var/lib/libvirt/qemu/save/crashvm.save", snapshot=0x0, vmop=VIR_NETDEV_VPORT_PROFILE_OP_RESTORE) at qemu/qemu_process.c:3294 #7 0x000000000045dc1e in qemuDomainSaveImageStartVM (conn=0x7f952c000bd0, driver=0x7f9554007280, vm=0x7f9544001570, fd=0x7f956298c93c, header=0x7f956298c940, path=0x7f954c000b30 "/var/lib/libvirt/qemu/save/crashvm.save", start_paused=false) at qemu/qemu_driver.c:4118 #8 0x000000000045e1d0 in qemuDomainObjRestore (conn=0x7f952c000bd0, driver=0x7f9554007280, vm=0x7f9544001570, flags=0) at qemu/qemu_driver.c:4406 #9 qemuDomainObjStart (conn=0x7f952c000bd0, driver=0x7f9554007280, vm=0x7f9544001570, flags=0) at qemu/qemu_driver.c:4708 #10 0x000000000045e862 in qemuDomainStartWithFlags (dom=0x7f954c0008c0, flags=0) at qemu/qemu_driver.c:4777 #11 0x00007f956890feb6 in virDomainCreate (domain=0x7f954c0008c0) at libvirt.c:8062 #12 0x0000000000439292 in remoteDispatchDomainCreate (server=<value optimized out>, client=<value optimized out>, msg=<value optimized out>, rerr=0x7f956298cbc0, args=<value optimized out>, ret=<value optimized out>) at remote_dispatch.h:852 #13 remoteDispatchDomainCreateHelper (server=<value optimized out>, client=<value optimized out>, msg=<value optimized out>, rerr=0x7f956298cbc0, args=<value optimized out>, ret=<value optimized out>) at remote_dispatch.h:830 #14 0x00007f956894f1f5 in virNetServerProgramDispatchCall (prog=0x14cfe00, server=0x14c4ba0, client=0x14ce280, msg=0x15100e0) at rpc/virnetserverprogram.c:416 #15 virNetServerProgramDispatch (prog=0x14cfe00, server=0x14c4ba0, client=0x14ce280, msg=0x15100e0) at rpc/virnetserverprogram.c:289 #16 0x00007f956894dff1 in virNetServerHandleJob (jobOpaque=<value optimized out>, opaque=<value optimized out>) at rpc/virnetserver.c:164 #17 0x00007f956889366c in virThreadPoolWorker (opaque=<value optimized out>) at util/threadpool.c:144 #18 0x00007f9568892f89 in virThreadHelper (data=<value optimized out>) at util/threads-pthread.c:161 #19 0x0000003043a077f1 in start_thread () from /lib64/libpthread.so.0 #20 0x00000030436e592d in clone () from /lib64/libc.so.6