Bug 1038914
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: | Amit Shah <amit.shah> | |
Component: | qemu-kvm | Assignee: | Gal Hammer <ghammer> | |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> | |
Severity: | high | Docs Contact: | ||
Priority: | high | |||
Version: | 7.0 | CC: | amit.shah, areis, bcao, bsarathy, ghammer, hhuang, huding, jherrman, juzhang, knoel, lijin, lmiksik, michen, mkenneth, mrezanin, qzhang, rbalakri, 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-63.el7 | 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: | 1027181 | |||
: | 1110219 (view as bug list) | Environment: | ||
Last Closed: | 2015-03-05 08:02:16 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: | ||||
Bug Depends On: | 1027181 | |||
Bug Blocks: | 1076185, 1110219 |
Description
Amit Shah
2013-12-06 06:45:53 UTC
Fix included in qemu-kvm-1.5.3-63.el7 Reproduce this bug using the following version: qemu-kvm-1.5.3-62.el7.x86_64 kernel-3.10.0-140.el7.x86_64 Steps to Reproduce: 1. boot a guest #/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=gluster://10.66.11.129/gv0/rhel7_1.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 -qmp tcp:0:4445,server,nowait 2.transfer data from host to guest 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: {"execute":"device_del","arguments":{"id":"channel0"}} 5. hot plug virtserialport: {"execute":"device_add","arguments":{"driver":"virtserialport","bus":"virtio-serial0.0","nr":1,"chardev":"charchannel0","id":"channel0","name":"com.redhat.rhevm.vdsm"}} 6. cat /dev/vport0p1 in guest Actual results: after step6, guest cann't receive any data from host. Test this bug on an intel host using the following version: qemu-kvm-1.5.3-66.el7.x86_64 kernel-3.10.0-140.el7.x86_64 Steps to Reproduce: 1. boot a RHEL7.1 guest #/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=gluster://10.66.11.129/gv0/rhel7_1.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 -qmp tcp:0:4445,server,nowait 2.transfer data from host to guest 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: {"execute":"device_del","arguments":{"id":"channel0"}} 5. hot plug virtserialport: {"execute":"device_add","arguments":{"driver":"virtserialport","bus":"virtio-serial0.0","nr":1,"chardev":"charchannel0","id":"channel0","name":"com.redhat.rhevm.vdsm"}} 6. cat /dev/vport0p1 in guest Results: after step6, guest can receive data from host. Addtional test: also test HMP command as comment 0, after step6, guest can recieve data from host. Test this bug on an intel host using the following version: qemu-kvm-1.5.3-66.el7.x86_64 kernel-3.10.0-140.el7.x86_64 Steps to Reproduce: 1. boot a win7-64 guest #/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/win7-64.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 -qmp tcp:0:4445,server,nowait 2.transfer data from host to guest On host: # python serial-host-send.py /opt/chardev-testing.com.redhat.rhevm.vdsm 3.In guest, receive the data from host by: # python.exe VirtIoChannel_guest_receive.py com.redhat.rhevm.vdsm 4.hot unplug the virtserialport: {"execute":"device_del","arguments":{"id":"channel0"}} 5. hot plug virtserialport: {"execute":"device_add","arguments":{"driver":"virtserialport","bus":"virtio-serial0.0","nr":1,"chardev":"charchannel0","id":"channel0","name":"com.redhat.rhevm.vdsm"}} 6.transfer data from host to guest On host: # python serial-host-send.py /opt/chardev-testing.com.redhat.rhevm.vdsm 7.In guest, receive the data from host by: # python.exe VirtIoChannel_guest_receive.py com.redhat.rhevm.vdsm Results: after step7, guest can receive data from host. Addtional test: also test HMP command as comment 0, after step7, guest can recieve data from host. Test this bug on an intel host using the following version: qemu-kvm-rhev-2.1.0-3.el7ev.preview.x86_64 kernel-3.10.0-140.el7.x86_64 Steps to Reproduce: 1. boot a RHEL7.1 guest #/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=gluster://10.66.11.129/gv0/rhel7_1.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 -qmp tcp:0:4445,server,nowait 2.transfer data from host to guest 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: {"execute":"device_del","arguments":{"id":"channel0"}} 5. hot plug virtserialport: {"execute":"device_add","arguments":{"driver":"virtserialport","bus":"virtio-serial0.0","nr":1,"chardev":"charchannel0","id":"channel0","name":"com.redhat.rhevm.vdsm"}} 6. cat /dev/vport0p1 in guest Results: after step6, guest can receive data from host. Addtional test: also test HMP command as comment 0, after step6, guest can recieve data from host. Test this bug on an amd host using the following version: qemu-kvm-1.5.3-66.el7.x86_64 kernel-3.10.0-140.el7.x86_64 Steps to Reproduce: 1. boot a win7-64 guest #/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/win7-64.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 -qmp tcp:0:4445,server,nowait 2.transfer data from host to guest On host: # python serial-host-send.py /opt/chardev-testing.com.redhat.rhevm.vdsm 3.In guest, receive the data from host by: # python.exe VirtIoChannel_guest_receive.py com.redhat.rhevm.vdsm 4.hot unplug the virtserialport: {"execute":"device_del","arguments":{"id":"channel0"}} 5. hot plug virtserialport: {"execute":"device_add","arguments":{"driver":"virtserialport","bus":"virtio-serial0.0","nr":1,"chardev":"charchannel0","id":"channel0","name":"com.redhat.rhevm.vdsm"}} 6.transfer data from host to guest On host: # python serial-host-send.py /opt/chardev-testing.com.redhat.rhevm.vdsm 7.In guest, receive the data from host by: # python.exe VirtIoChannel_guest_receive.py com.redhat.rhevm.vdsm Results: after step7, guest can receive data from host. Addtional test: also test HMP command as comment 0, after step7, guest can recieve data from host. Test this bug on an amd host using the following version: qemu-kvm-rhev-2.1.0-3.el7ev.preview.x86_64 kernel-3.10.0-140.el7.x86_64 Steps to Test: 1. boot a win7-64 guest #/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/win7-64.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 -qmp tcp:0:4445,server,nowait 2.transfer data from host to guest On host: # python serial-host-send.py /opt/chardev-testing.com.redhat.rhevm.vdsm 3.In guest, receive the data from host by: # python.exe VirtIoChannel_guest_receive.py com.redhat.rhevm.vdsm Results: after step3, guest cannot receive data from host, file a new bz1127111 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. https://rhn.redhat.com/errata/RHSA-2015-0349.html |