Bug 618168

Summary: Qemu-kvm in the src host core dump when do migration by using spice
Product: Red Hat Enterprise Linux 6 Reporter: Mike Cao <bcao>
Component: qemu-kvmAssignee: Gerd Hoffmann <kraxel>
Status: CLOSED CURRENTRELEASE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0CC: ajia, akong, clalance, ddumas, kcao, kraxel, lihuang, michen, mjenner, mkenneth, ndai, snagar, syeghiay, tburke, virt-maint
Target Milestone: rcKeywords: Regression, TestBlocker
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: qemu-kvm-0.12.1.2-2.108.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-11-10 21:26:55 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 612074    

Description Mike Cao 2010-07-26 10:27:31 UTC
Description of problem:
Core dumped when live migration by using spice

Version-Release number of selected component (if applicable):
qemu-kvm-0.12.1.2-2.97.el6.

How reproducible:
100%

Steps to Reproduce:
1.start VM with spice in the src host
eg:/usr/libexec/qemu-kvm -M rhel6.0.0 -cpu qemu64,+sse2,+x2apic -enable-kvm -m 2G -smp 8,sockets=8,cores=1,threads=1 -name RHEL6_64 -uuid `uuidgen` -nodefconfig -chardev socket,id=monitor,path=/var/lib/libvirt/qemu/RHEL6_11164.monitor,server,nowait -mon chardev=monitor,mode=control -rtc base=utc -boot c -drive file=/home/RHEL6.0.raw,if=none,id=drive-ide0-0-0,boot=on,format=raw,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=5930,disable-ticketing -vga std -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3

2.start the listening port in dest host <commandLine> -incoming tcp:0:5888
3.Do live migration
  
Actual results:
After migration ,qemu-kvm in the src core dumped with errror msg :qemu-kvm: migration.c:295: migrate_fd_cleanup: Assertion `s->state != 2' failed.

(gdb) bt
#0  0x000000341c8329b5 in raise () from /lib64/libc.so.6
#1  0x000000341c834195 in abort () from /lib64/libc.so.6
#2  0x000000341c82b945 in __assert_fail () from /lib64/libc.so.6
#3  0x00000000004b666c in migrate_fd_cleanup (s=0x2030af0) at migration.c:295
#4  0x00000000004b6745 in migrate_fd_put_ready (opaque=0x2030af0) at migration.c:396
#5  0x000000000040b0d8 in qemu_run_timers (timeout=1000)
    at /usr/src/debug/qemu-kvm-0.12.1.2/vl.c:1166
#6  main_loop_wait (timeout=1000) at /usr/src/debug/qemu-kvm-0.12.1.2/vl.c:4101
#7  0x00000000004282ba in kvm_main_loop () at /usr/src/debug/qemu-kvm-0.12.1.2/qemu-kvm.c:2133
#8  0x000000000040dfab in main_loop (argc=<value optimized out>, argv=<value optimized out>, 
    envp=<value optimized out>) at /usr/src/debug/qemu-kvm-0.12.1.2/vl.c:4274
#9  main (argc=<value optimized out>, argv=<value optimized out>, envp=<value optimized out>)
    at /usr/src/debug/qemu-kvm-0.12.1.2/vl.c:6421



Expected results:


Additional info:
Do live migration with -vnc will not hit this issue.
test in qemu-kvm-0.12.1.2-2.96.el6 will not hit this issue.

Comment 1 Mike Cao 2010-07-27 02:46:22 UTC
Retested in qemu-kvm-0.12.1.2-2.99.el6 

Do migration via tcp procotol,unix procotol,compressed file ,std file, all cause this issue.

Comment 2 Mike Cao 2010-07-27 03:13:52 UTC
According to comment #1,change the summary to "Qemu-kvm in the src host core dump when do migration by using spice" 

After migration ,VM can be used successfully in the dest host.

Comment 3 Gerd Hoffmann 2010-08-03 12:47:12 UTC
Tracked down, will post patch soon.

Comment 4 Gerd Hoffmann 2010-08-03 14:31:36 UTC
*** Bug 620748 has been marked as a duplicate of this bug. ***

Comment 8 Mike Cao 2010-08-05 01:53:40 UTC
Reproduced on qemu-kvm-0.12.1.2-2.106.el6,
Verified on qemu-kvm-0.12.1.2-2.108.el6.

Repeat the steps in comment #0.

Actual Results:
After migration ,No core dumped occurs in the src host.

The bug has been fixed already.

Comment 10 Mike Cao 2010-08-06 07:23:20 UTC
According to comment #8, change status to VERIFIED.

Comment 11 releng-rhel@redhat.com 2010-11-10 21:26:55 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.