Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 985178 - fail to transfer small size data from guest to host after switch ports with virtio serial through the TCP socket
Summary: fail to transfer small size data from guest to host after switch ports with v...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.5
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: rc
: ---
Assignee: Amit Shah
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-17 03:40 UTC by Sibiao Luo
Modified: 2014-08-19 11:38 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-19 11:38:57 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Sibiao Luo 2013-07-17 03:40:43 UTC
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-17 03:41:33 UTC
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-17 03:43:25 UTC
(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-17 03:53:01 UTC
If use the tcp socket instead unix socket that did not met such issue.

Comment 4 Sibiao Luo 2013-07-17 11:52:20 UTC
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 10:51:28 UTC
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.