Bug 1064647

Summary: qemu-kvm core dump when hot-plug virtio-blk-pci device with gluster backend
Product: Red Hat Enterprise Linux 7 Reporter: Jun Li <juli>
Component: qemu-kvmAssignee: Jeff Cody <jcody>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: hhuang, juli, juzhang, mazhang, michen, mrezanin, rbalakri, sluo, virt-maint, xfu
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: qemu-kvm-1.5.3-78.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-05 08:04:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Comment 2 Fam Zheng 2014-02-20 10:07:46 UTC
Jeff, since gluster is in the call stack, could you have a look, please?

Thanks,
Fam

Comment 13 mazhang 2014-12-15 07:42:37 UTC
This bug was fixed in glusterfs api, as comment#9 mentioned.
Fixed version fill in qemu-kvm-1.5.3-78.el7 just because it's the first version enforcing glusterfs in version 3.6 or newer.
Glusterfs-api-3.4 is too old, we can't find corresponding gluster-server to reproduce this bug, and drive-mirror only support on qemu-kvm-rhev.
So test this bug on qemu-kvm-rhev and glusterfs-api-3.6.0, make sure it works.

Host:
qemu-kvm-rhev-2.1.2-16.el7.x86_64
qemu-img-rhev-2.1.2-16.el7.x86_64
qemu-kvm-rhev-debuginfo-2.1.2-16.el7.x86_64
qemu-kvm-common-rhev-2.1.2-16.el7.x86_64
ipxe-roms-qemu-20130517-6.gitc4bce43.el7.noarch
qemu-kvm-tools-rhev-2.1.2-16.el7.x86_64
3.10.0-213.el7.x86_64
glusterfs-3.6.0.29-2.el7.x86_64
glusterfs-libs-3.6.0.29-2.el7.x86_64
glusterfs-api-3.6.0.29-2.el7.x86_64

Glusterfs server:
glusterfs-3.6.0.29-3.el6rhs.x86_64
glusterfs-api-3.6.0.29-3.el6rhs.x86_64
glusterfs-fuse-3.6.0.29-3.el6rhs.x86_64
glusterfs-server-3.6.0.29-3.el6rhs.x86_64
glusterfs-libs-3.6.0.29-3.el6rhs.x86_64
glusterfs-cli-3.6.0.29-3.el6rhs.x86_64

Guest:
3.10.0-212.el7.x86_64

Steps:
1. boot guest with:
-drive file=gluster://10.66.106.25/gv0/rhel7-64.qcow2,if=none,format=qcow2,id=disk,cache=none,rerror=stop,werror=stop,serial="QEMU-DISK1",aio=native \

2. Do drive-mirror
{"QMP": {"version": {"qemu": {"micro": 2, "minor": 1, "major": 2}, "package": " (qemu-kvm-rhev-2.1.2-16.el7)"}, "capabilities": []}}
{"execute":"qmp_capabilities"}
{"return": {}}
{ "execute": "drive-mirror", "arguments": { "device": "disk", "target": "/home/juli/sn2", "format": "qcow2", "mode": "absolute-paths", "sync": "full", "speed": 1000000000, "on-target-error": "stop" } }
{"return": {}}

3.Hot plug a virtio-blk-pci.
(qemu)device_add virtio-blk-pci,drive=disk,scsi=off,id=system-disk 

Result:
Qemu-kvm works well, no crash any more.

So this bug has been fixed.

Comment 14 mazhang 2014-12-22 06:24:39 UTC
Test this bug on qemu-kvm-1.5.3-77.el7.x86_64 without mirroring.

Host:
qemu-kvm-tools-1.5.3-77.el7.x86_64
qemu-kvm-common-1.5.3-77.el7.x86_64
qemu-kvm-debuginfo-1.5.3-77.el7.x86_64
qemu-img-1.5.3-77.el7.x86_64
ipxe-roms-qemu-20130517-6.gitc4bce43.el7.noarch
qemu-kvm-1.5.3-77.el7.x86_64
3.10.0-217.el7.x86_64
glusterfs-api-3.6.0.29-2.el7.x86_64
glusterfs-libs-3.6.0.29-2.el7.x86_64
glusterfs-3.6.0.29-2.el7.x86_64


Gluster server:
glusterfs-3.6.0.29-3.el6rhs.x86_64
glusterfs-api-3.6.0.29-3.el6rhs.x86_64
glusterfs-fuse-3.6.0.29-3.el6rhs.x86_64
glusterfs-server-3.6.0.29-3.el6rhs.x86_64
glusterfs-libs-3.6.0.29-3.el6rhs.x86_64
glusterfs-cli-3.6.0.29-3.el6rhs.x86_64

Steps:
1. boot guest with:
gdb --args /usr/libexec/qemu-kvm -M pc -m 4G -smp 4 \
-boot menu=on,reboot-timeout=-1,strict=on -monitor stdio \
-spice port=5932,disable-ticketing \
-vga qxl -global vga-qxl.revision=3 \
-drive file=gluster://10.66.106.25/gv0/rhel7-64.qcow2,if=none,format=qcow2,id=disk,cache=none,rerror=stop,werror=stop,serial="QEMU-DISK1",aio=native \
-qmp tcp::6666,server,nowait \

2. Hot plug a virtio-blk-pci.
(qemu)device_add virtio-blk-pci,drive=disk,scsi=off,id=system-disk 

Result:
qemu-kvm works well, no hit segmentation fault.

Comment 15 juzhang 2014-12-22 06:27:59 UTC
Set this issue as verified according to comment13 and comment14.

Comment 17 errata-xmlrpc 2015-03-05 08:04:02 UTC
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.

https://rhn.redhat.com/errata/RHSA-2015-0349.html