Bug 1066239
Summary: | Hotplug second virtioserialport failed after attached and detached virtconsole port | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Min Deng <mdeng> |
Component: | qemu-kvm-rhev | Assignee: | Amit Shah <amit.shah> |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.0 | CC: | flang, hhuang, juzhang, knoel, mdeng, rbalakri, virt-maint |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | qemu 2.1 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-03-05 09:44:18 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: |
Description
Min Deng
2014-02-18 05:33:43 UTC
Device init is failing, and there's not enough info why. I can't see how this is related to virtio-serial; looks like the failure is happening in the qdev layer itself. I suspect it could be due to some typo somewhere but it's not really easy to follow. Can you try a few things: 1. How easily is this reproducible? You've mentioned 5 times, but does it happen each time you try, or does it happen 5 out of 100 times? 2. Can you try via the hmp? (In reply to Amit Shah from comment #1) > Device init is failing, and there's not enough info why. I can't see how > this is related to virtio-serial; looks like the failure is happening in the > qdev layer itself. I suspect it could be due to some typo somewhere but > it's not really easy to follow. > > Can you try a few things: > > 1. How easily is this reproducible? You've mentioned 5 times, but does it > happen each time you try, or does it happen 5 out of 100 times? > 2. Can you try via the hmp? Hi Amit, Could you please go through my testing results,thank you very much. For 1,100% reproducible if use my steps For 2,QE got the following error message from HMP 1.#chardev-add backend=pty,id=chardev-pty 2.#device_add virtconsole,bus=virtio-serial0.0,chardev=chardev-pty,name=org.linux-kvm.port.0,id=port0 3.#device_del port0 4.#chardev-remove chardev-pty 5.#chardev-add backend=pty,id=chardev-two 6.#device_add virtserialport,bus=virtio-serial0.0,chardev=chardev-two,name=org.linux-kvm.port.1,id=port1 (This was original issue in the bug) 7.#device_add virtserialport,bus=virtio-serial0.0,chardev=chardev-two,name=org.linux-kvm.port.1,id=port1,nr=0 (Step 7's results was expected as it was reserved for virtconsole) For do step6 without "nr" or step7 with "nr=0" get the following info from qemu Port number 0 on virtio-serial devices reserved for virtconsole devices for backward compatibility. Device initialization failed. Device 'virtserialport' could not be initialized 8.Change "nr=1" QE still failed to add port.I think it should be successfully here but it didn't. #device_add virtserialport,bus=virtio-serial0.0,chardev=chardev-two,name=org.linux-kvm.port.1,id=port1,nr=1 The message was following as below and still failed to add port virtio-serial-bus: A port already exists at id 1 Device initialization failed. Device 'virtserialport' could not be initialized 9.After changing "nr=2" successfully added port1 from HMP. #device_add virtserialport,bus=virtio-serial0.0,chardev=chardev-two,name=org.linux-kvm.port.1,id=port1,nr=2 Amit,any issues please let me know,thanks. Best regards Min Deng Reduced testcase: $ ./x86_64-softmmu/qemu-system-x86_64 -m 512 -cpu host -enable-kvm -device virtio-serial-pci -monitor stdio -vnc :1 QEMU 2.0.91 monitor - type 'help' for more information (qemu) device_add virtconsole,id=p1 (qemu) device_del p1 (qemu) device_add virtserialport,id=p1 Port number 0 on virtio-serial devices reserved for virtconsole devices for backward compatibility. Device 'virtserialport' could not be initialized (qemu) quit What's happening is hot-unplug of virtconsole removes the 'reserved' tag for port 0. Reproduce this bug as follow version: Host: # uname -r 3.10.0-144.el7.x86_64 # rpm -q qemu-kvm-rhev qemu-kvm-rhev-1.5.3-30.el7.x86_64 Guest :rhel7 Steps: 1.Boot guest ...-device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x5... 2.Hotadd chardev and virtio console ... {"execute": "chardev-add", "arguments": {"id": "chardev-pty", "backend": {"data": {}, "type": "pty"}}} {"return": {"pty": "/dev/pts/1"}} {"execute":"device_add","arguments":{"driver":"virtconsole","bus":"virtio-serial0.0","chardev":"chardev-pty","name":"org.linux-kvm.port.0","id":"port0"}} {"return": {}} ... 3.Hotunplug virtio console and chardev ... {"execute": "device_del", "arguments": {"id": "port0"}} {"timestamp": {"seconds": 1409538647, "microseconds": 669236}, "event": "DEVICE_DELETED", "data": {"device": "port0", "path": "/machine/peripheral/port0"}} {"return": {}} {"execute": "chardev-remove", "arguments": {"id": "chardev-pty"}} {"return": {}} 4.Hotadd chardev and virtio console After step 4 .. {"execute": "chardev-add", "arguments": {"id": "chardev-two", "backend": {"data": {}, "type": "pty"}}} {"return": {"pty": "/dev/pts/1"}} {"execute":"device_add","arguments":{"driver":"virtserialport","bus":"virtio-serial0.0","chardev":"chardev-two","name":"org.linux-kvm.port.1","id":"port1"}} {"error": {"class": "GenericError", "desc": "Device initialization failed."}} Verify this bug as follow version: # uname -r 3.10.0-144.el7.x86_64 # rpm -q qemu-kvm-rhev qemu-kvm-rhev-2.1.0-3.el7.x86_64 Guest :rhel7 Steps as same as reproduce Resutls: After step 4 ... {"execute": "chardev-add", "arguments": {"id": "chardev-two", "backend": {"data": {}, "type": "pty"}}} {"return": {"pty": "/dev/pts/3"}} {"execute":"device_add","arguments":{"driver":"virtserialport","bus":"virtio-serial0.0","chardev":"chardev-two","name":"org.linux-kvm.port.1","id":"port1"}} {"return": {}} According to above test ,this bug fixed. 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-0624.html |