Bug 1110219
| Summary: | Guest can't receive any character transmitted from host after hot unplugging virtserialport then hot plugging again | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Libor Miksik <lmiksik> |
| Component: | qemu-kvm | Assignee: | Virtualization Maintenance <virt-maint> |
| Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 7.0 | CC: | acathrow, amit.shah, areis, bcao, bsarathy, ghammer, hhuang, huding, jherrman, juzhang, knoel, lijin, lmiksik, michen, mkenneth, mrezanin, pm-eus, qzhang, rhod, tdosek, virt-maint, xfu |
| Target Milestone: | rc | Keywords: | ZStream |
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| 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 16:18:30 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | 1038914 | ||
| Bug Blocks: | |||
|
Description
Libor Miksik
2014-06-17 09:21:12 UTC
Fix included in qemu-kvm-1.5.3-60.el7_0.3 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. 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. (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. 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. 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 |