Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 678208 - qemu-kvm hangs when installing guest with -spice option
qemu-kvm hangs when installing guest with -spice option
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
6.1
x86_64 Linux
urgent Severity urgent
: rc
: ---
Assigned To: Uri Lublin
Virtualization Bugs
: Regression, TestBlocker, Triaged
: 674055 679127 683388 683730 (view as bug list)
Depends On:
Blocks: Rhel6KvmTier1 661713
  Show dependency treegraph
 
Reported: 2011-02-17 01:33 EST by Chao Yang
Modified: 2013-01-09 18:33 EST (History)
15 users (show)

See Also:
Fixed In Version: qemu-kvm-0.12.1.2-2.153.el6
Doc Type: Bug Fix
Doc Text:
Cause: a bug in the locking logic in the spice code in qemu-kvm. Consequence: qemu-kvm hangs when using some versions of the qxl driver in the guest (e.g. xorg-x11-drv-qxl-0.0.12-5). Fix: fix the locking logic in the spice code in qemu-kvm. Result: qemu-kvm doesn't hang anymore when using xorg-x11-drv-qxl-0.0.12-5 in the guest.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-05-19 07:23:10 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
qemu-kvm hangs after this screen (8.21 KB, image/png)
2011-02-17 01:38 EST, Chao Yang
no flags Details
qemu-kvm hangs and spice gets black screen (6.08 KB, image/png)
2011-02-17 01:40 EST, Chao Yang
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:0534 normal SHIPPED_LIVE Important: qemu-kvm security, bug fix, and enhancement update 2011-05-19 07:20:36 EDT

  None (edit)
Comment 1 Chao Yang 2011-02-17 01:38:51 EST
Created attachment 479268 [details]
qemu-kvm hangs after this screen
Comment 2 Chao Yang 2011-02-17 01:40:11 EST
Created attachment 479269 [details]
qemu-kvm hangs and spice gets black screen
Comment 4 Gerd Hoffmann 2011-02-17 09:17:41 EST
Strange, there are no spice related changes in 145 -> 146.  There are some mouse changes (both usb and vmmouse) which could have caused this, but I'd expect it affects both vnc and spice then ...

Do you see this with a rhel-6.0 guest too?
How does version 144 behave?
Does qemu respond when you type something in the monitor?
If so, can you try 'info mice'?

thanks
Comment 5 Gerd Hoffmann 2011-02-17 09:41:19 EST
Hmm, quick attempt to reproduce with 6.0 failed, /me goes fetch 6.1 isos ...
Comment 6 Gerd Hoffmann 2011-02-18 06:20:07 EST
Ah, 6.1 has qxl guest drivers in the install image whereas 6.0 hasn't.

Seems to be a race and 145 not triggering is probably pure luck ...
Comment 7 Chao Yang 2011-02-21 04:39:55 EST
(In reply to comment #4)
> Strange, there are no spice related changes in 145 -> 146.  There are some
> mouse changes (both usb and vmmouse) which could have caused this, but I'd
> expect it affects both vnc and spice then ...
> 
> Do you see this with a rhel-6.0 guest too?

No, tested 5 times, all didn't hit same issue.

> How does version 144 behave?

can reproduce on 144 as well as 145

> Does qemu respond when you type something in the monitor?
No, qemu hangs, can't type a word.
Comment 8 Uri Lublin 2011-02-24 13:23:35 EST
Is 679127 a duplicate of this one ?
Comment 11 Uri Lublin 2011-03-03 08:36:39 EST
*** Bug 679127 has been marked as a duplicate of this bug. ***
Comment 12 Marian Krcmarik 2011-03-03 18:12:18 EST
I believe that problem of hanging qemu-kvm is an issue of qxl driver in version xorg-x11-drv-qxl-0.0.12-5 or a feature of qemu related to the driver (at least the Bug 679127) - (because of surfaces patch?) .
Problem disappears when using different vga driver (vesa) when emulating QXL graphic card and disappears when emulating different graphic card.
Problem appears with vnc when using qxl driver.
I downgraded qxl driver in guest to version xorg-x11-drv-qxl-0.0.12-2.1 and problem disappears. All other related components (qemu-kvm, spice-server) are the latest versions. 

The original problem I am able to reproduce with only installation of RHEL6.1-20110216.n.0-snapshot-20110216 (tried several different) and problem disappears when emulating different graphic cards.
Comment 13 Lubos Kocman 2011-03-08 10:16:25 EST
Any progress around here? We're really unable to test latest qemu-kvm/qxl and linux guest with this.
Comment 15 Uri Lublin 2011-03-09 07:55:37 EST
I've prepared a scratch build:
https://brewweb.devel.redhat.com/taskinfo?taskID=3167085
We still need to go over locking scenarios and see if we got them all covered.
And get the patches accepted upstream...
Also note, that sometimes chvt or gnome-system-monitor "hangs", but qemu-kvm still works, which I think suggests a problem in another component (x11 qxl driver?)
Comment 16 Shaolong Hu 2011-03-10 02:26:52 EST
Reproduced on:
----------------
host:
qemu-kvm-0.12.1.2-2.149.el6.x86_64

guest:
2.6.32-118.el6.i686
xorg-x11-drv-qxl-0.0.12-5.el6.i686

Reproduce Procedure:
----------------------
1. boot guest with:

/usr/libexec/qemu-kvm -M rhel6.1.0 -enable-kvm -m 8G -smp 4 -name RHEL-Server-6.1-32 -uuid `uuidgen` -rtc base=utc,clock=host,driftfix=slew -no-kvm-pit-reinjection -boot order=cd -drive file=./RHEL6.1-32-qcow2,if=none,id=drive-ide-disk0,format=qcow2,cache=none,werror=stop,rerror=stop -device ide-drive,drive=drive-ide-disk0,id=ide-disk0 -netdev tap,script=/etc/qemu-ifup,id=hostnet0 -device rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:7b:a2:fa -usb -device usb-tablet,id=input0 -monitor stdio -balloon none -vga qxl -spice port=5910,disable-ticketing

Actual results:
----------------
After step 1, qemu-kvm hangs.

How reproducible:
------------------
not always

Additional info:
------------------
with -vga qxl -spice, not always; with -vga qxl -vnc, 100%.
Downgrade xorg-x11-drv-qxl to xorg-x11-drv-qxl-0.0.12-2.1.el6.i686, -vga qxl with both -spice and -vnc works.
Comment 17 Chao Yang 2011-03-10 03:26:31 EST
Here is what I get in monitor on xorg-x11-drv-qxl-0.0.12-5.el6.x86_64:
handle_dev_input: oom current 0 pipe 26
handle_dev_input: oom current 0 pipe 26
handle_dev_input: oom current 0 pipe 26
handle_dev_input: oom current 0 pipe 26
handle_dev_input: oom current 0 pipe 26
handle_dev_input: oom current 0 pipe 26
handle_dev_input: oom current 0 pipe 26
handle_dev_input: oom current 0 pipe 26
handle_dev_input: oom current 0 pipe 26
handle_dev_input: oom current 0 pipe 26
handle_dev_input: oom current 0 pipe 26
handle_dev_input: oom current 0 pipe 26
handle_dev_input: oom current 0 pipe 26
handle_dev_input: oom current 0 pipe 26
handle_dev_input: oom current 0 pipe 26
red_wait_outgoing_item: blocked
red_wait_outgoing_item: blocked
handle_dev_destroy_surfaces: 
red_wait_outgoing_item: blocked
red_wait_outgoing_item: blocked
handle_dev_destroy_surfaces: 
red_wait_outgoing_item: blocked
red_wait_outgoing_item: blocked
flush_display_commands: update timeout

And I downgraded xorg-x11-drv-qxl, guest also hangs.
# rpm -qa|grep xorg-x11-drv-qxl
xorg-x11-drv-qxl-0.0.12-2.1.el6.x86_64
Comment 18 Chao Yang 2011-03-10 03:39:49 EST
(In reply to comment #17)
> Here is what I get in monitor on xorg-x11-drv-qxl-0.0.12-5.el6.x86_64:
> handle_dev_input: oom current 0 pipe 26
> handle_dev_input: oom current 0 pipe 26
> handle_dev_input: oom current 0 pipe 26
> handle_dev_input: oom current 0 pipe 26
> handle_dev_input: oom current 0 pipe 26
> handle_dev_input: oom current 0 pipe 26
> handle_dev_input: oom current 0 pipe 26
> handle_dev_input: oom current 0 pipe 26
> handle_dev_input: oom current 0 pipe 26
> handle_dev_input: oom current 0 pipe 26
> handle_dev_input: oom current 0 pipe 26
> handle_dev_input: oom current 0 pipe 26
> handle_dev_input: oom current 0 pipe 26
> handle_dev_input: oom current 0 pipe 26
> handle_dev_input: oom current 0 pipe 26
> red_wait_outgoing_item: blocked
> red_wait_outgoing_item: blocked
> handle_dev_destroy_surfaces: 
> red_wait_outgoing_item: blocked
> red_wait_outgoing_item: blocked
> handle_dev_destroy_surfaces: 
> red_wait_outgoing_item: blocked
> red_wait_outgoing_item: blocked
> flush_display_commands: update timeout
> 
> And I downgraded xorg-x11-drv-qxl, guest also hangs.
> # rpm -qa|grep xorg-x11-drv-qxl
> xorg-x11-drv-qxl-0.0.12-2.1.el6.x86_64


Ignore Comment #17.
Comment 19 Uri Lublin 2011-03-10 04:49:21 EST
*** Bug 683730 has been marked as a duplicate of this bug. ***
Comment 20 Lubos Kocman 2011-03-11 06:28:37 EST
Any progress with this? It's really blocking us from testing RHEL guests
Comment 21 Marian Krcmarik 2011-03-13 11:34:37 EDT
(In reply to comment #15)
> I've prepared a scratch build:
> https://brewweb.devel.redhat.com/taskinfo?taskID=3167085
> We still need to go over locking scenarios and see if we got them all covered.
> And get the patches accepted upstream...
Thank you, works for me so far and no hang has been seen yet.

> Also note, that sometimes chvt or gnome-system-monitor "hangs", but qemu-kvm
> still works, which I think suggests a problem in another component (x11 qxl
> driver?)
I haven't seen this one yet.
Comment 23 Hans de Goede 2011-03-17 07:40:06 EDT
Note we (uri, alon and I) have made some changes (fixes) to the locking
patchset, here is a scratch build containing our latest patchset, which has been posted on qemu-devel:
https://brewweb.devel.redhat.com/taskinfo?taskID=3184103
Comment 24 Alon Levy 2011-03-20 08:17:37 EDT
*** Bug 674055 has been marked as a duplicate of this bug. ***
Comment 25 Dor Laor 2011-03-24 05:51:38 EDT
*** Bug 683388 has been marked as a duplicate of this bug. ***
Comment 30 Eduardo Habkost 2011-05-05 13:22:15 EDT
    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: a bug in the locking logic in the spice code in qemu-kvm.

Consequence: qemu-kvm hangs when using some versions of the qxl driver in the guest (e.g. xorg-x11-drv-qxl-0.0.12-5).

Fix: fix the locking logic in the spice code in qemu-kvm.

Result: qemu-kvm doesn't hang anymore when using xorg-x11-drv-qxl-0.0.12-5 in the guest.
Comment 31 errata-xmlrpc 2011-05-19 07:23:10 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-0534.html
Comment 32 errata-xmlrpc 2011-05-19 09:01:39 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-0534.html
Comment 33 Tore H. Larsen 2011-06-22 03:02:26 EDT
cc. I hit this one. RHEL 6.1 server, vm is Fedora 15.

Note You need to log in before you can comment on or make changes to this bug.