Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 357371 - app-emulation/qemu-kvm-{0.14,9999} crashes with spice and qxl [PATCH]
Summary: app-emulation/qemu-kvm-{0.14,9999} crashes with spice and qxl [PATCH]
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: AMD64 Linux
: High critical (vote)
Assignee: Gentoo QEMU Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-04 15:34 UTC by Ming-Wei
Modified: 2011-06-01 21:46 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
fix spice+qxl crash (qemu-kvm-0.14.0-spice-qxl-locking-fix-for-qemu-kvm.patch,5.45 KB, patch)
2011-03-04 15:37 UTC, Ming-Wei
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ming-Wei 2011-03-04 15:34:46 UTC
qemu-kvm-0.14 crashes with spice when loading qxl xorg driver 

Reproducible: Always

Steps to Reproduce:
1. compile qemu-kvm-0.14 with spice support
2. connect with spicec
3. startx with qxl driver

Actual Results:  
the kvm process crashes with

# gdb /usr/bin/qemu-system-x86_64
GNU gdb (Gentoo 7.2 p1) 7.2
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>...
Reading symbols from /usr/bin/qemu-system-x86_64...done.
(gdb) set args -name spaceball,process=spaceball -m 1024 -kernel
/boot/bzImage-2.6.37.2-guest -append "root=/dev/vda ro" -smp 1 -netdev
type=tap,id=spaceball0,script=kvm-ifup-brloc,vhost=on -device
virtio-net-pci,netdev=spaceball0,mac=00:16:3e:00:08:01 -drive
file=/dev/volume01/G-spaceball,if=virtio -vga qxl -spice
port=5957,disable-ticketing -monitor
telnet:192.168.0.254:10007,server,nowait,nodelay -pidfile
/var/run/kvm/spaceball.pid
(gdb) run
Starting program: /usr/bin/qemu-system-x86_64 -name
spaceball,process=spaceball -m 1024 -kernel
/boot/bzImage-2.6.37.2-guest -append "root=/dev/vda ro" -smp 1 -netdev
type=tap,id=spaceball0,script=kvm-ifup-brloc,vhost=on -device
virtio-net-pci,netdev=spaceball0,mac=00:16:3e:00:08:01 -drive
file=/dev/volume01/G-spaceball,if=virtio -vga qxl -spice
port=5957,disable-ticketing -monitor
telnet:192.168.0.254:10007,server,nowait,nodelay -pidfile
/var/run/kvm/spaceball.pid
[Thread debugging using libthread_db enabled]
do_spice_init: starting 0.6.0
spice_server_add_interface: SPICE_INTERFACE_KEYBOARD
spice_server_add_interface: SPICE_INTERFACE_MOUSE
[New Thread 0x7ffff4802710 (LWP 30294)]
spice_server_add_interface: SPICE_INTERFACE_QXL
[New Thread 0x7fffaacae710 (LWP 30295)]
red_worker_main: begin
handle_dev_destroy_surfaces:
handle_dev_destroy_surfaces:
handle_dev_input: start
[New Thread 0x7fffaa4ad710 (LWP 30298)]
[New Thread 0x7fffa9cac710 (LWP 30299)]
[New Thread 0x7fffa94ab710 (LWP 30300)]
[New Thread 0x7fffa8caa710 (LWP 30301)]
[New Thread 0x7fffa3fff710 (LWP 30302)]
[New Thread 0x7fffa37fe710 (LWP 30303)]
[New Thread 0x7fffa2ffd710 (LWP 30304)]
[New Thread 0x7fffa27fc710 (LWP 30305)]
[New Thread 0x7fffa1ffb710 (LWP 30306)]
[New Thread 0x7fffa17fa710 (LWP 30307)]
reds_handle_main_link:
reds_show_new_channel: channel 1:0, connected successfully, over Non Secure link
reds_main_handle_message: net test: latency 5.636000 ms, bitrate
11027768 bps (10.516899 Mbps)
reds_show_new_channel: channel 2:0, connected successfully, over Non Secure link
red_dispatcher_set_peer:
handle_dev_input: connect
handle_new_display_channel: jpeg disabled
handle_new_display_channel: zlib-over-glz disabled
reds_show_new_channel: channel 4:0, connected successfully, over Non Secure link
red_dispatcher_set_cursor_peer:
handle_dev_input: cursor connect
reds_show_new_channel: channel 3:0, connected successfully, over Non Secure link
inputs_link:
[New Thread 0x7fffa07f8710 (LWP 30312)]
[New Thread 0x7fff9fff7710 (LWP 30313)]
[New Thread 0x7fff9f7f6710 (LWP 30314)]
[New Thread 0x7fff9eff5710 (LWP 30315)]
[New Thread 0x7fff9e7f4710 (LWP 30316)]
[New Thread 0x7fff9dff3710 (LWP 30317)]
[New Thread 0x7fff9d7f2710 (LWP 30318)]
qemu-system-x86_64:
/var/tmp/portage/app-emulation/qemu-kvm-0.14.0/work/qemu-kvm-0.14.0/qemu-kvm.c:1724:
kvm_mutex_unlock: Assertion `!cpu_single_env' failed.

Program received signal SIGABRT, Aborted.
[Switching to Thread 0x7ffff4802710 (LWP 30294)]
0x00007ffff5daa165 in raise () from /lib/libc.so.6

Expected Results:  
X starting beautifully :D

Fixed with attached patch
Comment 1 Ming-Wei 2011-03-04 15:37:49 UTC
Created attachment 264723 [details, diff]
fix spice+qxl crash
Comment 2 Ming-Wei 2011-03-04 15:39:40 UTC
(In reply to comment #0)
> qemu-kvm-0.14 crashes with spice when loading qxl xorg driver 

Oops just noticed that qemu-kvm-0.14 is not in the tree yet but this applies to qemu-kvm-9999 too.
Comment 3 Martin Samek 2011-04-01 00:03:08 UTC
I have tested this patch successfully with the live ebuild. It solves the issue with crashing qemu-kvm when the guests qxl driver loaded. It is not included in qemu upstream, so I recommend add this patch to the ebuild until that.
Comment 4 Doug Goldstein (RETIRED) gentoo-dev 2011-05-27 23:39:30 UTC
This should be fixed in app-emulation/qemu-kvm-0.14.1 which is in the tree. 0.14.0 was never in the tree. Please confirm
Comment 5 Martin Samek 2011-05-28 19:34:07 UTC
But app-emulation/qemu-kvm-0.14.1

is missing qemu-kvm and kvm binary. Libvirt is unable to run guests.
Comment 6 Martin Samek 2011-05-28 19:42:55 UTC
Missing this:

/usr/bin/kvm -> /usr/bin/qemu-kvm
/usr/bin/qemu-kvm
Comment 7 Hopeless 2011-05-31 10:31:41 UTC
(In reply to comment #4)
> This should be fixed in app-emulation/qemu-kvm-0.14.1 which is in the tree.
> 0.14.0 was never in the tree. Please confirm

Not confirmed, I'm hitting the exact same error with -vga qxl under 0.14.1, even reporting the exact same line of qemu-kvm.c (1724).

Had a look on upstream bugtracker and mailing list, couldn't find anything related since patches were posted for 0.14.0 over 6 weeks ago...

Is this actually working now for anybody else?
Comment 8 Martin Samek 2011-05-31 10:41:20 UTC
No, missing qemu-kvm binary. Using qemu-system-x86_amd64 binary crashes at QXL driver loading. I have tested upstream 9999 yesterday and it works. It seems that there it is fixed.
Comment 9 Hopeless 2011-05-31 11:54:05 UTC
(In reply to comment #8)
> No, missing qemu-kvm binary. Using qemu-system-x86_amd64 binary crashes at QXL
> driver loading. I have tested upstream 9999 yesterday and it works. It seems
> that there it is fixed.

I justed tested 9999 now and it's not working for me, with -vga qxl I get a blank "screen"...

As for qemu-kvm, it's not a binary, just a wrapper script starting qemu-system-x86_64 with --enable-kvm (and "kvm" is just a symlink to this).
You can find it in the files subdirectory within app-emulation/qemu-kvm in your portage tree.

The required bits for installing this are still in the ebuild, don't know why it's not getting installed...