Bug 1334340

Summary: the guest is crashed/rebooted during multiple attempts of disk addition
Product: Red Hat Enterprise Linux 7 Reporter: shajyan
Component: qemu-kvm-rhevAssignee: Laurent Vivier <lvivier>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.3CC: jen, juzhang, knoel, lvivier, qzhang, shajyan, thuth, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: ppc64le   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-11 15:43:00 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:

Description shajyan 2016-05-09 12:18:16 UTC
trying to attach a virtual disk image, after the 2nd attempt the guest is crashed/rebooted.

The disk.xml contains:

<?xml version='1.0' encoding='UTF-8'?>
<disk type="file"><driver name="qemu" type="raw" /><source file="/tmp/tmp_disk.raw" /><target bus="virtio" dev="vdb" /></disk>

the /tmp/tmp_disk.raw exists.


virsh attach-device avocado-vt-vm1 disk.xml
Device attached successfully


Before attaching the disk there are the following devices on the guest:

ls -ld /dev/vd*
brw-rw---- 1 root disk 252, 0 Mai  4 09:39 /dev/vda
brw-rw---- 1 root disk 252, 1 Mai  4 09:39 /dev/vda1
brw-rw---- 1 root disk 252, 2 Mai  4 09:39 /dev/vda2
brw-rw---- 1 root disk 252, 3 Mai  4 09:39 /dev/vda3

After attaching:

ls -ld /dev/vd*
brw-rw---- 1 root disk 252,  0 Mai  4 09:39 /dev/vda
brw-rw---- 1 root disk 252,  1 Mai  4 09:39 /dev/vda1
brw-rw---- 1 root disk 252,  2 Mai  4 09:39 /dev/vda2
brw-rw---- 1 root disk 252,  3 Mai  4 09:39 /dev/vda3
brw-rw---- 1 root disk 252, 16 Mai  4 09:39 /dev/vdb

The /dev/vdb is a new one. Seems everything is correct here. Then after deleting the new vdb from the guest we have the following layout:

ls -ld /dev/vd*
brw-rw---- 1 root disk 252, 0 Mai  4 09:39 /dev/vda
brw-rw---- 1 root disk 252, 1 Mai  4 09:39 /dev/vda1
brw-rw---- 1 root disk 252, 2 Mai  4 09:39 /dev/vda2
brw-rw---- 1 root disk 252, 3 Mai  4 09:39 /dev/vda3

Then after adding the same disk to the guest for the 2nd time the guest is crashed/rebooted again and the new layout looks like: (/dev/vda is the added disk)

ls -ld /dev/vd*
brw-rw---- 1 root disk 252,  0 Mai  4 09:40 /dev/vda
brw-rw---- 1 root disk 252, 16 Mai  4 09:40 /dev/vdb
brw-rw---- 1 root disk 252, 17 Mai  4 09:40 /dev/vdb1
brw-rw---- 1 root disk 252, 18 Mai  4 09:40 /dev/vdb2
brw-rw---- 1 root disk 252, 19 Mai  4 09:40 /dev/vdb3


qemu version:
qemu-kvm-common-rhev-2.5.0-4.el7.ppc64le
qemu-kvm-rhev-2.5.0-4.el7.ppc64le
qemu-kvm-tools-rhev-2.5.0-4.el7.ppc64le
qemu-img-rhev-2.5.0-4.el7.ppc64le

kernel version:
3.10.0-373.el7.ppc64le #1 SMP Tue Apr 5 19:12:32 EDT 2016 ppc64le ppc64le ppc64le GNU/Linux

Comment 1 shajyan 2016-05-09 12:32:38 UTC
Probably can be related to hot-unplug disk BZ 1318181

Comment 3 Thomas Huth 2016-05-11 08:55:56 UTC
Could this be a bug with qemu-kvm-rhev-2.5.0 only? I gave it a quick try with version 2.3.0, and I was not able to reproduce the crash. Then I had a try with 2.5.0, and my guest crashed, too. Then I upgraded to qemu-kvm-rhev-2.6.0-rc0, and the crash did not occur anymore.

Comment 5 shajyan 2016-05-11 09:57:40 UTC
Thanks. Probably it could be a qemu-kvm-rhev bug. Later on I will test with your 2.6 build to see how it works in my case.

Comment 6 Laurent Vivier 2016-05-11 10:45:29 UTC
I'm going to bisect qemu to find what is the fixing commit.

Comment 7 Laurent Vivier 2016-05-11 12:17:42 UTC
upstream qemu-2.5.0 works fine whereas qemu-kvm-rhev-2.5.0 doesn't.

Comment 10 shajyan 2016-05-17 11:26:59 UTC
I have now the recent qemu-kvm-rhev-2.6.0-2.el7.ppc64le built today.. and the guest crash/bug still exists..

Comment 13 shajyan 2016-05-18 06:58:21 UTC
Thanks

I tried with those packages and still the guest is being crashed... maybe there could be something else which causes such an effect?