RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1110219 - Guest can't receive any character transmitted from host after hot unplugging virtserialport then hot plugging again
Summary: Guest can't receive any character transmitted from host after hot unplugging ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm
Version: 7.0
Hardware: x86_64
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Virtualization Maintenance
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 1038914
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-06-17 09:21 UTC by Libor Miksik
Modified: 2022-07-09 06:30 UTC (History)
22 users (show)

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.
Clone Of: 1038914
Environment:
Last Closed: 2014-07-23 16:18:30 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2014:0927 0 normal SHIPPED_LIVE Moderate: qemu-kvm security and bug fix update 2014-07-23 20:15:13 UTC

Description Libor Miksik 2014-06-17 09:21:12 UTC
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 15:37:49 UTC
Fix included in qemu-kvm-1.5.3-60.el7_0.3

Comment 5 huiqingding 2014-06-23 02:36:23 UTC
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-23 02:45:24 UTC
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 08:34:42 UTC
(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 06:41:09 UTC
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 16:18:30 UTC
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.