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 1369719

Summary: data lost when transfer from guest to host with virtio serial
Product: Red Hat Enterprise Linux 7 Reporter: Yiqian Wei <yiwei>
Component: qemu-kvm-rhevAssignee: Hai Huang <hhuang>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.3CC: chayang, hhuang, juzhang, knoel, mdeng, virt-maint, xfu, yiwei
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-08-26 01:39:17 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 Yiqian Wei 2016-08-24 08:37:55 UTC
Description of problem:


Version-Release number of selected component (if applicable):
kernel-3.10.0-492.el7.x86_64
qemu-kvm-rhev-2.6.0-20.el7.x86_64
seabios-1.9.1-4.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Start guest with 1 virtio-serial-pci and 2 virtio-serial-port.CLI:
/usr/libexec/qemu-kvm  \
-M pc-i440fx-rhel7.3.0 \
-cpu SandyBridge \
-vga qxl \
-smp 4 \
-m 4G \
-name rhel7.3 \
-uuid 990ea161-6b67-47b2-b803-19fb01d30d13 \
-monitor stdio \
-boot menu=on \
-spice port=5930,disable-ticketing,disable-copy-paste \
-qmp tcp:0:4444,server,nowait \
-drive file=/root/chardev.qcow2,if=none,id=drive-virtio-disk0,format=qcow2,cache=none,werror=stop,rerror=stop \
-device virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \
-device virtio-net-pci,netdev=hostnet0,id=net0,mac=9a:6a:6b:6c:6d:61,bus=pci.0,addr=0x5,bootindex=2 \
-netdev tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup \
-device virtio-balloon-pci,id=balloon0 \
-usbdevice tablet \
-device virtio-serial-pci,id=virtio-serial0,max_ports=16,bus=pci.0,addr=0x9 \
-chardev socket,id=channel0,path=/tmp/serial-socket1,server,nowait \
-device virtserialport,chardev=channel0,name=org.linux-kvm.port.1,bus=virtio-serial0.0,id=port1 \
-chardev socket,id=channel1,path=/tmp/serial-socket2,server,nowait \
-device virtserialport,chardev=channel1,name=org.linux-kvm.port.2,bus=virtio-serial0.0,id=port2 \

2.Transferring data from guest to host via port1
(1)dd a big file in guest: 
   #dd if=/dev/zero of=guest-file bs=1M count=500
(2)Host: 
   # nc -U /tmp/serial-socket1 > received-file
(3)Guest: 
   #echo guest-file > /dev/vport3p1


Actual results:
# md5sum received-file 
3ecbb80a7bf68f5440d0078428cbb2c6  received-file

# md5sum guest-file 
d8b61b2c0025919d5321461045c8226f  guest-file

Expected results:
guest-file and received-file md5sum matches.


Additional info:

Transferring data from host to guest ------ md5sum matches

Comment 2 Yiqian Wei 2016-08-25 10:29:05 UTC
I retest,md5sum matches.

  1.Start guest with 1 virtio-serial-pci and 2 virtio-serial-port.CLI:
/usr/libexec/qemu-kvm  \
-M pc-i440fx-rhel7.3.0 \
-cpu SandyBridge \
-vga qxl \
-smp 4 \
-m 4G \
-name rhel7.3 \
-uuid 990ea161-6b67-47b2-b803-19fb01d30d13 \
-monitor stdio \
-boot menu=on \
-spice port=5930,disable-ticketing,disable-copy-paste \
-qmp tcp:0:4444,server,nowait \
-drive file=/root/chardev.qcow2,if=none,id=drive-virtio-disk0,format=qcow2,cache=none,werror=stop,rerror=stop \
-device virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \
-device virtio-net-pci,netdev=hostnet0,id=net0,mac=9a:6a:6b:6c:6d:61,bus=pci.0,addr=0x5,bootindex=2 \
-netdev tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup \
-device virtio-balloon-pci,id=balloon0 \
-usbdevice tablet \
-device virtio-serial-pci,id=virtio-serial0,max_ports=16,bus=pci.0,addr=0x9 \
-chardev socket,id=channel0,path=/tmp/serial-socket1,server,nowait \
-device virtserialport,chardev=channel0,name=org.linux-kvm.port.1,bus=virtio-serial0.0,id=port1 \
-chardev socket,id=channel1,path=/tmp/serial-socket2,server,nowait \
-device virtserialport,chardev=channel1,name=org.linux-kvm.port.2,bus=virtio-serial0.0,id=port2 \

2.Transferring data from guest to host via port1
(1)dd a big file in guest: 
   #dd if=/dev/zero of=guest-file bs=1M count=500
(2)Host: 
   # nc -U /tmp/serial-socket1 > received-file
(3)Guest:
   #cat guest-file > /dev/vport3p1
3.check md5sum
  Guest:
     # md5sum guest-file 
      d8b61b2c0025919d5321461045c8226f  guest-file
  Host:
    # md5sum received-file 
     d8b61b2c0025919d5321461045c8226f  received-file


I'm sorry,As QE misunderstant it.The original issue does not exist so close it,thanks.Any issues please let me know