Bug 893363 - Guest aborted after a 'migrate_cancel'
Guest aborted after a 'migrate_cancel'
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
7.0
Unspecified Unspecified
high Severity high
: rc
: ---
Assigned To: Hai Huang
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-01-09 03:22 EST by Qunfang Zhang
Modified: 2014-06-17 23:20 EDT (History)
6 users (show)

See Also:
Fixed In Version: QEMU 1.4
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-06-13 07:05:02 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
gdb log for the aborted issue after 'migrate_cancel' (44.03 KB, text/plain)
2013-01-09 03:24 EST, Qunfang Zhang
no flags Details

  None (edit)
Description Qunfang Zhang 2013-01-09 03:22:39 EST
Description of problem:
This issue is found accompanied with bug 893350. Please check bug 893350 first. As the migration doesn't finish and only 4k ram are left so I used 'migrate_cancel' to cancel to migration process. But sometimes guest will aborted.  Open this separate issue to track the aborted issue.

Version-Release number of selected component (if applicable):
kernel-3.6.0-0.29.el7.x86_64
qemu-kvm-1.3.0-3.el7.x86_64

How reproducible:
Sometimes. (Hit twice after five time attempts)


Steps to Reproduce:
. Boot a guest on src host, and also boot it with listening mode (-incoming tcp:0:5800" on dst host.

2. Running a memory r/w generator inside guest:

#cat test.c

#include <stdlib.h>
main()
//example to generate dirty pages and delay migration for demo purposes:
{
    unsigned char *array;
    long int i,j,k;
    unsigned char c;
    long int loop=0;
    array=malloc(1024*1024*1024);
    while(1)
    {
        for(i=0;i<1024;i++)
 {
            c=0;
            for(j=0;j<1024;j++)
            {
                c++;
                for(k=0;k<1024;k++)
                {
                    array[i*1024*1024+j*1024+k]=c;
                }
            }
        }
        loop++;
    }
}

#gcc test.c -o test
#./test

3. On dst host:
(qemu) migrate_set_capability xbzrle on 

4. On source host:
(qemu) migrate_set_capability xbzrle on 
(qemu) migrate_cache_size 2G
(qemu) migrate -d tcp:$dst_host_ip:5800

5. When "(qemu)info migrate" shows only 4k ram are left and migration never finished. Cancel migration process.
(qemu) migrate_cancel
  
Actual results:
Guest aborted. (Please check the attachment for detail log.)

Expected results:
Guest works well, migration is cancelled.

Additional info:
Comment 1 Qunfang Zhang 2013-01-09 03:24:01 EST
Created attachment 675303 [details]
gdb log for the aborted issue after 'migrate_cancel'
Comment 3 Orit Wasserman 2013-01-10 04:54:08 EST
Fixed in qemu 1.4:
http://lists.gnu.org/archive/html/qemu-devel/2012-12/msg02939.html
Comment 8 mazhang 2014-01-21 02:34:18 EST
Can not reproduce this bug after 10 times try.

Host:
RHEL-7.0-20130306.0
qemu-kvm-1.3.0-3.el7.x86_64
ipxe-roms-qemu-20130517-2.gitc4bce43.el7.noarch
qemu-img-1.3.0-3.el7.x86_64
qemu-kvm-tools-1.3.0-3.el7.x86_64
qemu-kvm-common-1.3.0-3.el7.x86_64
qemu-kvm-debuginfo-1.3.0-3.el7.x86_64
kernel-3.7.0-0.36.el7.x86_64

Will update to the latest qemu-kvm and kernel then test this bug.
Comment 9 mazhang 2014-01-26 04:08:22 EST
(In reply to mazhang from comment #8)
> Can not reproduce this bug after 10 times try.
> 
> Host:
> RHEL-7.0-20130306.0
> qemu-kvm-1.3.0-3.el7.x86_64
> ipxe-roms-qemu-20130517-2.gitc4bce43.el7.noarch
> qemu-img-1.3.0-3.el7.x86_64
> qemu-kvm-tools-1.3.0-3.el7.x86_64
> qemu-kvm-common-1.3.0-3.el7.x86_64
> qemu-kvm-debuginfo-1.3.0-3.el7.x86_64
> kernel-3.7.0-0.36.el7.x86_64
> 
> Will update to the latest qemu-kvm and kernel then test this bug.

Confirm with qzhang my steps, then update qemu-kvm and kernel re-test this bug.

Host:
qemu-kvm-1.5.3-39.el7.x86_64
kernel-3.10.0-78.el7.x86_64

Guest:
kernel-3.10.0-64.el7.x86_64

Steps:
1. Start qemu-kvm :
/usr/libexec/qemu-kvm \
-M pc \
-cpu Nehalem \
-m 2G \
-smp 4,sockets=2,cores=2,threads=1,maxcpus=16 \
-enable-kvm \
-name rhel7-64 \
-uuid 990ea161-6b67-47b2-b803-19fb01d30d12 \
-smbios type=1,manufacturer='Red Hat',product='RHEV Hypervisor',version=el6,serial=koTUXQrb,uuid=feebc8fd-f8b0-4e75-abc3-e63fcdb67170 \
-k en-us \
-rtc base=localtime,clock=host,driftfix=slew \
-nodefaults \
-monitor stdio \
-qmp tcp:0:6666,server,nowait \
-boot menu=on \
-bios /usr/share/seabios/bios.bin \
-chardev socket,id=seabioslog,path=/tmp/seabios,server,nowait \
-device isa-debugcon,chardev=seabioslog,iobase=0x402 \
-monitor unix:/tmp/guest-sock,server,nowait \
-netdev tap,id=hostnet0,vhost=on \
-device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:39:13:2c \
-device virtio-balloon-pci,id=balloon0 \
-chardev socket,id=qmp_id_qmpmonitor1,path=/tmp/monitor-qmp,server,nowait \
-mon chardev=qmp_id_qmpmonitor1,mode=control  \
-drive file=/home/rhel7-64.raw,if=none,id=drive-virtio-disk0,format=raw,cache=none,werror=stop,rerror=stop,aio=threads \
-device virtio-blk-pci,scsi=off,bus=pci.0,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \
-vga qxl \
-spice port=5900,disable-ticketing \

2. Run the application generate dirty pages.

3. Enablem xbzrle, and migrate guest.

Result:
Qemu-kvm works well,migration success, not found core dumped after try more then 10 times.

So this bug has been fixed.
Comment 12 Ludek Smid 2014-06-13 07:05:02 EDT
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.

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