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 623552 - SCP image fails from host to guest with vhost on when do migration
Summary: SCP image fails from host to guest with vhost on when do migration
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.1
Hardware: All
OS: Linux
high
medium
Target Milestone: beta
: 6.1
Assignee: jason wang
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: Rhel6KvmTier1 642595
TreeView+ depends on / blocked
 
Reported: 2010-08-12 06:18 UTC by juzhang
Modified: 2013-01-09 23:00 UTC (History)
13 users (show)

Fixed In Version: qemu-kvm-0.12.1.2-2.129.el6
Doc Type: Bug Fix
Doc Text:
Cause: bug when syncing the dirty bits of vhost in qemu-kvm Consequence: Some dirty pages may not be transferred to dest host and the scp may fail during migration. Fix: Fix dirty page bit sync code in vhost. Result: scp during migration would not fail anymore.
Clone Of:
Environment:
Last Closed: 2011-05-19 11:26:14 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:0534 0 normal SHIPPED_LIVE Important: qemu-kvm security, bug fix, and enhancement update 2011-05-19 11:20:36 UTC

Description juzhang 2010-08-12 06:18:09 UTC
Description of problem:
First boot guest in hostA. second,scp a big .qcow image(rhel6.0_2.59_64.qcow2)
to guest.in the process of scp image,do migration from hostA to HostB.Once migration completed,scp failed immediately.

Version-Release number of selected component (if applicable):
Host Kernel and qemu-kvm version
#uname -r 
2.6.32-62.el6.x86_64
#rpm -q qemu-kvm
qemu-kvm-0.12.1.2-2.109.el6.x86_64

Guest kernel
uname -r
#2.6.32-59.1.el6.x86_64


How reproducible:

Steps to Reproduce:
1.Boot guest in HostA
# /usr/libexec/qemu-kvm -m 4G -smp 2 -drive
file=/home/rhel6.0_2.59_64.qcow2,if=none,id=test,boot=on,cache=none,format=qcow2,
werror=stop,rerror=stop -device virtio-blk-pci,drive=test -cpu qemu64,+sse2,+x2apic,-kvmclock -monitor
stdio -drive
file=/root/zhangjunyi/boot.iso,if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw
-device ide-drive,drive=drive-ide0-1-0 -boot order=cdn,menu=on -netdev
tap,id=hostnet0,vhost=on -device
virtio-net-pci,netdev=hostnet0,id=net0,mac=22:11:22:45:66:94 -vnc :10 -qmp
tcp:0:4445,server,nowait


2.Boot listening mode in remote HostB.
#<commandLine> -incoming tcp:0:5555

3.After guest booted,scp rhel6.0_2.59_64.qcow2 from HostA to guest.
#scp rhel6.0_2.59_64.qcow2 10.66.91.95:/root

4.In the process of scp image,do migration from hostA to HostB
#{"execute": "migrate","arguments":{"uri": "tcp:10.66.91.104:5555"}}


Actual results:
Once migration completed,we will see the following messages.
#scp rhel6.0_2.59_64.qcow2 10.66.91.186:/root/
root.91.186's password: 
rhel6.0_2.59_64.qcow2                                                          
                                            29%  541MB   2.5MB/s   08:49
ETAReceived disconnect from 10.66.91.186: 2: Packet corrupt
lost connection

We can reconnect the guest after scp failed.we can do this command again
#scp rhel6.0_2.59_64.qcow2 10.66.91.186:/root/
root.91.186's password: 
rhel6.0_2.59_64.qcow2                                                          
                                            16%  304MB  44.2MB/s   00:35 ETA

Expected results:
scp big file from host to guest successful when do migration. 


Additional info:
Please note the following message
1.If we set vhost=off.command "scp rhel6.0_2.59_64.qcow2 10.66.91.186:/root/"
can completed successful.this is issue only hit when vhost=on.

2.If no migration,we just execute "scp rhel6.0_2.59_64.qcow2
10.66.91.186:/root/".both can completed successful whatever vhost=on/vhost=off.

Comment 3 Alex Williamson 2010-08-30 18:12:36 UTC
I suspect this problem occurs because the vhost device is not stopped until the virtio-net save routine is called.  At this point a final dirty bitmap sync is done with the kernel, but qemu has already done it's final rounds of syncing dirty pages, so these changes are lost.  Re-assigning to Michael to resolve.

Comment 6 Michael S. Tsirkin 2010-10-27 11:00:25 UTC
If the issue happens after migration, try
ae8894c00b560bde4cbbc2115f532df997e15d14

git://git.kernel.org/pub/scm/virt/kvm/kvm.git

Comment 7 Michael S. Tsirkin 2010-11-04 05:03:03 UTC
Try this kernel build
https://brewweb.devel.redhat.com/taskinfo?taskID=2861817
if this fixes the issue it's a kernel bug same as 647367.

Comment 8 Michael S. Tsirkin 2010-11-04 13:33:13 UTC
Additionally, please try running with sndbuf=0 option for tap,
to check whether this is the issue of packets sent after
migration confusing the bridge.

Comment 14 juzhang 2011-01-24 01:24:35 UTC
Verified on on qemu-kvm-0.12.1.2-2.129.el6.x86_64,tested two times using steps as same as comment0,didn't hit this issue.this issue has been fixed.

Comment 16 jason wang 2011-05-05 09:43:17 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause: bug when syncing the dirty bits of vhost in qemu-kvm

Consequence: Some dirty pages may not be transferred to dest host and the scp may fail during migration.

Fix: Fix dirty page bit sync code in vhost.

Result: scp during migration would not fail anymore.

Comment 17 errata-xmlrpc 2011-05-19 11:26:14 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-0534.html

Comment 18 errata-xmlrpc 2011-05-19 12:46:57 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-0534.html


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