Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1110219 - Guest can't receive any character transmitted from host after hot unplugging virtserialport then hot plugging again
Guest can't receive any character transmitted from host after hot unplugging ...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
7.0
x86_64 Linux
high Severity high
: rc
: ---
Assigned To: Virtualization Maintenance
Virtualization Bugs
: ZStream
Depends On: 1038914
Blocks:
  Show dependency treegraph
 
Reported: 2014-06-17 05:21 EDT by Libor Miksik
Modified: 2015-02-25 06:16 EST (History)
22 users (show)

See Also:
Fixed In Version: qemu-kvm-1.5.3-60.el7_0.3
Doc Type: Bug Fix
Doc Text:
Previously, when a guest device was hot unplugged, QEMU correctly removed the corresponding file descriptor watch but did not re-create it after the device was re-connected. As a consequence, the guest became unable to receive any data from the host over this device. With this update, the file descriptor's watch is re-created and the guest in the above scenario can communicate with the host as expected.
Story Points: ---
Clone Of: 1038914
Environment:
Last Closed: 2014-07-23 12:18:30 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2014:0927 normal SHIPPED_LIVE Moderate: qemu-kvm security and bug fix update 2014-07-23 16:15:13 EDT

  None (edit)
Description Libor Miksik 2014-06-17 05:21:12 EDT
This bug has been copied from bug #1038914 and has been proposed
to be backported to 7.0 z-stream (EUS).
Comment 3 Miroslav Rezanina 2014-06-17 11:37:49 EDT
Fix included in qemu-kvm-1.5.3-60.el7_0.3
Comment 5 huiqingding 2014-06-22 22:36:23 EDT
Reproduce this bug using the following version:
host:
kernel-3.10.0-128.el7.x86_64
qemu-kvm-1.5.3-60.el7.x86_64
guest:
kernel-3.10.0-123.el7.x86_64

Steps to Reproduce:
1.Boot rhel7 guest with this command line
/usr/libexec/qemu-kvm -M pc -enable-kvm -m 4G -smp 4,sockets=1,cores=4,threads=1 -name test -rtc base=localtime,clock=host,driftfix=slew -k en-us -boot menu=on -spice disable-ticketing,port=5930 -vga qxl -monitor stdio -drive file=/home/rhel7-ga.qcow2,if=none,id=drive-system-disk,media=disk,format=qcow2,aio=native,werror=stop,rerror=stop -device virtio-blk-pci,drive=drive-system-disk,id=system-disk -netdev tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup -device virtio-net-pci,netdev=hostnet0,id=virtio-net-pci0,mac=00:22:15:27:54:9d,bus=pci.0,addr=0x9   -device virtio-serial-pci,id=virtio-serial0,max_ports=16,bus=pci.0 -chardev socket,id=charchannel0,path=/opt/chardev-testing.com.redhat.rhevm.vdsm,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.rhevm.vdsm

2.transfer data from host to guest
2. On host:
# hexdump -C /dev/sda | nc -U /opt/chardev-testing.com.redhat.rhevm.vdsm

3.In guest, receive the data from host by:
# cat /dev/vport0p

4.hot unplug the virtserialport:
(qemu) device_del channel0

5. hot plug virtserialport:
(qemu) device_add virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.rhevm.vdsm.com

6. cat /dev/vport0p1 in guest

Actual results:

after step6, guest cann't receive any data from host.
Comment 6 huiqingding 2014-06-22 22:45:24 EDT
Verify this bug using the following version:
host:
kernel-3.10.0-128.el7.x86_64
qemu-kvm-1.5.3-64.el7.x86_64
guest:
kernel-3.10.0-123.el7.x86_64

Steps to Verify:
1.Boot rhel7 guest with this command line
/usr/libexec/qemu-kvm -M pc -enable-kvm -m 4G -smp 4,sockets=1,cores=4,threads=1 -name test -rtc base=localtime,clock=host,driftfix=slew -k en-us -boot menu=on -spice disable-ticketing,port=5930 -vga qxl -monitor stdio -drive file=/home/rhel7-ga.qcow2,if=none,id=drive-system-disk,media=disk,format=qcow2,aio=native,werror=stop,rerror=stop -device virtio-blk-pci,drive=drive-system-disk,id=system-disk -netdev tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup -device virtio-net-pci,netdev=hostnet0,id=virtio-net-pci0,mac=00:22:15:27:54:9d,bus=pci.0,addr=0x9   -device virtio-serial-pci,id=virtio-serial0,max_ports=16,bus=pci.0 -chardev socket,id=charchannel0,path=/opt/chardev-testing.com.redhat.rhevm.vdsm,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.rhevm.vdsm

2.transfer data from host to guest
2. On host:
# hexdump -C /dev/sda | nc -U /opt/chardev-testing.com.redhat.rhevm.vdsm

3.In guest, receive the data from host by:
# cat /dev/vport0p1

4.hot unplug the virtserialport:
(qemu) device_del channel0

5. hot plug virtserialport:
(qemu) device_add virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.rhevm.vdsm.com

6. cat /dev/vport0p1 in guest

Actual results:

guest can receive data after step 6.
Comment 7 huiqingding 2014-06-23 04:34:42 EDT
(In reply to huiqingding from comment #6)
> Verify this bug using the following version:
> host:
> kernel-3.10.0-128.el7.x86_64
> qemu-kvm-1.5.3-64.el7.x86_64
> guest:
> kernel-3.10.0-123.el7.x86_64
> 

Correction:
Verify this bug using the following version:
host:
kernel-3.10.0-128.el7.x86_64
qemu-kvm-1.5.3-60.el7_0.4.x86_64
guest:
kernel-3.10.0-123.el7.x86_64

Use the following steps, RHEL7 guest can receive the character transmitted from host after hot unplugging virtserialport then hot plugging again

> Steps to Verify:
> 1.Boot rhel7 guest with this command line
> /usr/libexec/qemu-kvm -M pc -enable-kvm -m 4G -smp
> 4,sockets=1,cores=4,threads=1 -name test -rtc
> base=localtime,clock=host,driftfix=slew -k en-us -boot menu=on -spice
> disable-ticketing,port=5930 -vga qxl -monitor stdio -drive
> file=/home/rhel7-ga.qcow2,if=none,id=drive-system-disk,media=disk,
> format=qcow2,aio=native,werror=stop,rerror=stop -device
> virtio-blk-pci,drive=drive-system-disk,id=system-disk -netdev
> tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup -device
> virtio-net-pci,netdev=hostnet0,id=virtio-net-pci0,mac=00:22:15:27:54:9d,
> bus=pci.0,addr=0x9   -device
> virtio-serial-pci,id=virtio-serial0,max_ports=16,bus=pci.0 -chardev
> socket,id=charchannel0,path=/opt/chardev-testing.com.redhat.rhevm.vdsm,
> server,nowait -device
> virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,
> name=com.redhat.rhevm.vdsm
> 
> 2.transfer data from host to guest
> 2. On host:
> # hexdump -C /dev/sda | nc -U /opt/chardev-testing.com.redhat.rhevm.vdsm
> 
> 3.In guest, receive the data from host by:
> # cat /dev/vport0p1
> 
> 4.hot unplug the virtserialport:
> (qemu) device_del channel0
> 
> 5. hot plug virtserialport:
> (qemu) device_add
> virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,
> name=com.redhat.rhevm.vdsm.com
> 
> 6. cat /dev/vport0p1 in guest
> 
> Actual results:
> 
> guest can receive data after step 6.
Comment 8 huiqingding 2014-06-24 02:41:09 EDT
Use win2012 guest and verify this bug using the following version:
host:
kernel-3.10.0-128.el7.x86_64
qemu-kvm-1.5.3-60.el7_0.4.x86_64
guest:
win2012 guest
virtio-win-1.7.1-1.el7.noarch

Steps to Verify:
1.Boot rhel7 guest with this command line
/usr/libexec/qemu-kvm -M pc -enable-kvm -m 4G -smp 4,sockets=1,cores=4,threads=1 -name test -rtc base=localtime,clock=host,driftfix=slew -k en-us -boot menu=on -spice disable-ticketing,port=5930 -vga qxl -monitor stdio -drive file=/home/rhel7-ga.qcow2,if=none,id=drive-system-disk,media=disk,format=qcow2,aio=native,werror=stop,rerror=stop -device virtio-blk-pci,drive=drive-system-disk,id=system-disk -netdev tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup -device virtio-net-pci,netdev=hostnet0,id=virtio-net-pci0,mac=00:22:15:27:54:9d,bus=pci.0,addr=0x9   -device virtio-serial-pci,id=virtio-serial0,max_ports=16,bus=pci.0 -chardev socket,id=charchannel0,path=/opt/chardev-testing.com.redhat.rhevm.vdsm,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.rhevm.vdsm

2.In guest, receive the data from host by:
# python VirtIoChannel_guest_recieve.py com.redhat.rhevm.vdsm

3. On host, transfer data to the guest:
# python serial-host-send.py /opt/chardev-testing.com.redhat.rhevm.vdsm

4.hot unplug the virtserialport:
(qemu) device_del channel0

5. hot plug virtserialport:
(qemu) device_add virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.rhevm.vdsm

6. repeat step2 and step3

Actual results:

guest can receive data after step 6.
Comment 11 errata-xmlrpc 2014-07-23 12:18:30 EDT
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/RHSA-2014-0927.html

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