Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1300169

Summary: The md5sum value changed after migration between destination host and guest
Product: Red Hat Enterprise Linux 6 Reporter: Xueqiang Wei <xuwei>
Component: qemu-kvmAssignee: pagupta
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.8CC: ailan, amit.shah, dgilbert, mdeng, michen, mkenneth, ngu, quintela, qzhang, rbalakri, shuang, virt-maint, xuwei, zhanghm.zhm, zhanghongming
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-30 12:05:10 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Xueqiang Wei 2016-01-20 06:01:36 UTC
Description of problem:

connect to host side virtio serial to read data on destination host after migration, the md5sum value changed between host and guest.


Version-Release number of selected component (if applicable):

kernel-2.6.32-595.el6.x86_64
qemu-kvm-rhev-0.12.1.2-2.483.el6


How reproducible:
3/3


Steps to Reproduce:

1. start guest A with virtio-serial
/usr/libexec/qemu-kvm \
-m 2048  \
-smp 2,maxcpus=2,cores=1,threads=1,sockets=2  \
-cpu 'Penryn' \
-vga qxl \
-monitor stdio \
-device virtio-net-pci,mac=fa:f7:f8:5f:fa:5b,id=idn0VnaA,vectors=4,netdev=id8xJhp7,bus=pci.0,addr=06 \
-netdev tap,id=id8xJhp7,vhost=on \
-device virtio-scsi-pci,id=scsi1,bus=pci.0 \
-drive file=/home/autotest/client/tests/virt/shared/data/images/RHEL-Server-7.2-64-virtio-scsi.raw,id=drive-data-disk,if=none,cache=none,snapshot=off,format=raw,media=disk,aio=threads \
-device scsi-hd,id=data-disk,bus=scsi1.0,drive=drive-data-disk \
-spice port=8001,disable-ticketing,agent-mouse=on \
-device virtio-serial-pci,id=virtio-serial0,max_ports=16,bus=pci.0,addr=07 \
-chardev socket,id=channel0,path=/tmp/port0,server,nowait \
-device virtserialport,chardev=channel0,name=org.linux-kvm.port.0,bus=virtio-serial0.0,id=port0,nr=2 \

2. on the host, open the chardev but don't read from it.
[root@intel-q9400-4-1 staf-kvm]# python
Python 2.6.6 (r266:84292, May 22 2015, 08:34:51) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-15)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import socket
>>> sock = socket.socket(socket.AF_UNIX)
>>> sock.connect("/tmp/port0")

3. create 2G size a big file in guest
# dd if=/dev/zero of=2g bs=1M count=2000
 send data from guest
#cat 2g >/dev/vport0p1

4. boot up dst :B guest
/usr/libexec/qemu-kvm \
-m 2048  \
-smp 2,maxcpus=2,cores=1,threads=1,sockets=2  \
-cpu 'Penryn' \
-vga qxl \
-monitor stdio \
-device virtio-net-pci,mac=fa:f7:f8:5f:fa:5b,id=idn0VnaA,vectors=4,netdev=id8xJhp7,bus=pci.0,addr=06 \
-netdev tap,id=id8xJhp7,vhost=on \
-device virtio-scsi-pci,id=scsi1,bus=pci.0 \
-drive file=/home/autotest/client/tests/virt/shared/data/images/RHEL-Server-7.2-64-virtio-scsi.raw,id=drive-data-disk,if=none,cache=none,snapshot=off,format=raw,media=disk,aio=threads \
-device scsi-hd,id=data-disk,bus=scsi1.0,drive=drive-data-disk \
-spice port=8001,disable-ticketing,agent-mouse=on \
-device virtio-serial-pci,id=virtio-serial0,max_ports=16,bus=pci.0,addr=07 \
-chardev socket,id=channel0,path=/tmp/port0,server,nowait \
-device virtserialport,chardev=channel0,name=org.linux-kvm.port.0,bus=virtio-serial0.0,id=port0,nr=2 \
-incoming tcp:0:2222 \

5. migrate from A to B
(qemu)migrate -d tcp:ip:2222

6.start listener on B
#nc -U $host_socket > 2g-host

7. do md5sum for 2g and 2g-host


Actual results:
the md5sum value is different between 2g and 2g-host

Expected results:
the value should be same

Additional info:

Comment 2 Xueqiang Wei 2016-01-21 17:16:54 UTC
Downgrade to the below version also hit the issue.

kernel-2.6.32-595.el6.x86_64
qemu-kvm-rhev-0.12.1.2-2.482.el6

Comment 3 Xueqiang Wei 2016-01-25 10:18:04 UTC
Downgrade to the below version also hit the issue. It is not a regression bug.

kernel-2.6.32-573.19.1.el6.x86_64
qemu-kvm-rhev-0.12.1.2-2.479.el6_7.3

Comment 4 Qunfang Zhang 2016-01-26 03:38:11 UTC
What is the result if transfer data without migration? 

There's a bug closed as wontfix:

Bug 677886 - MD5 of file is different from the original one after transferred via virtio serial

Comment 5 Xueqiang Wei 2016-02-02 10:44:50 UTC
(In reply to Qunfang Zhang from comment #4)
> What is the result if transfer data without migration? 
> 
> There's a bug closed as wontfix:
> 
> Bug 677886 - MD5 of file is different from the original one after
> transferred via virtio serial


The result is passed if follow the test steps in Bug 677886

Comment 6 Xueqiang Wei 2016-02-03 08:50:19 UTC
(In reply to Qunfang Zhang from comment #4)
> What is the result if transfer data without migration? 
> 
> There's a bug closed as wontfix:
> 
> Bug 677886 - MD5 of file is different from the original one after
> transferred via virtio serial


The result is passed if follow the test steps in Bug 677886

In Bug 677886, only transfer data via virtio serial, not contains the following steps:

2. on the host, open the chardev but don't read from it.
[root@intel-q9400-4-1 staf-kvm]# python
Python 2.6.6 (r266:84292, May 22 2015, 08:34:51) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-15)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import socket
>>> sock = socket.socket(socket.AF_UNIX)
>>> sock.connect("/tmp/port0")

5. migrate from A to B
(qemu)migrate -d tcp:ip:2222

Comment 7 Amit Shah 2017-01-30 12:05:10 UTC
(In reply to Xueqiang Wei from comment #6)
> (In reply to Qunfang Zhang from comment #4)
> > What is the result if transfer data without migration? 
> > 
> > There's a bug closed as wontfix:
> > 
> > Bug 677886 - MD5 of file is different from the original one after
> > transferred via virtio serial
> 
> 
> The result is passed if follow the test steps in Bug 677886
> 
> In Bug 677886, only transfer data via virtio serial, not contains the
> following steps:
> 
> 2. on the host, open the chardev but don't read from it.
> [root@intel-q9400-4-1 staf-kvm]# python
> Python 2.6.6 (r266:84292, May 22 2015, 08:34:51) 
> [GCC 4.4.7 20120313 (Red Hat 4.4.7-15)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import socket
> >>> sock = socket.socket(socket.AF_UNIX)
> >>> sock.connect("/tmp/port0")

Even then, the src will have some data in its buffers.  After migration is successful, try this command on the same python prompt:

buffer = sock.recv(4096); print buffer

This should show some data that was cached on the src.  If you concatenate the output on the dest with this output on the src, the files should match.

If that's not the case, please reopen.