RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1086598 - migrate_cancel wont take effect on previouly wrong migrate -d cmd
Summary: migrate_cancel wont take effect on previouly wrong migrate -d cmd
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm
Version: 7.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Amit Shah
QA Contact: Virtualization Bugs
URL:
Whiteboard:
: 1047943 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-04-11 07:37 UTC by Xiaoqing Wei
Modified: 2015-03-05 08:05 UTC (History)
10 users (show)

Fixed In Version: qemu-kvm-1.5.3-66.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-05 08:05:42 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1047943 0 unspecified CLOSED migration never succeeds after syntax error 2021-02-22 00:41:40 UTC
Red Hat Product Errata RHSA-2015:0349 0 normal SHIPPED_LIVE Important: qemu-kvm security, bug fix, and enhancement update 2015-03-05 12:27:34 UTC

Internal Links: 1047943

Description Xiaoqing Wei 2014-04-11 07:37:41 UTC
Description of problem:
migrate_cancel wont take effect on previouly wrong migrate -d cmd

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


How reproducible:
100%

Steps to Reproduce:
1. boot a src vm

SRC: qemu-kvm -S -monitor stdio
QEMU 1.5.3 monitor - type 'help' for more information
(qemu) VNC server running on `::1:5900'

dst vm in incoming mode
DST: qemu-kvm -S -monitor stdio -incoming tcp:0:8100
QEMU 1.5.3 monitor - type 'help' for more information
(qemu) VNC server running on `::1:5901'
info status 
VM status: paused (inmigrate)

send wrong uri on src
SRC: (qemu) migrate -d 0:8100
migrate: Parameter 'uri' expects a valid migration protocol

2. now try mig w/ correct syntax

(qemu) info migrate
capabilities: xbzrle: off x-rdma-pin-all: off auto-converge: off zero-blocks: off 
Migration status: setup
total time: 0 milliseconds
(qemu) migrate -d tcp:0:8100
migrate: There's a migration process in progress

3. cancel the mig and retry w/ correct syntax

(qemu) migrate_cancel 
(qemu) info migrate
capabilities: xbzrle: off x-rdma-pin-all: off auto-converge: off zero-blocks: off 
Migration status: active
total time: 23569 milliseconds
expected downtime: 0 milliseconds
setup: 0 milliseconds
transferred ram: 0 kbytes
throughput: 0.00 mbps
remaining ram: 0 kbytes
total ram: 148172 kbytes
duplicate: 0 pages
skipped: 0 pages
normal: 0 pages
normal bytes: 0 kbytes
(qemu) migrate -d tcp:0:8100
migrate: There's a migration process in progress


Actual results:
qemu just wont migrate and keep saying a migration process exists

Expected results:
either mig_cancel should take effect
or wrong mig syntax shouldn't create mig process

Additional info:

Comment 2 Amit Shah 2014-04-11 08:55:46 UTC
We need to backport

commit c950114286ea358a93ce632db0421945e1008395
Author: Luiz Capitulino <>
Date:   Sun Dec 29 22:39:58 2013 -0500

    migration: qmp_migrate(): keep working after syntax error
    
    If a user or QMP client enter a bad syntax for the migrate
    command in QMP/HMP, then the migrate command will never succeed
    from that point on.
    
    For example, if you enter:
    
    (qemu) migrate tcp;0:4444
    migrate: Parameter 'uri' expects a valid migration protocol
    
    Then the migrate command will always fail from now on:
    
    (qemu) migrate tcp:0:4444
    migrate: There's a migration process in progress
    
    The problem is that qmp_migrate() sets the migration status to
    MIG_STATE_SETUP and doesn't reset it on syntax error. This bug
    was introduced by commit 29ae8a4133082e16970c9d4be09f4b6a15034617.

Comment 3 Amit Shah 2014-04-14 11:15:41 UTC
*** Bug 1047943 has been marked as a duplicate of this bug. ***

Comment 4 Miroslav Rezanina 2014-07-09 12:17:07 UTC
Fix included in qemu-kvm-1.5.3-66.el7

Comment 5 huiqingding 2014-08-01 02:42:59 UTC
Reproduce this bug using the following version:
qemu-kvm-1.5.3-60.el7.x86_64
kernel-3.10.0-140.el7.x86_64

Steps to Reproduce:
1. boot a src vm
#/usr/libexec/qemu-kvm -S -monitor stdio
QEMU 1.5.3 monitor - type 'help' for more information
(qemu) VNC server running on `::1:5900'

dst vm in incoming mode
# /usr/libexec/qemu-kvm -S -monitor stdio -incoming tcp:0:8100
QEMU 1.5.3 monitor - type 'help' for more information
(qemu) VNC server running on `::1:5901'

2. send wrong uri on src
SRC: (qemu) migrate -d 0:8100
migrate: Parameter 'uri' expects a valid migration protocol

3. send correct uri on src
SRC: (qemu) migrate -d tcp:0:8100
migrate: There's a migration process in progress

Results:
after step3, if user or QMP client enter a bad syntax for the migrate command in QMP/HMP, then the migrate command will never succeed from that point on.

Comment 6 huiqingding 2014-08-01 03:08:34 UTC
Test this issue using the following version on an amd host:
qemu-kvm-1.5.3-66.el7.x86_64
kernel-3.10.0-140.el7.x86_64

Steps to Test:
1. boot a src vm
#/usr/libexec/qemu-kvm -S -monitor stdio -qmp tcp:0:4445,server,nowait
QEMU 1.5.3 monitor - type 'help' for more information
(qemu) VNC server running on `::1:5900'

dst vm in incoming mode
# /usr/libexec/qemu-kvm -S -monitor stdio -incoming tcp:0:8100
QEMU 1.5.3 monitor - type 'help' for more information
(qemu) VNC server running on `::1:5901'

2. send wrong HMP migration cmd on src 
SRC: (qemu) migrate -d 0:8100
migrate: Parameter 'uri' expects a valid migration protocol

3. send correct HMP migration cmd on src 
SRC: (qemu) migrate -d tcp:0:8100

4. boot a src vm
#/usr/libexec/qemu-kvm -S -monitor stdio -qmp tcp:0:4445,server,nowait
QEMU 1.5.3 monitor - type 'help' for more information
(qemu) VNC server running on `::1:5900'

dst vm in incoming mode
# /usr/libexec/qemu-kvm -S -monitor stdio -incoming tcp:0:8100
QEMU 1.5.3 monitor - type 'help' for more information
(qemu) VNC server running on `::1:5901'

5. send wrong QMP migration cmd on src 
{"execute":"qmp_capabilities"}
{"return": {}}
{"execute": "migrate","arguments":{"uri": "0:8100"}} 
{"error": {"class": "GenericError", "desc": "Parameter 'uri' expects a valid migration protocol"}}

6. send correct QMP migration cmd on src 
{"execute": "migrate","arguments":{"uri": "tcp:0:8100"}}
{"return": {}}

Results:
after step3, no error info, and use "info migrate" to check the migration is completed as following
(qemu) info migrate
capabilities: xbzrle: off x-rdma-pin-all: off auto-converge: off zero-blocks: off 
Migration status: completed
total time: 32 milliseconds
downtime: 3 milliseconds
setup: 0 milliseconds
transferred ram: 565 kbytes
throughput: 0.00 mbps
remaining ram: 0 kbytes
total ram: 148172 kbytes
duplicate: 36983 pages
skipped: 0 pages
normal: 60 pages
normal bytes: 240 kbytes

after step6, migration is completed through checking:
{"execute":"query-migrate"} 
{"return": {"status": "completed", "setup-time": 0, "downtime": 3, "total-time": 32, "ram": {"total": 151728128, "remaining": 0, "mbps": 0, "transferred": 579220, "duplicate": 36983, "dirty-pages-rate": 0, "skipped": 0, "normal-bytes": 245760, "normal": 60}}}

Comment 7 huiqingding 2014-08-01 03:13:49 UTC
Test this bug using the following version on an amd host:
qemu-kvm-rhev-2.1.0-3.el7ev.preview.x86_64
kernel-3.10.0-140.el7.x86_64

The steps are same as comment 6, the results are as following:
after step3, no error info, and use "info migrate" to check the migration is completed as following
(qemu) info migrate
capabilities: xbzrle: off x-rdma-pin-all: off auto-converge: off zero-blocks: off 
Migration status: completed
total time: 32 milliseconds
downtime: 3 milliseconds
setup: 0 milliseconds
transferred ram: 565 kbytes
throughput: 0.00 mbps
remaining ram: 0 kbytes
total ram: 148172 kbytes
duplicate: 36983 pages
skipped: 0 pages
normal: 60 pages
normal bytes: 240 kbytes

after step6, migration is completed through checking:
{"execute":"query-migrate"} 
{"return": {"status": "completed", "setup-time": 0, "downtime": 3, "total-time": 32, "ram": {"total": 151728128, "remaining": 0, "mbps": 0, "transferred": 579220, "duplicate": 36983, "dirty-pages-rate": 0, "skipped": 0, "normal-bytes": 245760, "normal": 60}}}

Comment 8 huiqingding 2014-08-01 05:35:32 UTC
Test this bug using the following version on an amd host:
qemu-kvm-1.5.3-66.el7.x86_64
kernel-3.10.0-140.el7.x86_64

The steps are same as comment 6, the results are as following:
after step3, no error info, and use "info migrate" to check the migration is completed as following
(qemu) info migrate
capabilities: xbzrle: off x-rdma-pin-all: off auto-converge: off zero-blocks: off 
Migration status: completed
total time: 32 milliseconds
downtime: 3 milliseconds
setup: 0 milliseconds
transferred ram: 565 kbytes
throughput: 0.00 mbps
remaining ram: 0 kbytes
total ram: 148172 kbytes
duplicate: 36983 pages
skipped: 0 pages
normal: 60 pages
normal bytes: 240 kbytes

after step6, migration is completed through checking:
{"execute":"query-migrate"} 
{"return": {"status": "completed", "setup-time": 0, "downtime": 3, "total-time": 32, "ram": {"total": 151728128, "remaining": 0, "mbps": 0, "transferred": 579220, "duplicate": 36983, "dirty-pages-rate": 0, "skipped": 0, "normal-bytes": 245760, "normal": 60}}}

Comment 9 huiqingding 2014-08-01 05:38:06 UTC
(In reply to huiqingding from comment #8)
> Test this bug using the following version on an amd host:

Correction: this test is on an intel host

> qemu-kvm-1.5.3-66.el7.x86_64
> kernel-3.10.0-140.el7.x86_64
> 
> The steps are same as comment 6, the results are as following:
> after step3, no error info, and use "info migrate" to check the migration is
> completed as following
> (qemu) info migrate
> capabilities: xbzrle: off x-rdma-pin-all: off auto-converge: off
> zero-blocks: off 
> Migration status: completed
> total time: 32 milliseconds
> downtime: 3 milliseconds
> setup: 0 milliseconds
> transferred ram: 565 kbytes
> throughput: 0.00 mbps
> remaining ram: 0 kbytes
> total ram: 148172 kbytes
> duplicate: 36983 pages
> skipped: 0 pages
> normal: 60 pages
> normal bytes: 240 kbytes
> 
> after step6, migration is completed through checking:
> {"execute":"query-migrate"} 
> {"return": {"status": "completed", "setup-time": 0, "downtime": 3,
> "total-time": 32, "ram": {"total": 151728128, "remaining": 0, "mbps": 0,
> "transferred": 579220, "duplicate": 36983, "dirty-pages-rate": 0, "skipped":
> 0, "normal-bytes": 245760, "normal": 60}}}

Comment 10 huiqingding 2014-08-01 05:39:12 UTC
Test this bug using the following version on an intel host:
qemu-kvm-rhev-2.1.0-3.el7ev.preview.x86_64
kernel-3.10.0-140.el7.x86_64

The steps are same as comment 6, the results are as following:
after step3, no error info, and use "info migrate" to check the migration is completed as following
(qemu) info migrate
capabilities: xbzrle: off x-rdma-pin-all: off auto-converge: off zero-blocks: off 
Migration status: completed
total time: 32 milliseconds
downtime: 3 milliseconds
setup: 0 milliseconds
transferred ram: 565 kbytes
throughput: 0.00 mbps
remaining ram: 0 kbytes
total ram: 148172 kbytes
duplicate: 36983 pages
skipped: 0 pages
normal: 60 pages
normal bytes: 240 kbytes

after step6, migration is completed through checking:
{"execute":"query-migrate"} 
{"return": {"status": "completed", "setup-time": 0, "downtime": 3, "total-time": 32, "ram": {"total": 151728128, "remaining": 0, "mbps": 0, "transferred": 579220, "duplicate": 36983, "dirty-pages-rate": 0, "skipped": 0, "normal-bytes": 245760, "normal": 60}}}

Comment 11 Luiz Capitulino 2014-08-01 13:35:21 UTC
The CPU vendor makes no difference for this issue, and your test is good.

Comment 15 errata-xmlrpc 2015-03-05 08:05:42 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2015-0349.html


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