Bug 618901

Summary: Guest hang during installation on no space
Product: Red Hat Enterprise Linux 6 Reporter: Mike Cao <bcao>
Component: qemu-kvmAssignee: Kevin Wolf <kwolf>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0CC: chellwig, lcapitulino, lihuang, llim, michen, mkenneth, ndai, tburke, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-07-30 07:20:54 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:
Attachments:
Description Flags
Back Trace none

Description Mike Cao 2010-07-28 02:13:42 UTC
Description of problem:
Guest hang during installation on the no_space image.

Version-Release number of selected component (if applicable):
# uname -r
2.6.32-52.el6.x86_64
# rpm -q qemu-kvm
qemu-kvm-0.12.1.2-2.99.el6.x86_64

How reproducible:
100%

Steps to Reproduce:

1. Create a large enough qcow2 file on lvm . 
    e.g : 
   lvcreate -L 1G -n RHEL6 mike
   qemu-img create -f qcow2 /dev/mike/RHEL6 80G

2. Install kvm guest with werror=stop,werror=stop,cache=none
   CLI:/usr/libexec/qemu-kvm -M rhel6.0.0 -cpu qemu64,+sse2,+x2apic -enable-kvm -m 8G -smp 8,sockets=8,cores=1,threads=1 -name RHEL6_64 -uuid `uuidgen` -nodefconfig -monitor stdio -rtc base=utc -boot dc -cdrom /mnt/RHEL620100722.iso -drive file=/dev/mike/RHEL6,if=none,id=drive-ide0-0-0,boot=on,format=qcow2,cache=none -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 -netdev tap,id=hostnet0,vhost=on -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:20:8d:62:99,bus=pci.0,addr=0x5 -chardev pty,id=serial0 -device isa-serial,chardev=serial0 -usb -device usb-tablet,id=input0 -spice port=5931,disable-ticketing -vga std -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 -qmp tcp:0:4444,server,nowait
   
3.  wait until vm pause on no space

4. extend the lvm. #lvextend -L +50M /dev/mike/RHEL6

5. in qmp monitor . issue cont.

   for qmp : {"execute":"cont"}

6 repeat 3~5.
 
Actual results:

After step 6 Guest hang ,qemu monitor and qmp have no response.

Expected results:
Guest pause whenever have no space and installation should be finished finally.


Additional info:

Comment 1 Mike Cao 2010-07-28 02:18:08 UTC
Created attachment 434891 [details]
Back Trace

Comment 2 Dor Laor 2010-07-28 11:32:28 UTC
What's lvdisplay shows? How many times you extend the image? Be sure to do it till it about 2G-5G.

OTH, Kevin, maybe we should dump the offset that triggers the ENOSPAC?

Comment 3 Mike Cao 2010-07-29 05:56:12 UTC
(In reply to comment #2)
> What's lvdisplay shows? 
# lvdisplay /dev/mike/mike_RHEL62
  --- Logical volume ---
  LV Name                /dev/mike/mike_RHEL62
  VG Name                mike
  LV UUID                ohk2kk-Hu3Q-xi9v-Y832-fFUh-9wrZ-EzxoiU
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                2.05 GiB
  Current LE             525
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:13
>How many times you extend the image? 
  2--4 times


I can repoduce this 100% in qemu-kvm-0.12.1.2-2.99.el6 .But can not reproduce
it in qemu-kvm-0.12.1.2-104.el6

Comment 4 Kevin Wolf 2010-07-29 10:04:34 UTC
The only block related changes between 99 and 104 I can see are:

- kvm-block-default-to-0-minimal-optimal-I-O-size.patch [bz#617271]
- kvm-avoid-canceling-ide-dma-rediff.patch [bz#617414]

I don't see an obvious connection between any of them and this report. Christoph, any idea? Mike is going to re-test with virtio-blk, and also versions 101 and 102 in which these patches were introduced.

Comment 6 Mike Cao 2010-07-30 05:54:12 UTC
retest with ide disk.

Actual Results:
in qemu-kvm-0.12.1.2-2.100.el6 can reproduce this issue.
in qemu-kvm-0.12.1.2-2.101.el6 can NOT reproduce this issue.

test with virtio-blk disk.

Actual Results:
test in qemu-kvm-0.12.1.2-2.99,qemu-kvm-0.12.1.2-2.101,qemu-kvm-0.12.1.2-2.104.
NEVER hit this issue.

Comment 7 Mike Cao 2010-07-30 06:01:50 UTC
Reproduced this issue with ide disk in in qemu-kvm-0.12.1.2-2.100.el6

check the image by using #qemu-img check /dev/mike/mike_RHEL6

Results:

Leaked cluster 33599 refcount=1 reference=0
...
Leaked cluster 33614 refcount=1 reference=0

16 leaked clusters were found on the image.
This means waste of disk space, but no harm to data.

Comment 8 Kevin Wolf 2010-07-30 07:20:54 UTC
So it's the IDE reset one. virtio-blk isn't affected and it's fixed in 101. The symptom makes some sense, too. Closing as a duplicate.

*** This bug has been marked as a duplicate of bug 617414 ***