Bug 985178 - fail to transfer small size data from guest to host after switch ports with virtio serial through the TCP socket
fail to transfer small size data from guest to host after switch ports with v...
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
6.5
Unspecified Unspecified
low Severity medium
: rc
: ---
Assigned To: Amit Shah
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-16 23:40 EDT by Sibiao Luo
Modified: 2014-08-19 07:38 EDT (History)
12 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-08-19 07:38:57 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Sibiao Luo 2013-07-16 23:40:43 EDT
Description of problem:
boot guest with virtio serial though the unix socket, and try to transfer small size data from guest to host, but if i switch the ports that will fail to transfer data.
btw, if do the same testing that transfer from host to guest that has no such issue.

Version-Release number of selected component (if applicable):
host info:
2.6.32-398.el6.x86_64
qemu-kvm-0.12.1.2-2.378.el6.x86_64
guest info:
2.6.32-398.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1.boot guest with virtio serial though the unix socket(two ports).
e.g:...-device virtio-serial-pci,id=virtio-serial0,max_ports=16,vectors=0,bus=pci.0,addr=0x3 -chardev socket,id=channel1,host=localhost,port=12345,server,nowait -device virtserialport,chardev=channel1,name=com.redhat.rhevm.vdsm,bus=virtio-serial0.0,id=port1 -chardev socket,id=channel2,host=localhost,port=12346,server,nowait -device virtserialport,chardev=channel2,name=com.redhat.rhevm.vdsm,bus=virtio-serial0.0,id=port2
2.transfer small size data from guest to host and switch the port to transfer.
guest ]# echo sibiaoluo > /dev/vport0p1
guest ]# echo sibiaoluo > /dev/vport0p1
guest ]# echo sibiaoluo > /dev/vport0p1
guest ]# echo sibiaoluo > /dev/vport0p1
host ]# nc localhost 12345
sibiaoluo
sibiaoluo
sibiaoluo
sibiaoluo
^C                     <--------------work well, and press 'ctrl-c' to quit

guest ]# echo sibiaoluo > /dev/vport0p2
guest ]# echo sibiaoluo > /dev/vport0p2
guest ]# echo sibiaoluo > /dev/vport0p2
guest ]# echo sibiaoluo > /dev/vport0p2
host ]# nc localhost 12346
sibiaoluo
sibiaoluo
sibiaoluo
sibiaoluo
^C                     <--------------work well, and press 'ctrl-c' to quit

guest ]# echo sibiaoluo > /dev/vport0p1
guest ]# echo sibiaoluo > /dev/vport0p1
guest ]# echo sibiaoluo > /dev/vport0p1
guest ]# echo sibiaoluo > /dev/vport0p1
guest ]# echo sibiaoluo > /dev/vport0p1
host ]# nc localhost 12345
^C                     <--------------fail to display the data

guest ]# echo sibiaoluo > /dev/vport0p2
guest ]# echo sibiaoluo > /dev/vport0p2
guest ]# echo sibiaoluo > /dev/vport0p2
guest ]# echo sibiaoluo > /dev/vport0p2
host ]# nc localhost 12346
^C                     <--------------fail to display the data

Actual results:
it fail to transfer data after switch the ports.

Expected results:
it should work well.

Additional info:
Comment 1 Sibiao Luo 2013-07-16 23:41:33 EDT
My qemu-kvm command line:
# /usr/libexec/qemu-kvm -S -M rhel6.5.0 -cpu SandyBridge -enable-kvm -m 4096 -smp 4,sockets=2,cores=2,threads=1 -no-kvm-pit-reinjection -name sluo -uuid 43425b70-86e5-4664-bf2c-3b76699b8bec -rtc base=localtime,clock=host,driftfix=slew -device virtio-serial-pci,id=virtio-serial0,max_ports=16,vectors=0,bus=pci.0,addr=0x3 -chardev socket,id=channel1,host=localhost,port=12345,server,nowait -device virtserialport,chardev=channel1,name=com.redhat.rhevm.vdsm,bus=virtio-serial0.0,id=port1 -chardev socket,id=channel2,host=localhost,port=12346,server,nowait -device virtserialport,chardev=channel2,name=com.redhat.rhevm.vdsm,bus=virtio-serial0.0,id=port2 -drive file=/home/RHEL6.5-20130712.n.0-6.5-Server-x64.qcow2,if=none,id=drive-system-disk,format=qcow2,cache=none,aio=native,werror=stop,rerror=stop,serial="QEMU-DISK1" -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=drive-system-disk,id=system-disk,bootindex=1 -device virtio-balloon-pci,id=ballooning,bus=pci.0,addr=0x5 -global PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0 -netdev tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup -device virtio-net-pci,netdev=hostnet0,id=virtio-net-pci0,mac=2C:41:38:B6:40:21,bus=pci.0,addr=0x6,bootindex=2 -drive file=/home/my-data-disk.qcow2,if=none,id=drive-data-disk,format=qcow2,cache=none,aio=native,werror=stop,rerror=stop,serial="QEMU-DISK2" -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x7,drive=drive-data-disk,id=data-disk,bootindex=3 -k en-us -boot menu=on -qmp tcp:0:4444,server,nowait -serial unix:/tmp/ttyS0,server,nowait -vnc :1 -spice port=5931,disable-ticketing -monitor stdio
Comment 2 Sibiao Luo 2013-07-16 23:43:25 EDT
(In reply to Sibiao Luo from comment #0)
> Steps to Reproduce:
> 1.boot guest with virtio serial though the unix socket(two ports).
> e.g:...-device
> virtio-serial-pci,id=virtio-serial0,max_ports=16,vectors=0,bus=pci.0,
> addr=0x3 -chardev socket,id=channel1,host=localhost,port=12345,server,nowait
> -device
> virtserialport,chardev=channel1,name=com.redhat.rhevm.vdsm,bus=virtio-
> serial0.0,id=port1 -chardev
> socket,id=channel2,host=localhost,port=12346,server,nowait -device
> virtserialport,chardev=channel2,name=com.redhat.rhevm.vdsm,bus=virtio-
> serial0.0,id=port2
> 2.transfer small size data from guest to host and switch the port to
> transfer.
> guest ]# echo sibiaoluo > /dev/vport0p1
> guest ]# echo sibiaoluo > /dev/vport0p1
> guest ]# echo sibiaoluo > /dev/vport0p1
> guest ]# echo sibiaoluo > /dev/vport0p1
> host ]# nc localhost 12345
> sibiaoluo
> sibiaoluo
> sibiaoluo
> sibiaoluo
> ^C                     <--------------work well, and press 'ctrl-c' to quit
> 
> guest ]# echo sibiaoluo > /dev/vport0p2
> guest ]# echo sibiaoluo > /dev/vport0p2
> guest ]# echo sibiaoluo > /dev/vport0p2
> guest ]# echo sibiaoluo > /dev/vport0p2
> host ]# nc localhost 12346
> sibiaoluo
> sibiaoluo
> sibiaoluo
> sibiaoluo
> ^C                     <--------------work well, and press 'ctrl-c' to quit
> 
> guest ]# echo sibiaoluo > /dev/vport0p1
> guest ]# echo sibiaoluo > /dev/vport0p1
> guest ]# echo sibiaoluo > /dev/vport0p1
> guest ]# echo sibiaoluo > /dev/vport0p1
> guest ]# echo sibiaoluo > /dev/vport0p1
> host ]# nc localhost 12345
> ^C                     <--------------fail to display the data
> 
> guest ]# echo sibiaoluo > /dev/vport0p2
> guest ]# echo sibiaoluo > /dev/vport0p2
> guest ]# echo sibiaoluo > /dev/vport0p2
> guest ]# echo sibiaoluo > /dev/vport0p2
> host ]# nc localhost 12346
> ^C                     <--------------fail to display the data
> 
every time, i have killed the nc process via 'killall nc' before transfer data.
Comment 3 Sibiao Luo 2013-07-16 23:53:01 EDT
If use the tcp socket instead unix socket that did not met such issue.
Comment 4 Sibiao Luo 2013-07-17 07:52:20 EDT
Two-way stream socket to create, if path is specified, a Unix socket is created and if port is also specified, a TCP socket is created. 

Sorry for my mistake during all my description, just update a comment here to make clear for it.

Best Regards,
sluo
Comment 5 Amit Shah 2013-08-12 06:51:28 EDT
host-side chardev conncect-disconnect is not tracked properly.  We have other similar reports, so this should just be a dup of the previous ones, like bug 797854.

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