Bug 1026726

Summary: Guest hang after loading from compressed file (migration)
Product: Red Hat Enterprise Linux 7 Reporter: CongLi <coli>
Component: qemu-kvmAssignee: Hai Huang <hhuang>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: acathrow, coli, hhuang, juzhang, michen, quintela, qzhang, shuang, virt-maint, xwei
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-03-03 15:03:49 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:

Description CongLi 2013-11-05 10:13:11 UTC
Description of problem:
Guest hang after loading from compressed file (migration)

Version-Release number of selected component (if applicable):
kernel-3.10.0-40.el7.x86_64
qemu-kvm-rhev-1.5.3-11.el7.x86_64

How reproducible:
50%

Steps to Reproduce:
1. Boot up a Win2012 guest (src):
/root/staf-kvm-devel/autotest-devel/client/tests/virt/qemu/qemu \
    -name 'virt-tests-vm1' \
    -drive file='/root/staf-kvm-devel/autotest-devel/client/tests/virt/shared/data/images/win2012-64-virtio.qcow2',index=0,if=none,id=drive-virtio-disk1,media=disk,cache=none,snapshot=off,format=qcow2,aio=native \
    -device virtio-blk-pci,bus=pci.0,addr=0x5,drive=drive-virtio-disk1,bootindex=0 \
    -device virtio-net-pci,netdev=idHLyVYO,mac='9a:ce:cf:d0:d1:d2',bus=pci.0,addr=0x3,id='idls0KJF' \
    -netdev tap,id=idHLyVYO,vhost=on \
    -m 4096 \
    -smp 4,maxcpus=4,cores=2,threads=1,sockets=2 \
    -cpu 'SandyBridge' \
    -M pc-i440fx-rhel7.0.0 \
    -vga qxl \
    -global qxl-vga.vram_size=33554432 \
    -boot order=cdn,once=c,menu=off   \
    -enable-kvm \
    -monitor stdio \
    -spice port=3000,password=123456 \
                                                                      
2. Migrate guest to a compressed file:
   (qemu) migrate -d  "exec:gzip -c > /var/tmp/exec-OP1vzjHD"

3. Make sure migration completed:
   (qemu) info migrate
   capabilities: xbzrle: off auto-converge: off zero-blocks: off 
   Migration status: completed
   total time: 39168 milliseconds
   downtime: 38 milliseconds
   transferred ram: 784558 kbytes
   remaining ram: 0 kbytes
   total ram: 4293064 kbytes
   duplicate: 911039 pages
   skipped: 0 pages
   normal: 193758 pages
   normal bytes: 775032 kbytes
   (qemu) info status
   VM status: paused (postmigrate)

4. Load guest from the compressed file in the same host (dest):
   /root/staf-kvm-devel/autotest-devel/client/tests/virt/qemu/qemu \
    -name 'virt-tests-vm1' \
    -drive file='/root/staf-kvm-devel/autotest-devel/client/tests/virt/shared/data/images/win2012-64-virtio.qcow2',index=0,if=none,id=drive-virtio-disk1,media=disk,cache=none,snapshot=off,format=qcow2,aio=native \
    -device virtio-blk-pci,bus=pci.0,addr=0x5,drive=drive-virtio-disk1,bootindex=0 \
    -device virtio-net-pci,netdev=idHLyVYO,mac='9a:ce:cf:d0:d1:d2',bus=pci.0,addr=0x3,id='idls0KJF' \
    -netdev tap,id=idHLyVYO,vhost=on \
    -m 4096 \
    -smp 4,maxcpus=4,cores=2,threads=1,sockets=2 \
    -cpu 'SandyBridge' \
    -M pc-i440fx-rhel7.0.0 \
    -vga qxl \
    -global qxl-vga.vram_size=33554432 \
    -boot order=cdn,once=c,menu=off   \
    -enable-kvm \
    -monitor stdio \
    -spice port=3001,password=123456 \
    -incoming "exec:gzip \
    -c \
    -d /var/tmp/exec-OP1vzjHD"

5. Check guest can still work:
   (qemu) info status
   VM status: running

Actual results:
1. Guest hang
2. There is no response when do 'system_powerdown'. (But system_reset will work)
   (qemu) system_powerdown 

Expected results:
Guest works well after loading from compressed file

Additional info:
1. cpuinfo:
processor	: 23
vendor_id	: GenuineIntel
cpu family	: 6
model		: 45
model name	: Intel(R) Xeon(R) CPU E5-2620 0 @ 2.00GHz
stepping	: 7
microcode	: 0x710
cpu MHz		: 1740.000
cache size	: 15360 KB
physical id	: 1
siblings	: 12
core id		: 5
cpu cores	: 6
apicid		: 43
initial apicid	: 43
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid
bogomips	: 4004.10
clflush size	: 64
cache_alignment	: 64
address sizes	: 46 bits physical, 48 bits virtual
power management:

Comment 2 CongLi 2013-11-05 10:52:00 UTC
Also can be reproduced on the latest version:
qemu-kvm-rhev-1.5.3-13.el7.x86_64