Bug 971773

Summary: [virtio-win][serial]guest can not write to a virtio serial port while no listening side
Product: Red Hat Enterprise Linux 6 Reporter: lijin <lijin>
Component: virtio-winAssignee: Gal Hammer <ghammer>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 6.5CC: acathrow, bcao, bsarathy, dyasny, ghammer, jguo, rhod
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-06-09 06:45:23 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 lijin 2013-06-07 09:05:22 UTC
Description of problem:
when guest try to transfer data to host with no listening side,it prompt :"The system can not write to the specified device".

Version-Release number of selected component (if applicable):
kernel-2.6.32-358.6.3.el6.x86_64
qemu-kvm-rhev-0.12.1.2-2.355.el6_4.5.x86_64
virtio-win-prewhql-0.1-62    
spice-server-0.12.0-12.el6.x86_64
seabios-0.6.1.2-28.el6.x86_64
sgabios-0-0.3.20110621svn.el6
vgabios-0.6b-3.7.el6.noarch

How reproducible:
100%

Steps to Reproduce:
1. Start Guest with virtio serial port
/usr/libexec/qemu-kvm -drive file=win2012-serial-64-lijin,if=none,cache=none,media=disk,format=qcow2,id=drive-ide0-0-1 -device ide-drive,id=ide0-0-1,drive=drive-ide0-0-1,bootindex=0 -global PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0 -vnc :1 -vga cirrus -usb -device usb-tablet -netdev tap,id=hostnet0 -device e1000,netdev=hostnet0,id=net0,mac=52:54:00:7f:f9:F6,bus=pci.0 -monitor unix:/tmp/tt,server,nowait -chardev file,path=/root/console.log,id=serial1 -device isa-serial,chardev=serial1,id=s1 -cpu Penryn,hv_relaxed,+sep -M rhel6.4.0 -smp 4,maxcpus=4,cores=2,threads=2,sockets=1 -m 6G -enable-kvm -device virtio-serial-pci,id=virtio-serial0,max_ports=16 -chardev socket,path=/tmp/tt0,server,nowait,id=channel0 -device virtserialport,chardev=channel0,name=com.redhat.rhevm.vdsm,bus=virtio-serial0.0,id=port0

2.Transering data from guest to host via virtserialport w/o listening side
guest:echo hello world >> \\.\global\.\com.redhat.rhevm.vdsm

3.open the listening side on host:
host:nc -U /tmp/tt0

Actual results:
after step2:guest prompts:"The system can not write to the specified device";
after step3:host can not receive any data.

Expected results:
after step2:guest can write to the virtio serial port,no warning prompts;
after step3:host can receive the data guest just send.

Additional info:
build 61 did not hit this issue,so it is a regression

Comment 2 Mike Cao 2013-06-07 09:30:47 UTC
Add regression keyword based on comment #0

Comment 4 Gal Hammer 2013-06-09 06:45:23 UTC
This behavior is by design. A write request fails if no listener on the other side.

Comment 5 Ronen Hod 2013-06-09 09:17:01 UTC
Just to be clear.
In the past two modes were supported, Blocking (wait indefinitely for the write to succeed), and non-blocking (immediately return success/failure).
Now only non-blocking is supported, which is fine.

Comment 6 Mike Cao 2013-06-13 04:08:09 UTC
(In reply to Ronen Hod from comment #5)
> Just to be clear.
> In the past two modes were supported, Blocking (wait indefinitely for the
> write to succeed), and non-blocking (immediately return success/failure).
> Now only non-blocking is supported, which is fine.

Ronen,Gal

Will this change influence RHEV-Agent or Spice-Agent ?

blocking mode is not supported for windows guests ,how about RHEL Guests ?

Thanks,
Mike