kvm-spice cannot boot KDE - qxl display driver segfaults

Bug #902237 reported by Munzir Taha (منذر طه)
This bug report is a duplicate of:  Bug #913314: Corrupted display with Spice. Edit Remove
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
qemu-linaro (Ubuntu)
Confirmed
Medium
Serge Hallyn
xserver-xorg-video-qxl (Ubuntu)
New
Undecided
Unassigned

Bug Description

Hi, I am using ubuntu precise as a host and guest and launched kvm-spice but the guest is too slow. When I have the login screen of KDE, I entered my info and again too slow to display the icons on the splash and at the end logged me off. I tried virt-manager and I got a message
Error starting domain: unsupported configuration: spicevmc not supported in this QEMU binary

[ 23.284] Zero width or height
[ 23.388]
Backtrace:
[ 23.389] 0: /usr/bin/X (xorg_backtrace+0x26) [0x460566]
[ 23.389] 1: /usr/bin/X (0x400000+0x64b6a) [0x464b6a]
[ 23.389] 2: /lib/x86_64-linux-gnu/libpthread.so.0 (0x7fe002c7c000+0x10060) [0x7fe002c8c060]
[ 23.389] 3: /usr/lib/xorg/modules/drivers/qxl_drv.so (0x7fdfffdcf000+0xb078) [0x7fdfffdda078]
[ 23.389] 4: /usr/lib/xorg/modules/drivers/qxl_drv.so (0x7fdfffdcf000+0x6a0b) [0x7fdfffdd5a0b]
[ 23.389] 5: /usr/lib/xorg/modules/drivers/qxl_drv.so (0x7fdfffdcf000+0x7014) [0x7fdfffdd6014]
[ 23.389] 6: /usr/lib/xorg/modules/drivers/qxl_drv.so (0x7fdfffdcf000+0x813c) [0x7fdfffdd713c]
[ 23.389] 7: /usr/lib/xorg/modules/drivers/qxl_drv.so (0x7fdfffdcf000+0xe92b) [0x7fdfffddd92b]
[ 23.389] 8: /usr/bin/X (miCopyRegion+0x18a) [0x54fe2a]
[ 23.389] 9: /usr/bin/X (miDoCopy+0x392) [0x550322]
[ 23.389] 10: /usr/lib/xorg/modules/drivers/qxl_drv.so (0x7fdfffdcf000+0xef3e) [0x7fdfffdddf3e]
[ 23.389] 11: /usr/bin/X (0x400000+0xe05bc) [0x4e05bc]
[ 23.389] 12: /usr/bin/X (0x400000+0x2bc83) [0x42bc83]
[ 23.389] 13: /usr/bin/X (0x400000+0x2fb89) [0x42fb89]
[ 23.389] 14: /usr/bin/X (0x400000+0x232fe) [0x4232fe]
[ 23.389] 15: /lib/x86_64-linux-gnu/libc.so.6 (__libc_start_main+0xed) [0x7fe001ba530d]
[ 23.389] 16: /usr/bin/X (0x400000+0x235ed) [0x4235ed]
[ 23.389] Segmentation fault at address 0x3e2e9e8
[ 23.389]
Caught signal 11 (Segmentation fault). Server aborting
[ 23.389]

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 44, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 65, in tmpcb
    callback(*args, **kwargs)
  File "/usr/share/virt-manager/virtManager/domain.py", line 1050, in startup
    self._backend.create()
  File "/usr/lib/python2.7/dist-packages/libvirt.py", line 511, in create
    if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
libvirtError: unsupported configuration: spicevmc not supported in this QEMU binary

$ apt-cache policy qemu-kvm-spice
qemu-kvm-spice:
  Installed: 0.15.91-2011.11-0ubuntu1
  Candidate: 0.15.91-2011.11-0ubuntu1

# kvm-spice -vga qxl -spice port=5930,disable-ticketing precise.img
do_spice_init: starting 0.10.0
spice_server_add_interface: SPICE_INTERFACE_MIGRATION
spice_server_add_interface: SPICE_INTERFACE_KEYBOARD
spice_server_add_interface: SPICE_INTERFACE_MOUSE
spice_server_add_interface: SPICE_INTERFACE_QXL
red_worker_main: begin
ensure_display_channel_created: create display channel
ensure_cursor_channel_created: create cursor channel
kvm-spice: pci_add_option_rom: failed to find romfile "pxe-e1000.rom"
reds_handle_read_link_done: Peer doesn't support AUTH selection
reds_handle_main_link:
reds_disconnect:
reds_show_new_channel: channel 1:0, connected successfully, over Non Secure link
main_channel_link: add main channel client
reds_handle_main_link: NEW Client 0x33d7230 mcc 0x3381cd0 connect-id 1804289383
main_channel_handle_parsed: net test: invalid values, latency 0 roundtrip 353. assuming highbandwidth
reds_handle_read_link_done: Peer doesn't support AUTH selection
reds_handle_read_link_done: Peer doesn't support AUTH selection
reds_show_new_channel: channel 4:0, connected successfully, over Non Secure link
red_dispatcher_set_cursor_peer:
handle_dev_cursor_connect: cursor connect
red_connect_cursor: add cursor channel client
listen_to_new_client_channel: NEW ID = 0
reds_handle_read_link_done: Peer doesn't support AUTH selection
reds_show_new_channel: channel 2:0, connected successfully, over Non Secure link
red_dispatcher_set_display_peer:
handle_dev_display_connect: connect
handle_new_display_channel: add display channel client
handle_new_display_channel: New display (client 0x33d7230) dcc 0x7fe050002980 stream 0x33c0a90
handle_new_display_channel: jpeg disabled
handle_new_display_channel: zlib-over-glz disabled
listen_to_new_client_channel: NEW ID = 0
reds_show_new_channel: channel 3:0, connected successfully, over Non Secure link
inputs_connect: inputs channel client create
display_channel_client_wait_for_init: creating encoder with id == 0

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: qemu-kvm-spice 0.15.91-2011.11-0ubuntu1
ProcVersionSignature: Ubuntu 3.2.0-3.9-generic 3.2.0-rc4
Uname: Linux 3.2.0-3-generic x86_64
NonfreeKernelModules: acpi_call
ApportVersion: 1.90-0ubuntu1
Architecture: amd64
Date: Fri Dec 9 19:38:13 2011
EcryptfsInUse: Yes
ExecutablePath: /usr/bin/qemu-system-x86_64-spice
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Beta amd64 (20110920.1)
ProcEnviron:
 SHELL=/bin/bash
 PATH=(custom, no user)
 LANG=en_US.UTF-8
SourcePackage: qemu-linaro
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Munzir Taha (منذر طه) (munzirtaha) wrote :
Steve Langasek (vorlon)
Changed in qemu-linaro (Ubuntu):
assignee: nobody → Serge Hallyn (serge-hallyn)
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Thanks for reporting this bug. The libvirt and virt-manager parts will need to be addressed separately. I'll open a bug against libvirt for that. I will try to reproduce the slowness using kvm-spice directly.

Changed in qemu-linaro (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Wow, you're not kidding about it being slow. Even with --enable-kvm I can't get boot from a fedora cdrom to complete.

I hope you don't mind, I will retitle this bug to focus it on the speed. I will (or you can) later open a separate bug on libvirt support for spice.

Changed in qemu-linaro (Ubuntu):
status: New → Confirmed
summary: - proper spice support is missing from kvm-spice and virt-manager
+ kvm-spice is very slow to boot
Revision history for this message
Serge Hallyn (serge-hallyn) wrote : Re: kvm-spice is very slow to boot

I don't believe it was slow like this when based on the qemu-kvm sources, so I may ahve toggled a bad switch.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

--disable-system seems the likely culprit.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Ah, actually the only problem is that it is running with too little memory.

Munzir, could you try adding '-m 512' or '-m 1024' to the kvm-spice arguments?

The qemu-kvm tree has a patch to triple the amount of memory by default, but qemu-linaro does not, so kvm-spice is running with 128M by default

Changed in qemu-linaro (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Munzir Taha (منذر طه) (munzirtaha) wrote :

I tried with -m 2048 before filing the bug but still the same problem

Revision history for this message
Munzir Taha (منذر طه) (munzirtaha) wrote :

I guess it's related to X, so here is my Xorg.0.log after failing to login to KDE but managed to log to unity with very very bad display

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

@Munzir,

this is a long shot, but could you try adding -vga qxl -global qxl-vga.vram_size=67108864 ?

What is the guest you are running? I've not reproduced this, but perhaps your client punishes the video driver harder...

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

http://lists.freedesktop.org/archives/spice-devel/2011-June/004107.html *may* be related.

Updating spice to 0.10.0 from sid may help. We should definately sync that anyway.

Revision history for this message
Munzir Taha (منذر طه) (munzirtaha) wrote :

Thanks Hallyn, for your care
I did upgrade to libspice-server1_0.10.0-1_amd64.deb seabios_1.6.3-2_all.deb spice-client_0.10.0-1_amd64.deb from sid. Still I cannot login with spice/qxl though vnc/std works well.

Revision history for this message
Munzir Taha (منذر طه) (munzirtaha) wrote :

Neeless to say I also tried -vga qxl -global qxl-vga.vram_size=67108864 but still same problem

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Is your guest running kubuntu?

Revision history for this message
Munzir Taha (منذر طه) (munzirtaha) wrote :

Yes, my host and guest are running kubuntu precise desktop for amd64

Changed in qemu-linaro (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

With the title as is, 'confirmed' is not right, as noone has replicated this that I know of. It's quite fast for me.

However, I've finally replicated the failure to log into kde with -vga qxl.

Should I change the title to reflect that issue?

The crash on fullscreen->unfullscreen I couldn't replicate. You get this with the spicec viewer?

Revision history for this message
Munzir Taha (منذر طه) (munzirtaha) wrote :

It's still very slow unless one used the --enable-kvm. The option should be a default option for kvm and kvm-spice. If someone called qemu instead the option shouldn't be enabled by default. This is how things used to be at least as far as I know.

Revision history for this message
Munzir Taha (منذر طه) (munzirtaha) wrote :

I even tried info kvm in the console and it says it's enabled so there is a bug here

Revision history for this message
Munzir Taha (منذر طه) (munzirtaha) wrote :

I am sorry info kvm show it's disabled

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Thanks Munzir. For anyone following along, the easiest way to verify is to do

  kvm-spice -monitor stdio -vnc :1

and see:

QEMU 1.0 monitor - type 'help' for more information
(qemu) info kvm
kvm support: disabled

I agree that ideally for it to be named kvm, it should have kvm enabled by default. That that isn't happening is an unfortunate side-effect of sharing the codebase with the qemu tree in universe. I'm not sure however whether patching the code during build to enable kvm by default would be acceptable or (in terms of long-term maintenance) desirable. While the patch would be simple, it would be almost certain to rot over time and eventually cause a build failure or, worse, a subtler hard-to-diagnose error.

Another alternative is to rename kvm-spice to qemu-spice. That in itself seems unfortunate to me, and offhand I"m not sure if that would cause issues with having libvirt call it when qemu-kvm was available.

A third possibility is to accept it and leave this as an open, known, bug.

So I'm open to input right now about the best path forward.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Regarding the inability to log into kde, note that I did not see the 'surfaces' error that Munzir saw, so I'm not sure that is related to the actual cause of the bug.

Revision history for this message
Munzir Taha (منذر طه) (munzirtaha) wrote :

It seems the errors are logged in the Xorg.0.log.old. Mostly, the problem is in the qxl display driver. Attached is the file with the Segmentation fault.

Revision history for this message
Munzir Taha (منذر طه) (munzirtaha) wrote :

Please also note that kvm has kvm enabled by default, though it links to qemu, so why not kvm-spice?

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

kvm comes from the qemu-kvm package, which comes from the qemu-kvm source tree (git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git). This enables kvm by default.

The qemu-kvm-spice package is provided by the qemu-linaro source package, which is based on the qemu source tree (git://git.qemu.org/qemu.git). It disables kvm by default.

The reason for qemu-kvm-spice to come from the qemu-linaro source package is because spice cannot go into main, and qemu-kvm is in main while qemu-linaro is in universe.

So the answer to 'why not kvm-spice' is because that is the decision made by the upstream for the qemu tree.

My fear is that patching this during build for the qemu-kvm-spice package will be fragile.

Revision history for this message
Munzir Taha (منذر طه) (munzirtaha) wrote :

Then, can you please change the title to something like "kvm-spice cannot boot KDE becasue of a qxl display driver segfault"?

summary: - kvm-spice is very slow to boot
+ kvm-spice cannot boot KDE - qxl display driver segfaults
Bryce Harrington (bryce)
description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.