migrate cancel bug in latest qemu upstream
Hi quintela, I found a migrate bug in Autotest result, not sure if it's already known.
| commit fa3889162ff724d09eb6b6bd06ba54769100a77f | Merge: 6e72a00 a4960ef | Author: Anthony Liguori <[email protected]> | Date: Sun Mar 10 20:39:17 2013 -0500
It can be caught by migrate.mig_cancel case in Autotest framework. Manual reproduce method: cancel migrate before migration completes
(src monitor) migrate -d tcp:0:1234
(src monitor) migrate cancel
Destination vm exits expectedly
qemu: warning: error while loading state section id 2
Problem:
The migrate status of source vm is 'failed' (it should be 'canceled') (monitor hmp1) Response to 'info migrate'
(monitor hmp1) capabilities: xbzrle: off (monitor hmp1) Migration status: failed (monitor hmp1) total time: 0 milliseconds
Long cmdline: (can reproduce)
# qemu-system-x86_64 --enable-kvm -name 'vm0' -nodefaults -chardev socket,id=serial_id_serial1,path=/tmp/serial-serial1-20130311-182651-kfslPrch,server,nowait -device isa-serial,chardev=serial_id_serial1 -chardev socket,id=seabioslog_id_20130311-182651-kfslPrch,path=/tmp/seabios-20130311-182651-kfslPrch,server,nowait -device isa-debugcon,chardev=seabioslog_id_20130311-182651-kfslPrch,iobase=0x402 -device ich9-usb-uhci1,id=usb1 -drive file='/tmp/kvm_autotest_root/images/RHEL-Server-6.3-64-virtio.qcow2',if=none,id=virtio0 -device virtio-blk-pci,drive=virtio0 -device e1000,netdev=idkrCwff,mac='9a:87:88:89:8a:8b',id='idxiFFqe' -netdev tap,id=idkrCwff -m 2048 -smp 4,maxcpus=4,cores=1,threads=1,sockets=4 -cpu 'Penryn' -M pc -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1 -vnc :1 -vga std -rtc base=utc,clock=host,driftfix=none -boot order=cdn,once=c,menu=off
Simple cmdline: (can reproduce)
# qemu-system-x86_64 --enable-kvm /tmp/kvm_autotest_root/images/RHEL-Server-6.3-64-virtio.qcow2 -m 2048 -vnc :1 -monitor stdio -net none
Thanks, Amos
Quoted 8 lines · Amos Kong
Hi quintela, I found a migrate bug in Autotest result, not sure if it's already known.
| commit fa3889162ff724d09eb6b6bd06ba54769100a77f | Merge: 6e72a00 a4960ef | Author: Anthony Liguori <[email protected]> | Date: Sun Mar 10 20:39:17 2013 -0500
Bug was introduced between v1.1.0..v1.2.0
----
This bug could not be reproduced in current latest qemu.git
| commit 225dc991b03f0f034aa348f5cf499de9d0979107 | Author: Cornelia Huck <[email protected]> | Date: Fri Mar 15 10:57:40 2013 +0100 | | s390: Fix cpu refactoring fallout. |
Quoted 38 lines
It can be caught by migrate.mig_cancel case in Autotest framework. Manual reproduce method: cancel migrate before migration completes
(src monitor) migrate -d tcp:0:1234
(src monitor) migrate cancelDestination vm exits expectedly
qemu: warning: error while loading state section id 2Problem:
The migrate status of source vm is 'failed' (it should be 'canceled') (monitor hmp1) Response to 'info migrate'(monitor hmp1) capabilities: xbzrle: off (monitor hmp1) Migration status: failed (monitor hmp1) total time: 0 millisecondsLong cmdline: (can reproduce)
# qemu-system-x86_64 --enable-kvm -name 'vm0' -nodefaults -chardev socket,id=serial_id_serial1,path=/tmp/serial-serial1-20130311-182651-kfslPrch,server,nowait -device isa-serial,chardev=serial_id_serial1 -chardev socket,id=seabioslog_id_20130311-182651-kfslPrch,path=/tmp/seabios-20130311-182651-kfslPrch,server,nowait(quoted diff) +0
-2-device isa-debugcon,chardev=seabioslog_id_20130311-182651-kfslPrch,iobase=0x402 -device ich9-usb-uhci1,id=usb1 -drivefile='/tmp/kvm_autotest_root/images/RHEL-Server-6.3-64-virtio.qcow2',if=none,id=virtio0 -device virtio-blk-pci,drive=virtio0 -device e1000,netdev=idkrCwff,mac='9a:87:88:89:8a:8b',id='idxiFFqe' -netdev tap,id=idkrCwff -m 2048 -smp 4,maxcpus=4,cores=1,threads=1,sockets=4
-cpu 'Penryn' -M pc -device
usb-tablet,id=usb-tablet1,bus=usb1.0,port=1 -vnc :1 -vga std -rtc base=utc,clock=host,driftfix=none -boot order=cdn,once=c,menu=offSimple cmdline: (can reproduce)
# qemu-system-x86_64 --enable-kvm /tmp/kvm_autotest_root/images/RHEL-Server-6.3-64-virtio.qcow2 -m 2048 -vnc :1 -monitor stdio -net noneThanks, Amos
Quoted 14 lines · Amos Kong
Quoted 8 lines · Amos Kong
Hi quintela, I found a migrate bug in Autotest result, not sure if it's already known.
| commit fa3889162ff724d09eb6b6bd06ba54769100a77f | Merge: 6e72a00 a4960ef | Author: Anthony Liguori <[email protected]> | Date: Sun Mar 10 20:39:17 2013 -0500Bug was introduced between v1.1.0..v1.2.0
----
Quoted 8 lines
This bug could not be reproduced in current latest qemu.git
| commit 225dc991b03f0f034aa348f5cf499de9d0979107 | Author: Cornelia Huck <[email protected]> | Date: Fri Mar 15 10:57:40 2013 +0100 | | s390: Fix cpu refactoring fallout. |
This bug was already fixed by this patch:
commit dba433c03a0f5dc22a459435dd89557886298921
Author: Paolo Bonzini <[email protected]> Date: Fri Feb 22 17:36:17 2013 +0100
migration: simplify error handling
Always use qemu_file_get_error to detect errors, since that is how QEMUFile itself drops I/O after an error occurs. There is no need to propagate and check return values all the time.
Also remove the "complete" member, since we know that it is set (via migrate_fd_cleanup) only when the state changes.
Il 19/03/2013 05:49, Amos Kong ha scritto:
Quoted 17 lines · Amos Kong
Quoted 3 lines · Amos Kong
Quoted 2 lines
Hi quintela, I found a migrate bug in Autotest result, not sure if it's already known.
This bug was already fixed by this patch:
commit
dba433c03a0f5dc22a459435dd89557886298921Author: Paolo Bonzini <[email protected]> Date: Fri Feb 22 17:36:17 2013 +0100migration: simplify error handling
Always use
qemu_file_get_errorto detect errors, since that is how QEMUFile itself drops I/O after an error occurs. There is no need to propagate and check return values all the time.
Quoted 8 lines
Also remove the "complete" member, since we know that it is set (via
migrate_fd_cleanup) only when the state changes.Reviewed-by Orit Wasserman <[email protected]>Reviewed-by Juan Quintela <[email protected]>Signed-off-by Paolo Bonzini <[email protected]>Signed-off-by Juan Quintela <[email protected]>
Should we add these patches to qemu-stable?
5da5aad (migration: simplify while loop, 2013-02-22)
891518a (migration: always use vm_stop_force_state, 2013-02-22)
7a2c172 (migration: move more error handling to migrate_fd_cleanup, 2013-02-22) 04943eb (migration: push qemu_savevm_state_cancel out of qemu_savevm_state_*, 2013-02-22) 93bf210 (qemu-file: pass errno from qemu_fflush via f->last_error, 2013-02-22) 47c8c17 (migration: use qemu_file_set_error to pass error codes back to qemu_savevm_state, 2013-02-22) 4eb9381 (qemu-file: temporarily expose qemu_file_set_error and qemu_fflush, 2013-02-22) f582151 (migration: flush all data to fd when buffered_flush is called, 2013-02-22) 63dfbd7 (migration: use qemu_file_set_error, 2013-02-22)
dba433c (migration: simplify error handling, 2013-02-22)
Paolo