Bug 805423 - [virtio-win][serial]Removing serial port leads guest hangs up while transferring data between host and guest
[virtio-win][serial]Removing serial port leads guest hangs up while transfer...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: virtio-win (Show other bugs)
6.3
Unspecified Unspecified
high Severity high
: rc
: ---
Assigned To: Yan Vugenfirer
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-21 05:23 EDT by Min Deng
Modified: 2013-02-21 05:38 EST (History)
12 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
In the previous version, port surprise removal handle has a bug, where it didn't stop and purge write and read queues. This leads to the situation when request were sending to already removed device. The problem was fixed by stopping and draining read and write queues on event of surprise removing.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-02-21 05:38:18 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
host side script (791 bytes, application/octet-stream)
2012-03-21 05:25 EDT, Min Deng
no flags Details
Put the two files into c:\ (2.45 KB, application/zip)
2012-03-21 05:31 EDT, Min Deng
no flags Details

  None (edit)
Description Min Deng 2012-03-21 05:23:27 EDT
Description of problem:
  The bug describes while transferring data from host to guest if user hot-unplug serial port,the guest hangs up
Version-Release number of selected component (if applicable):
qemu-kvm-0.12.1.2-2.236.el6.x86_64
How reproducible:
Always
Steps to Reproduce:
1.Boot up guest with the following CLI
 /usr/libexec/qemu-kvm -m 4G -smp 4 -drive file=/home/win2k8-64-run.raw,if=none,id=drive-virtio0-0-0,format=raw,werror=ignore,rerror=ignore,cache=none -device virtio-blk-pci,drive=drive-virtio0-0-0,id=virti0-0-0,bootindex=1 -netdev tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup -device e1000,netdev=hostnet0,id=net0,mac=02:06:10:94:a3:f8 -device virtio-serial-pci,id=virtio-serial0 -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=channel0,name=org.linux-kvm.port.0,id=port0 -chardev socket,id=channel0,host=127.0.0.1,port=12340,server,nowait -chardev socket,id=channel1,host=127.0.0.1,port=19000,server,nowait -uuid 9e6f04cf-2ad7-45aa-9333-2d2ee26570c6 -monitor stdio -drive file=/home/disk1.raw,if=none,id=drive-virtio0-0-1,format=raw,werror=ignore,rerror=ignore,cache=none -device virtio-blk-pci,drive=drive-virtio0-0-1,id=virti0-0-1 -device virtio-balloon-pci,id=balloon1 -qmp tcp:0:4444,server,nowait -spice port=5931,disable-ticketing -vga qxl
do_spice_init: starting 0.8.3

2.run the scripts on hosts - upatehost-vdsm-lite.py
for ((;;))
do python upatehost-vdsm-lite.py
done

3.run the below scripts on CMD in windows guest
  for %i in (1,2,3,4,5,6,7,8,9,10,11,12...) do c:\Python27\python.exe virtIoChannelread.py 

Make sure the data was always transferring from host to guest and the content be printed also.

4.go to host side and execute "device_del port0" in monitor
  
Actual results:
Host side,(qemu) device_del port0
(qemu) qemu-kvm: virtio-serial-bus: Unexpected port id 1 for device virtio-seria
Guest side,
 Guest side hung up
Expected results:
At least,the guest works well and friendly message should provided if needed.

Additional info:
Comment 1 Min Deng 2012-03-21 05:25:18 EDT
Created attachment 571653 [details]
host side script
Comment 2 Min Deng 2012-03-21 05:31:39 EDT
Created attachment 571660 [details]
Put the two files into c:\

  Need to install python in guests and please get related setup from 
\\10.66.73.47\dengminshare\805423
Comment 4 Ronen Hod 2012-03-22 02:17:03 EDT
Min,
Is this a regression?
Thanks.
Comment 5 Min Deng 2012-03-23 05:07:55 EDT
Hi Ronen,

   QE can reproduce the issue with virtio-win-prewhql-01-23 and virtio-win-prewhql-01-16.
   The scenario is from my random testing.Thanks.

Thanks 
Min
Comment 6 Ronen Hod 2012-04-03 03:58:56 EDT
Hi Min,

Port removal is not officially supported. Moving to 6.4.
Still it might work in build 25. Please check.
Comment 7 Mike Cao 2012-05-07 03:36:55 EDT
Reproduce this bug on virtio-win-prewhql-25
Guest win7-64 bit
How reproducible: 40%

steps:
1.Start guest w/ virtio-serial-port
2.install rhev-agent in the guest and start service
3.on the host ,open the listening port
4.hotunplug the virtio-serial-port which used by rhev-agent service
5.hotplug the virtio-serial-port which unpluged in step4 

Actual Results:
Guest hang
Comment 9 Ronen Hod 2012-07-10 05:42:16 EDT
In work, need to re-test in 2-3 weeks.
Comment 12 Ronen Hod 2012-10-02 05:59:58 EDT
QE,

Please try again with the build 40. There were several related changes in the serial driver.

Thanks, Ronen.
Comment 13 Mike Cao 2012-10-07 21:05:25 EDT
dengmin ,pls verify this bug with virtio-win-prewhql-build-40

Thanks,
Mike
Comment 14 Min Deng 2012-10-15 02:36:54 EDT
Verified the bug via virtio-win-prewhql-0.1-41
Please refer to the steps of comment 0
Actual results,
  1.error message in monitor is gone after deleting port during transferring data between host and guest 
  2.The guest doesn't hang and work correctly.

So the bug should be fixed,thanks.
Comment 16 Mike Cao 2012-10-30 03:38:17 EDT
Based on comment #14 ,move status to VERIFIED.
Comment 17 errata-xmlrpc 2013-02-21 05:38:18 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-0441.html

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