Hide Forgot
Created attachment 519647 [details] serial output of bootup and reboot Description of problem: Issue "shutdown -r now" in guest, what I got is a black screen, guest got no response on system_reset, then hit any key, monitor reports: (qemu) usb-kbd: warning: key event queue full usb-kbd: warning: key event queue full usb-kbd: warning: key event queue full usb-kbd: warning: key event queue full usb-kbd: warning: key event queue full usb-kbd: warning: key event queue full usb-kbd: warning: key event queue full usb-kbd: warning: key event queue full usb-kbd: warning: key event queue full usb-kbd: warning: key event queue full Version-Release number of selected component (if applicable): # rpm -q qemu-kvm qemu-kvm-0.12.1.2-2.184.el6.x86_64 # uname -r 2.6.32-191.el6.x86_64 How reproducible: 100% Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info: During guest first boot, I see: hub 1-0:1.0: Cannot enable port 2. Maybe the USB cable is bad? hub 1-0:1.0: Cannot enable port 2. Maybe the USB cable is bad? hub 1-0:1.0: Cannot enable port 2. Maybe the USB cable is bad? hub 1-0:1.0: Cannot enable port 2. Maybe the USB cable is bad? hub 1-0:1.0: unable to enumerate USB device on port 2 hub 1-0:1.0: Cannot enable port 3. Maybe the USB cable is bad? hub 1-0:1.0: Cannot enable port 3. Maybe the USB cable is bad? hub 1-0:1.0: Cannot enable port 3. Maybe the USB cable is bad? hub 1-0:1.0: Cannot enable port 3. Maybe the USB cable is bad? hub 1-0:1.0: unable to enumerate USB device on port 3 ... CLI: # /usr/libexec/qemu-kvm -M rhel6.2.0 -enable-kvm -m 4096 -smp 4,sockets=1,cores=4,threads=1 -name RHEL6.1_32 -uuid 24b39949-f2a3-4fed-8b3d-528ba6439cc6 -rtc base=utc,clock=host,driftfix=slew -boot order=dc,menu=on -drive file=/home/RHEL6.1-32-copy.qcow2,if=none,id=drive-virtio-0-0,media=disk,format=qcow2,cache=none,werror=stop,rerror=stop -device virtio-blk-pci,drive=drive-virtio-0-0,id=virt0-0-0,bootindex=1 -netdev tap,id=hostnet1,vhost=on -device virtio-net-pci,netdev=hostnet1,id=net1,mac=64:31:50:41:e1:c3 -usb -device usb-tablet,id=input1,bus=usb.0,port=1 -spice port=9000,disable-ticketing -vga qxl -global qxl-vga.vram_size=67108864 -monitor stdio -balloon none -device usb-ehci,id=ehci -device usb-hub,bus=usb.0,port=2,id=hub -device usb-storage,bus=usb.0,port=2.4,drive=drive-usb-2-0,id=usb-2-0,removable=on -drive file=/home/image/usb-storage-2.qcow2,if=none,id=drive-usb-2-0,media=disk,format=qcow2,cache=none,werror=stop,rerror=stop,aio=threads -device usb-storage,drive=drive-usb-0-0,id=usb-0-0,removable=on,bus=ehci.0,port=1 -device usb-ccid,id=ccid -drive file=/home/image/usb-storage.qcow2,if=none,id=drive-usb-0-0,media=disk,format=qcow2,cache=none,werror=stop,rerror=stop,aio=native -device usb-mouse,bus=ehci.0,port=3,id=mouse -device usb-kbd,bus=usb.0,port=2.3,id=kbd -serial unix:/tmp/socket,server,nowait
"key event queue full" most likely isn't the root cause. I think the guest hangs for some reason, thus doesn't process keyboard events any more, which in turn leads to those messages. Can you please remove the connected usb devices one by one to figure which one causes the trouble?
Reproduced with "-usb -device usb-tablet,id=input1,port=1 -device usb-hub,bus=usb.0,port=2,id=hub -device usb-kbd,port=2.3", tried 5 times, for two times I got: kvm: unhandled exit 80000021 kvm_run returned -22 handle_dev_input: stop usb-kbd: warning: key event queue full usb-kbd: warning: key event queue full usb-kbd: warning: key event queue full usb-kbd: warning: key event queue full
Created attachment 523046 [details] guest device message with usb kbd assigned
If remove "-device usb-kbd,port=2.3" option, guest rebooted successfully.
What happens if you remove the tablet too and leave just the hub and the keyboard, do you still see the hangs? If yes: Do you see the hangs too if you plug the keyboard into a root port (port=1) instead of the hub (port=2.3)?
(In reply to comment #6) > What happens if you remove the tablet too and leave just the hub and the > keyboard, do you still see the hangs? Yes, still can see the hangs with errors: kvm: unhandled exit 80000021 kvm_run returned -22 handle_dev_input: stop >If yes: Do you see the hangs too if you > plug the keyboard into a root port (port=1) instead of the hub (port=2.3)? Yes, still can see the hangs if I plug the keyboard into root port, and without hub,tablet in cli: ... -usb -device usb-kbd,port=1 kvm: unhandled exit 80000021 kvm_run returned -22 handle_dev_input: stop
Created attachment 523131 [details] seabios fix
Patch posted to rhvirt
Reproduce on: --------------- qemu-kvm-0.12.1.2-2.195.el6.x86_64 seabios-0.6.1.2-5.el6.x86_64 Steps: ----------- 1. boot guest with -usb -device usb-kbd,id=kbd1 2. in guest: #shutdown -r now Actual result: --------------- after step 2: (qemu) kvm: unhandled exit 80000021 kvm_run returned -22 (qemu) info status VM status: paused Verify on: -------------- qemu-kvm-0.12.1.2-2.195.el6.x86_64 seabios-0.6.1.2-6.el6.x86_64 After step 2, guest shut down correctly, qemu-kvm exits correctly, verified.
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: Cause; on reboot, reinitialization of the USB hid devices was not done before seabios was setting up timers. Consequence: the USB keyboard polling (called from the timer IRQ) processed bogus data after reboot, causing "usb-kbd: warning: key event queue full" qemu-kvm error messages, and guest failed to reboot. Fix: Moved initialization of USB HID devices earlier in the boot process. Result: no "usb-kbd: warning: key event queue full" error messages, and guest reboots properly.
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/RHBA-2011-1680.html