Bug 618168 - Qemu-kvm in the src host core dump when do migration by using spice
Summary: Qemu-kvm in the src host core dump when do migration by using spice
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.0
Hardware: All
OS: Linux
Target Milestone: rc
: ---
Assignee: Gerd Hoffmann
QA Contact: Virtualization Bugs
: 620748 (view as bug list)
Depends On:
Blocks: 612074
TreeView+ depends on / blocked
Reported: 2010-07-26 10:27 UTC by Mike Cao
Modified: 2013-01-09 22:56 UTC (History)
15 users (show)

Fixed In Version: qemu-kvm-
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2010-11-10 21:26:55 UTC

Attachments (Terms of Use)

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):

How reproducible:

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-
#6  main_loop_wait (timeout=1000) at /usr/src/debug/qemu-kvm-
#7  0x00000000004282ba in kvm_main_loop () at /usr/src/debug/qemu-kvm-
#8  0x000000000040dfab in main_loop (argc=<value optimized out>, argv=<value optimized out>, 
    envp=<value optimized out>) at /usr/src/debug/qemu-kvm-
#9  main (argc=<value optimized out>, argv=<value optimized out>, envp=<value optimized out>)
    at /usr/src/debug/qemu-kvm-

Expected results:

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

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

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-,
Verified on qemu-kvm-

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.

Note You need to log in before you can comment on or make changes to this bug.