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 1516730 - Guest netcat can not receive data well from host side after sending data to host via virtio-serial-port
Summary: Guest netcat can not receive data well from host side after sending data to h...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.5
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: rc
: ---
Assignee: pagupta
QA Contact: Qianqian Zhu
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-23 10:36 UTC by Sitong Liu
Modified: 2018-12-07 13:09 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-12-07 13:09:07 UTC


Attachments (Terms of Use)

Description Sitong Liu 2017-11-23 10:36:10 UTC
Description of problem:
This issue only occurs when host sends data to guest at the very first time after host receives data from guest. 

Version-Release number of selected component (if applicable):
kernel 3.10.0-757.el7.x86_64
qemu-kvm-rhev-2.10.0-7.el7.x86_64 and qemu-kvm-rhev-2.10.0-16.el7_4.1

Guest
kernel 3.10.0-748.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. start VM with virtio-serial-port
-device virtio-serial-pci,id=virtio-serial0,max_ports=511 \
-chardev socket,id=channel1,path=/tmp/helloworld1,server,nowait \
-device virtserialport,chardev=channel1,name=com.redhat.rhevm.vdsm0,bus=virtio-serial0.0,id=port0,nr=1 \

2. send some data from guest side with 'echo 1111 > /dev/vport0p1', receive it in host side with 'nc -U /tmp/helloworld1', then stop nc in host side.

3. send some data from host side 'echo 2222 | nc -U /tmp/helloworld1'.
(after step3, echo stays there waiting to send the data out.)

4. on the guest, receive data with 'cat /dev/vport0p1'.

5. after step 4, on the guest, receive data with 'cat /dev/vport0p1' the second time.

6. Doing step 2-4 again.

Actual results:
1. after step4, netcat process in guest quits directly without waiting host sending data, sometimes, netcat gets several empty lines printed and then quits. The host still waiting for sending data.
2. after step5, netcat process in guest quits directly and sending process in host quits at the same time, with no data transfer can be seen. 
3. after step 6, the data transfer from host to guest works well.

Expected results:
1. after step4, netcat process in guest can received data well, and sending process in host and receiving data in guest quit together after transferring data.

Additional info:

Comment 2 pagupta 2018-12-07 13:09:07 UTC
Hi Sitong,

I tried to understand the issue.

The problem you mentioned is: at the first data transfer using chardev socket between host and guest. This happens when you are doing 'echo 2222 | nc -U /tmp/helloworld1' at host side. This commands waits till we do 'cat /dev/vport0p1' at guest side. Once connection is established then actual data transfer occurs successfully that's why you see data when running cat second time. I don't think its a bug. I am closing this BZ feel free to reopen it if you feel so.

Thanks,
Pankaj


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