Bug 1369719 - data lost when transfer from guest to host with virtio serial
Summary: data lost when transfer from guest to host with virtio serial
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.3
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Hai Huang
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-24 08:37 UTC by Yiqian Wei
Modified: 2016-10-05 12:25 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-08-26 01:39:17 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 144 0 ovirt-engine-3.6.9 NEW Testing check_bug_url hook (ovirt-engine-3.6.9) 2016-10-05 16:32:32 UTC

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


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