Bug 1283987

Summary: Aborted (core dumped) for "qemu-kvm: block.c:3332: bdrv_aligned_pwritev: Assertion `!qiov || bytes == qiov->size' failed." after 'lvextend' the guest primary image and 'cont' the installing guest for the 2nd time
Product: Red Hat Enterprise Linux 7 Reporter: Jan Kurik <jkurik>
Component: qemu-kvm-rhevAssignee: Fam Zheng <famz>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 7.2CC: bmcclain, dgibson, famz, gklein, hannsj_uhl, huding, jen, jkurik, juzhang, knoel, kwolf, lvivier, mrezanin, mst, ngu, pbonzini, qzhang, sherold, shuyu, snagar, thuth, virt-maint, xfu, xuhan, yama, ylavi, zhengtli
Target Milestone: rcKeywords: ZStream
Target Release: ---   
Hardware: All   
OS: Unspecified   
Whiteboard:
Fixed In Version: qemu-kvm-rhev-2.3.0-31.el7_2.4 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1277922 Environment:
Last Closed: 2015-12-16 22:49:57 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1277922    
Bug Blocks: 1201513, 1279052    

Description Jan Kurik 2015-11-20 13:16:42 UTC
This bug has been copied from bug #1277922 and has been proposed
to be backported to 7.2 z-stream (EUS).

Comment 16 Yanhui Ma 2015-12-03 02:22:46 UTC
reproduce the issue on x86_64:
host info:
qemu-kvm-rhev-2.3.0-30.el7.x86_64
3.10.0-293.el7.x86_64

steps:
1.Create pv,vg and a 1GB lv on host:
qemu-img create -f raw sdb1 50G
losetup /dev/loop0 /home/sdb1
pvcreate /dev/loop0
vgcreate vg /dev/loop0
lvcreate -n lv1 -L 1G vg

2.Create image on the lv with a large virtual size on the host:
qemu-img create -f qcow2 /dev/vg/lv1 80G

3.install a guest on the lv:
/usr/libexec/qemu-kvm -name lvtest -machine pc,accel=kvm,usb=off \
-m 6G -realtime mlock=off -smp 8,sockets=1,cores=4,threads=2 \
-uuid 95346a10-1828-403a-a610-ac5a52a29411 -no-user-config -nodefaults \
-monitor stdio -rtc base=utc,clock=host -no-shutdown \
-boot strict=on -device nec-usb-xhci,id=xhci \
-device virtio-scsi-pci,id=scsi0 \
-drive id=drive_image1,if=none,cache=none,snapshot=off,aio=native,format=qcow2,file=/dev/vg/lv1 \
-device virtio-blk-pci,id=image1,drive=drive_image1,bus=pci.0,bootindex=1 \
-drive file=/home/RHEL-7.2-20151030.0-Server-x86_64-dvd1.iso,if=none,id=drive-scsi0-0-0-0,readonly=on,format=raw,cache=none \
-device scsi-cd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,bootindex=2 \
-netdev tap,id=hostnet0 \
-device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:c4:e7:11,bus=pci.0,addr=0x9 \
-chardev pty,id=charserial0 \
-device usb-kbd,id=input0 \
-device usb-mouse,id=input1 \
-device usb-tablet,id=input2 \
-vnc 0:1 \
-device VGA,id=video0,bus=pci.0 \
-msg timestamp=on
char device redirected to /dev/pts/4 (label charserial0)
QEMU 2.3.0 monitor - type 'help' for more information
(qemu) info status 
VM status: running
(qemu) 
(qemu) info status 
VM status: paused (io-error)
(qemu) cont 
(qemu) info status 
VM status: running

4.Check guest running status in hmp with cmd 'info status' as that in step3, when it's in 'paused (io-error)' status, extend the lv on host with following cmd and then 'cont' the guest in hmp:
# lvextend -L +512M /dev/vg/lv1
5.Repeat step4 for another time to let the guest installation finish with enough disk space

results:
core dumped or the guest installation could not be finished after a long time

(qemu) info status 
VM status: paused (io-error)
(qemu) cont 
(qemu) ./qemubug1277922: line 19: 31721 Segmentation fault (core dumped) 

===================================================
verify the issue on x86_64:
host info:
qemu-kvm-rhev-2.3.0-31.el7_2.4.x86_64
3.10.0-327.4.1.el7.x86_64

steps:

steps are the same as above

results:
no core dumped, when extend lv to 4GB, the guest can be installed successfully.

Comment 19 errata-xmlrpc 2015-12-16 22:49:57 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/RHBA-2015-2663.html