qemu-kvm-0.14.0 Aborts with -vga qxl

Bug #723871 reported by Rick Vernam
26
This bug affects 5 people
Affects Status Importance Assigned to Milestone
QEMU
Invalid
Undecided
Unassigned
libvirt (Ubuntu)
Invalid
Undecided
Unassigned
qemu-kvm (Ubuntu)
Fix Released
Medium
Serge Hallyn

Bug Description

Host CPU is Core i7 Q820. KVM is from 2.6.35-gentoo-r5 kernel (x86_64).
Host has spice-0.7.2 and spice-protocol-0.7.0.
Guest is Windows XP SP3 with qxl driver 0.6.1, virtio-serial 1.1.6 and vdagent 0.6.3.

qemu-kvm is started like so:
qemu-system-x86_64 -cpu host -enable-kvm -pidfile /home/rick/qemu/hds/wxp.pid -drive file=/home/rick/qemu/hds/wxp.raw,if=virtio,media=disk,aio=native,snapshot=on -m 768 -name WinXP -net nic,model=virtio -net user -localtime -usb -vga qxl -device virtio-serial -chardev spicevmc,name=vdagent,id=vdagent -device virtserialport,chardev=vdagent,name=com.redhat.spice.0 -spice port=1234,disable-ticketing -monitor stdio
and crashes with:
qemu-system-x86_64: /home/rick/qemu/src/qemu-kvm-0.14.0/qemu-kvm.c:1724: kvm_mutex_unlock: Assertion `!cpu_single_env' failed.
Aborted

If I use -no-kvm, it works fine. If I use -vga std, it works fine. -enable-kvm and -vga qxl crashes.

Revision history for this message
Rick Vernam (rickv-hobi) wrote :

I also intended to mention that using qemu-0.14.0 works just fine; the crash only occurs with qemu-kvm-0.14.0.

Revision history for this message
Rick Vernam (rickv-hobi) wrote :

sorry, on the guest it is virtio-serial-1.1.16, not 1.1.6.

Revision history for this message
Paul Whittaker (paul-whittaker) wrote :

I get the same error under very similar conditions:

Host is Athlon II X3 400e (triple core), host OS is my own DIET-PC embedded platform, 2.6.34.1 x86_64 kernel with x86_64 userspace. Qemu-kvm compiled myself from official qemu-kvm-0.14.0 sources Debian Lenny, against spice / spice-protocol 0.6.4, using:

export CFLAGS='-O3 -m64'
./configure --prefix=/usr/local --enable-mixemu --disable-brlapi \
        --disable-vnc-tls --enable-system --disable-linux-user \
        --disable-curses --audio-drv-list="oss sdl" --enable-io-thread \
        --disable-vnc-png --enable-vnc-thread --enable-spice \
        --audio-card-list="ac97 es1370 sb16 cs4231a adlib gus hda" \
        --target-list="i386-softmmu x86_64-softmmu arm-softmmu mips-softmmu mipsel-softmmu ppc-softmmu ppc64-softmmu sparc-softmmu sparc64-softmmu"

Guest is Windows XP SP3 (uniprocessor), crash with exact same error as above occurs when attempting to install qxl 0.6.3 spice driver on the guest. Guest has no virtio-serial or vdagent, but has viostor and virtio network drivers.

Started using:

qemu-system-x86_64 -M pc -m 512 -vga qxl -soundhw ac97 -localtime -rtc-td-hack -enable-kvm -name WinXP -net nic,model=virtio,macaddr=00:77:69:6e:78:70 -net tap,ifname=winxp -drive file=winxppro.img,if=virtio,aio=threads,boot=on -boot c

Changed in qemu:
status: New → Confirmed
status: Confirmed → New
status: New → Confirmed
Revision history for this message
Alon Levy (alonlevy1) wrote :

This is fixed by the following patch on the list (confirmed by xming on list):

 http://patchwork.ozlabs.org/patch/84704/

Hopefully that patch will be merged soon.

Alon

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

@Rick,

could you tell me if the debs in comment #5 fix the issue? If so I'll go ahead and do a merge request.

Revision history for this message
Rick Vernam (rickv-hobi) wrote :

Serge,
I run qemu-kvm from source. My distro is Gentoo, so I can't check your debs.
I applied the patch from comment #4 last night and found that I have not encountered this bug since.

Let me know if I can provide any additional info...

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

Ok, thanks Rick. Actually, I guess as this isn't an SRU I can go ahead and verify it myself and upload.

Changed in qemu-kvm (Ubuntu):
status: New → In Progress
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

@Rick,

would you expect a fedora guest to reproduce this? Would it have the qxl driver? Or must it be Windows?

Revision history for this message
Rick Vernam (rickv-hobi) wrote : Re: [Qemu-devel] [Bug 723871] Re: qemu-kvm-0.14.0 Aborts with -vga qxl

On Tuesday 01 March 2011 12:29:14 Serge Hallyn wrote:
> @Rick,
>
> would you expect a fedora guest to reproduce this? Would it have the
> qxl driver? Or must it be Windows?

I don't have a fedora guest to test on, and I don't know the implementation
details well enough to postulate.
-Rick

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

Thanks - I was able to reproduce the lockup with a RHEL boot cd, and confirm that the proposed fix works.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package qemu-kvm - 0.14.0~rc1+noroms-0ubuntu4

---------------
qemu-kvm (0.14.0~rc1+noroms-0ubuntu4) natty; urgency=low

  * Apply spice-qxl-locking-fix-for-qemu-kvm.patch to fix bug with -qxl.
    (LP: #723871)
 -- Serge Hallyn <email address hidden> Tue, 01 Mar 2011 11:12:44 -0600

Changed in qemu-kvm (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Dave Walker (davewalker) wrote :

@Serge, I had to re-target your branch (and merge) against 0.14.0~rc1+noroms-0ubuntu4 as *ubuntu3 had already been uploaded for a different fix, and the package-importer failed to suck it in.

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

Packages from "ppa:serge-hallyn/spice" have been installed on Ubuntu 11.04 Beta 2. Bug with " -vga qxl" is still in place :-

root@NattyNarwhal:/usr/tmp# /usr/bin/kvm-spice -cpu host -enable-kvm -name VF14 -m 2048 \
> -drive file=/usr/tmp/disk.qcow2,if=virtio,media=disk,aio=native \
> -net nic,model=virtio -net user -localtime \
> -usb -vga qxl -device virtio-serial -chardev spicevmc,name=vdagent,id=vdagent \
> -device virtserialport,chardev=vdagent,name=com.redhat.spice.0 \
> -spice port=5900,disable-ticketing
do_spice_init: starting 0.8.0
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
kvm-spice: pci_add_option_rom: failed to find romfile "pxe-virtio.bin"
handle_dev_destroy_surfaces:
handle_dev_destroy_surfaces:
handle_dev_input: start
reds_handle_main_link:
reds_show_new_channel: channel 1:0, connected successfully, over Non Secure link
reds_main_handle_message: net test: invalid values, latency 0 roundtrip 9651. assuming highbandwidth
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 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 3:0, connected successfully, over Non Secure link
inputs_link:
kvm-spice: /build/buildd/qemu-kvm-spice-0.14.0+noroms/qemu-kvm.c:1724: kvm_mutex_unlock: Assertion `!cpu_single_env' failed.
Aborted

This issue has been fixed on Fedora 15 on 03 /18/2001 .
In meantime , view patches in qemu-0.14.0-7.fc14.src.rpm :-
http://repos.fedorapeople.org/repos/jforbes/virt-preview/fedora-14/SRPMS/
. . . . . . .
qemu-0.14.0-7.fc14.src.rpm 07-Apr-2011 21:46 5.1M
. . . . . . . .

Revision history for this message
Serge Hallyn (serge-hallyn) wrote : Re: [Bug 723871] Re: qemu-kvm-0.14.0 Aborts with -vga qxl

Quoting Boris Derzhavets (<email address hidden>):
> Packages from "ppa:serge-hallyn/spice" have been installed on Ubuntu
> 11.04 Beta 2. Bug with " -vga qxl" is still in place :-

Hi,

thanks for reporting this bug. We have decided not to proceed with that
ppa, but rather to take the qemu-kvm-spice packaging in that ppa and
apply it to updated packages in dev-zero's ppa. Then push that to
universe.

dev-zero, as you've been rather busy the last few weeks, unless you say
otherwise I will go ahead (early next week) and take a stab at an updated
version of your packages and forward the result to you.

thanks,
-serge

Revision history for this message
David Rando (david-rando) wrote :

Looking forward to it.

Thanks!!!

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

Current patches on F15:-
[root@fedora15a SOURCES]# ls -l
total 5360
-rw-r--r--. 1 root root 4618 Mar 30 01:58 0001-qxl-spice-display-move-pipe-to-ssd.patch
-rw-r--r--. 1 root root 10176 Mar 30 01:58 0002-qxl-implement-get_command-in-vga-mode-without-locks.patch
-rw-r--r--. 1 root root 5073 Mar 30 01:58 0003-qxl-spice-remove-qemu_mutex_-un-lock_iothread-around.patch
-rw-r--r--. 1 root root 7783 Mar 30 01:58 0004-hw-qxl-render-drop-cursor-locks-replace-with-pipe.patch
-rw-r--r--. 1 root root 1733 Mar 30 01:58 0005-char-Split-out-tcp-socket-close-code-in-a-separate-f.patch
-rw-r--r--. 1 root root 22320 Mar 30 01:58 0006-char-Add-a-QemuChrHandlers-struct-to-initialise-char.patch
-rw-r--r--. 1 root root 1913 Mar 30 01:58 0007-iohandlers-Add-enable-disable_write_fd_handler-funct.patch
-rw-r--r--. 1 root root 2182 Mar 30 01:58 0008-char-Add-framework-for-a-write-unblocked-callback.patch
-rw-r--r--. 1 root root 6678 Mar 30 01:58 0009-char-Update-send_all-to-handle-nonblocking-chardev-w.patch
-rw-r--r--. 1 root root 2583 Mar 30 01:58 0010-char-Equip-the-unix-tcp-backend-to-handle-nonblockin.patch
-rw-r--r--. 1 root root 2000 Mar 30 01:58 0011-char-Throttle-when-host-connection-is-down.patch
-rw-r--r--. 1 root root 1650 Mar 30 01:58 0012-virtio-console-Enable-port-throttling-when-chardev-i.patch
-rw-r--r--. 1 root root 5036 Mar 30 01:58 0013-spice-qemu-char.c-add-throttling.patch
-rw-r--r--. 1 root root 2822 Mar 30 01:58 0014-spice-qemu-char.c-remove-intermediate-buffer.patch
-rw-r--r--. 1 root root 2807 Mar 30 01:58 0015-chardev-Allow-frontends-to-notify-backends-of-guest-.patch
-rw-r--r--. 1 root root 1592 Mar 30 01:58 0016-virtio-console-notify-backend-of-guest-open-close.patch
-rw-r--r--. 1 root root 1536 Mar 30 01:58 0017-spice-chardev-listen-to-frontend-guest-open-close.patch
-rw-r--r--. 1 root root 1784 Mar 30 01:58 0018-spice-qemu-char-Fix-flow-control-in-client-guest-dir.patch
-rw-r--r--. 1 root root 40 Mar 30 01:58 80-kvm.rules
-rw-r--r--. 1 root root 2202 Mar 30 01:58 ksm.init
-rw-r--r--. 1 root root 168 Mar 30 01:58 ksm.sysconfig
-rw-r--r--. 1 root root 3442 Mar 30 01:58 ksmtuned
-rw-r--r--. 1 root root 478 Mar 30 01:58 ksmtuned.conf
-rw-r--r--. 1 root root 1968 Mar 30 01:58 ksmtuned.init
-rwxr-xr-x. 1 root root 284 Mar 30 01:58 kvm.modules
-rw-r--r--. 1 root root 1155 Mar 30 01:58 pc-add-a-Fedora-13-machine-type-for-backward-compat.patch
-rw-r--r--. 1 root root 1748 Mar 30 01:58 qemu-fix-non-PCI-target-build.patch
-rwxr-xr-x. 1 root root 3199 Mar 30 01:58 qemu.init
-rw-rw-r--. 1 root root 5320696 Feb 24 19:11 qemu-kvm-0.14.0.tar.gz
-rw-r--r--. 1 root root 1045 Mar 30 01:58 qemu-vhost-fix-dirty-page-handling.patch

I believe there is no the one http://patchwork.ozlabs.org/patch/84704/ you have been using

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

View also

http://lists.fedoraproject.org/pipermail/virt/2011-March/002572.html

Per Alon Levy :-

here is a new patchset, it's basically the old plus first patch of reverting gerd's
(cpu_single_env hackage) and last one removing all the locks, after being
convinced by hans (cc'ed) and uri that it should work. Tested with rhel
qemu-kvm, which should be identical (tm) to fedora qemu-kvm. On account of
being too lame to figure out how to add the patches to qemu.spec and doing a
scratch build right now..

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

Quoting Boris Derzhavets (<email address hidden>):
> View also
>
> http://lists.fedoraproject.org/pipermail/virt/2011-March/002572.html

Thanks, this should be added to the qemu-kvm-spice package then. Note that this patch is not yet upstream, but should be going in through the spice tree at some point.

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

Packages installed via ppa:serge-hallyn/spice2 have been tested positive for F14, W7 KVMs installs and runtime.
qemu-kvm-spice (0.14.0+noroms-0ubuntu4qxl2) natty is based on the most recent RH's QXL patches set for qemu-kvm-0.14.tar.gz
as far as i could see.

Revision history for this message
Alon Levy (alonlevy1) wrote :

(reply to #20) what does tested positive mean? works, or that the bug is manifest, i.e. doesn't work?

regarding latest patches, the required patches are the ones in the fedora package.

Links to patches would make it easy to verify you have the correct ones (sorry for being lazy to look into the package myself).

Alon

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

@Alon,

Here are the patches I cherrypicked, as you suggested on irc yesterday:

Subject: [PATCH 1/4] qxl/spice-display: move pipe to ssd
Subject: [PATCH 2/4] qxl: implement get_command in vga mode without locks
Subject: [PATCH 3/4] qxl/spice: remove qemu_mutex_{un,}lock_iothread around dispatcher
Subject: [PATCH 4/4] hw/qxl-render: drop cursor locks, replace with pipe

@Borislav,

thanks for testing.

Revision history for this message
David Rando (david-rando) wrote :

i've just tested it and it's working on a ubuntu natty installation. Qxl driver works and sound too.

Now when i tried to add the virtio-serial from virt-manager, i couldn't. So I compiled the latest 0.8.7 version with virtinst 0.500.6, but when i tried to add the spicevmc it complains with an error from libvirt.

So I searched and looks like it needs the libvirt 0.9.0 released april 4th. That's where i stopped.

So for this bug, here's a positive test. I guess the libvirt issue would be in another bug entry.

Thanks for the work !

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

@Serg,

I started getting execution denied errors in VirtManager or same in terminal after
virsh start W7 , when updated XML as follows

<emulator>/usr/bin/kvm-spice</emulatror>
. . . . .

<graphics type='spice' port='5930' autoport='no' listen='0.0.0.0'/>
<video>
<model type='qxl' vram='32768' heads='1'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</video>

When i attempted to fool libvirt and replace symlink kvm-spice or binary it's referencing
i got another execution denied error when spice-server started.
Fedora's libvirt doesn't have any problems of such kind ( even F14's libvirt in the very early times )

Install libvirt-0.8.8-4.fc15.src.rpm shows following patches in SOURCES :-

libvirt-0.8.8-avoid-resetting-errors.patch
libvirt-0.8.8-read-only-checks.patch
libvirt-0.8.8-kernel-boot-index.patch
libvirt-0.8.8-threadsafe-libvirtd-error-reporting.patch

It's hard to understand what part of code ( in patches ) is responsible for spice-server
behaviour. Once again RH's support is pretty much desired.

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

root@boris-System-P5Q3:/usr/bin# cp qemu-system-x86_64-spice qemu-system-x86_64
root@boris-System-P5Q3:/usr/bin# cp qemu-x86_64-spice qemu-x86_64

root@boris-System-P5Q3:~# cat W7.xml
<domain type='kvm'>
  <name>W7S</name>
  <memory>2097152</memory>
  <currentMemory>2097152</currentMemory>
  <vcpu>2</vcpu>
  <os>
    <type arch='x86_64' machine='pc-0.14'>hvm</type>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <pae/>
  </features>
  <clock offset='localtime'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/bin/kvm</emulator>
    <disk type='block' device='disk'>
      <driver name='qemu' type='raw'/>
      <source dev='/dev/sdb7'/>
      <target dev='hda' bus='ide'/>
      <address type='drive' controller='0' bus='0' unit='0'/>
    </disk>
    <controller type='ide' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:d7:d7:c6'/>
      <source bridge='br0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
    <serial type='pty'>
      <target port='0'/>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <input type='tablet' bus='usb'/>
    <input type='mouse' bus='ps2'/>
    <graphics type='spice' port='5930' autoport='no' listen='0.0.0.0'/>
    <sound model='ac97'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </sound>
    <video>
      <model type='qxl' vram='32786' heads='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </memballoon>
  </devices>
</domain>

root@boris-System-P5Q3:~# virsh define W7.xml
Domain W7S defined from W7.xml

root@boris-System-P5Q3:~# virsh start W7S
error: Failed to start domain W7S
error: internal error process exited while connecting to monitor: char device redirected to /dev/pts/1
do_spice_init: starting 0.8.1
do_spice_init: statistics shm_open failed, Permission denied

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

The permission denied will likely require an apparmor policy update. However I've also been seeing patches for spice support go by the mailing lists, so probably more will go wrong.

I will work on a updated libvirt sync in the same ppa, in preparation for o-series opening.

Changed in libvirt (Ubuntu):
status: New → Triaged
Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

Disabling AppArmor really allows libvirt to go with no problems.

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

Just disabling libvirtd profile is enough as well :-

# apparmor_parser -R /etc/apparmor.d/usr.sbin.libvirtd
# ln -s /etx/apparmor.d/usr.sbin.libvirtd /etc/apparmor.d/disable/

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Boris, you should not disable the profile but instead update it. See https://wiki.ubuntu.com/DebuggingApparmor and /usr/share/doc/libvirt-bin/README.Debian for details.

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

Thanks for advice. My primary target was to make sure , that it's not libvirt 8.8.1 on Ubuntu 11.04 issue.

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

git clone git://git.freedesktop.org/git/spice/qemu
cd qemu/
git checkout -b spice.v35 origin/spice.35

Allows to build qemu-kvm-spice_0.14.0+noroms-0ubuntu4qxl3_amd64.deb with patches

larger_default_ram_size.patch
# Detect-and-use-GCC-atomic-builtins-for-locking.patch
# 0001-qxl-spice-display-move-pipe-to-ssd.patch
# 0002-qxl-implement-get_command-in-vga-mode-without-locks.patch
# 0003-qxl-spice-remove-qemu_mutex_-un-lock_iothread-around.patch
# 0004-hw-qxl-render-drop-cursor-locks-replace-with-pipe.patch

Package seems to work OK with SPICE2 PPA

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

@Boris

Thanks for this work. Would you be interested in pursuing the process to push these packages (celt051, the spice packages, and qemu-kvm-spice based on your new package) into the Ubuntu archive? The process is described at https://wiki.ubuntu.com/UbuntuDevelopment/NewPackages.

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

@Serge,
  Sorry, but answer is no. I just learned how dh_make and dpkg-buildpackage works , picked up your's debian folder.
Updated debian/patches/series and changelog . built new debian package ( based on new qemu-kvm-spice-0.14.0+noroms_0ubuntu4qxl3.orig.tar.gz) due to three recent commits to upstream branch spice.v35 were done
by Gerd Hoffmann and seemed to solve the issue.
  My major concern is port to Ubuntu spice-gtk 0.6 ( with python bindings) . It requires GLIBC 2.14 (gtk2-devel >= 2.14).
I've installed via alienating 6 fedora's packages ( i.e. ignoring dependencies ) /usr/lib64/python2.7/dist-packages/SpiceClientGtk.so and VM's window got opened. Fixing complains one by one i got stuck when libc.so.6 was reported too old ( GLIBC 2.13) . You are going to switch to 2.14 only on 11.10 as far as i know. So , i should wait for alpha.

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

> You are going to switch to 2.14 only on 11.10 as far as i know. So , i should wait for alpha.

Natty has been released, so the ITP would in fact be for oneiric (11.10).

Thanks again for your help. If dev-zero isn't interested, I'll go
ahead and push the ITP.

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

What is ITP ?

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

Quoting Boris Derzhavets (<email address hidden>):
> What is ITP ?

ITP is an 'Intent to Package', as outlined at
https://wiki.ubuntu.com/UbuntuDevelopment/NewPackages. It's a type of
bug to open in order to get packages into the universe archive.

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :
Download full text (3.6 KiB)

Uncompress regular Natty qemu-kvm package :-

qemu-kvm_0.14.0+noroms-0ubuntu4.diff.gz
qemu-kvm_0.14.0+noroms-0ubuntu4.dsc
qemu-kvm_0.14.0+noroms.orig.tar.gz

# dpkg-source -x qemu-kvm_0.14.0+noroms-0ubuntu4.dsc
# cd qemu-kvm_0.14.0+noroms-0ubuntu4

Edit debian/rules and comment following line ( per Serge Hallyn)

# $(MAKE) -f debian/rules unpatch

to get patching to work !!

That's a reason why hack "spice-qxl-locking-fix-for-qemu-kvm.patch" didn't work originally.

Change ./configure part of debian/rules adding "--enable-spice" :-

config-host.mak: $(QUILT_STAMPFN)
        dh_testdir
        ./configure \
            --target-list="x86_64-softmmu i386-softmmu x86_64-linux-user i386-linux-user" \
            --prefix=/usr \
            --interp-prefix=/etc/qemu-binfmt/%M \
            --disable-blobs \
            --disable-strip \
            --enable-spice \
            $(conf_arch)
Save

Edit debian/patches/series:-

larger_default_ram_size.patch
Detect-and-use-GCC-atomic-builtins-for-locking.patch
# spice-qxl-locking-fix-for-qemu-kvm.patch
0001-qxl-spice-display-move-pipe-to-ssd.patch
0002-qxl-implement-get_command-in-vga-mode-without-locks.patch
0003-qxl-spice-remove-qemu_mutex_-un-lock_iothread-around.patch
0004-hw-qxl-render-drop-cursor-locks-replace-with-pipe.patch

Save and copy required patches to debian/patches.

Edit debian/control like in SPICE2 PPA:-

Build-Depends: bcc,
               bzip2,
               debhelper (>= 7),
               device-tree-compiler [powerpc],
               iasl,
               libaio-dev,
               libasound2-dev,
               libcelt051-dev,
               libcurl4-gnutls-dev,
               libgnutls-dev,
               libncurses5-dev,
               libpci-dev,
               libpixman-1-dev,
               libpulse-dev,
               libsasl2-dev,
               libsdl1.2-dev (>= 1.2.14),
               libssl-dev,
               libx11-dev,
               nasm,
               perl,
               pkg-config,
               quilt (>= 0.40),
               libspice-server-dev,
               spice-protocol-dev,
               sysv-rc (>= 2.86.ds1-14.1ubuntu2),
               texi2html,
               texinfo,
               uuid-dev,
               zlib1g-dev
Save.

# touch -f debian/chagelog
# cd ..
# dpkg-buildpackage -rfakeroot -b -us -uc
# cd ..

Remove regular qemu-kvm package via Synaptic Manager
Install been built just now :-

root@boris-System-P5Q3:~/QEMU14# dpkg -i ./qemu_0.14.0+noroms-0ubuntu4_amd64.deb \
> qemu-common_0.14.0+noroms-0ubuntu4_all.deb

root@boris-System-P5Q3:~/QEMU14# ls -l /usr/bin/kvm*
lrwxrwxrwx 1 root root 18 2011-05-06 15:24 /usr/bin/kvm -> qemu-system-x86_64
lrwxrwxrwx 1 root root 8 2011-05-06 15:24 /usr/bin/kvm-img -> qemu-img
lrwxrwxrwx 1 root root 8 2011-05-06 15:24 /usr/bin/kvm-nbd -> qemu-nbd
-rwxr-xr-x 1 root root 11792 2011-02-22 16:34 /usr/bin/kvm_stat

root@boris-System-P5Q3:~/QEMU14# ls -l /usr/bin/qemu*
-rwxr-xr-x 1 root root 3520568 2011-05-06 15:08 /usr/bin/qemu
-rwxr-xr-x 1 root root 2014976 2011-05-06 15:08 /usr/bin/qemu-i386
-rwxr-xr-x 1 root root 270 2011-05-06 14:04 /usr/bin/qemu-ifdown
-rwxr-xr-x 1 root root 13...

Read more...

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

Sorry, for typo in package name ( qemu-kvm) . I've upgraded version in debian/changelog.

root@boris-System-P5Q3:~/QEMU14# ls -l *.deb |grep -v "0ubuntu4_"

-rw-r--r-- 1 root root 19494 2011-05-06 16:45 kvm_84+dfsg-0ubuntu16+0.14.0+noroms+0ubuntu5_amd64.deb
-rw-r--r-- 1 root root 18958 2011-05-06 16:45 qemu_0.14.0+noroms-0ubuntu5_amd64.deb
-rw-r--r-- 1 root root 37758 2011-05-06 16:41 qemu-common_0.14.0+noroms-0ubuntu5_all.deb
-rw-r--r-- 1 root root 3512986 2011-05-06 16:45 qemu-kvm_0.14.0+noroms-0ubuntu5_amd64.deb

root@boris-System-P5Q3:~/QEMU14# dpkg -i ./qemu-kvm_0.14.0+noroms-0ubuntu5_amd64.deb \
> qemu_0.14.0+noroms-0ubuntu5_amd64.deb \
> qemu-common_0.14.0+noroms-0ubuntu5_all.deb

(Reading database ... 141175 files and directories currently installed.)
Preparing to replace qemu-kvm 0.14.0+noroms-0ubuntu4 (using .../qemu-kvm_0.14.0+noroms-0ubuntu5_amd64.deb) ...
Unpacking replacement qemu-kvm ...
Preparing to replace qemu 0.14.0+noroms-0ubuntu4 (using qemu_0.14.0+noroms-0ubuntu5_amd64.deb) ...
Unpacking replacement qemu ...
Preparing to replace qemu-common 0.14.0+noroms-0ubuntu4 (using qemu-common_0.14.0+noroms-0ubuntu5_all.deb) ...
Unpacking replacement qemu-common ...
Setting up qemu-common (0.14.0+noroms-0ubuntu5) ...
Setting up qemu-kvm (0.14.0+noroms-0ubuntu5) ...
Processing triggers for ureadahead ...
ureadahead will be reprofiled on next reboot
Processing triggers for man-db ...
Setting up qemu (0.14.0+noroms-0ubuntu5) ...

# dpkg -l | grep qemu
ii qemu 0.14.0+noroms-0ubuntu5 dummy transitional package from qemu to qemu-kvm
ii qemu-common 0.14.0+noroms-0ubuntu5 qemu common functionality (bios, documentation, etc)
ii qemu-kvm 0.14.0+noroms-0ubuntu5 Full virtualization on i386 and amd64 har

root@boris-System-P5Q3:~/QEMU14# ls -l /usr/bin/qemu*

-rwxr-xr-x 1 root root 3520568 2011-05-06 16:45 /usr/bin/qemu
-rwxr-xr-x 1 root root 2014976 2011-05-06 16:45 /usr/bin/qemu-i386
-rwxr-xr-x 1 root root 270 2011-05-06 14:04 /usr/bin/qemu-ifdown
-rwxr-xr-x 1 root root 138 2011-02-22 16:34 /usr/bin/qemu-ifup
-rwxr-xr-x 1 root root 350640 2011-05-06 16:45 /usr/bin/qemu-img
-rwxr-xr-x 1 root root 362928 2011-05-06 16:45 /usr/bin/qemu-io
-rwxr-xr-x 1 root root 338384 2011-05-06 16:45 /usr/bin/qemu-nbd
lrwxrwxrwx 1 root root 4 2011-05-06 16:48 /usr/bin/qemu-system-i386 -> qemu
-rwxr-xr-x 1 root root 3590968 2011-05-06 16:45 /usr/bin/qemu-system-x86_64
-rwxr-xr-x 1 root root 2055128 2011-05-06 16:45 /usr/bin/qemu-x86_64

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

I cannot upload packages to PPA :-

root@boris-System-P5Q3:~/KVMQEMU14# dput ppa:bderzhavets/spice2 qemu-kvm_0.14.0+noroms-0ubuntu7_amd64.changes
Checking signature on .changes
gpg: Signature made Sat 07 May 2011 02:27:25 PM MSD using RSA key ID 930900E6
gpg: Good signature from "Boris Derzhavets (Development key) <email address hidden>"
Good signature on /root/KVMQEMU14/qemu-kvm_0.14.0+noroms-0ubuntu7_amd64.changes.
Uploading to ppa (via ftp to ppa.launchpad.net):
  Uploading qemu-common_0.14.0+noroms-0ubuntu7_all.deb: done.
  Uploading qemu-kvm_0.14.0+noroms-0ubuntu7_amd64.deb: done.
  Uploading qemu_0.14.0+noroms-0ubuntu7_amd64.deb: done.
  Uploading kvm_84+dfsg-0ubuntu16+0.14.0+noroms+0ubuntu7_amd64.deb: done.
  Uploading qemu-kvm_0.14.0+noroms-0ubuntu7_amd64.changes: 2k/3k550 Changes file must be signed with a valid GPG signature: Verification failed 3 times: ["(7, 9, u'No public key')", "(7, 9, u'No public key')", "(7, 9, u'No public key')"] : Permission denied.
Note: This error might indicate a problem with your passive_ftp setting.
      Please consult dput.cf(5) for details on this configuration option.

Please, advise.

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :
Revision history for this message
Boris Derzhavets (bderzhavets) wrote :
Revision history for this message
Boris Derzhavets (bderzhavets) wrote :
Download full text (4.2 KiB)

Build spice-gtk-0.6 on Ubuntu 11.04 ( --with-pyton)

# cd /root/spice-gtk-0.6
# ./configure --prefix=/usr --build=x86_64-linux-gnu \
 --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share \
 --sysconfdir=/etc --localstatedir=/var --libexecdir=/usr/bin \
 --with-python

. . .

configure:

        Spice-Gtk 0.6
        ==============

        prefix: /usr
        c compiler: gcc -std=gnu99
        c++ compiler: g++

        Coroutine: ucontext
        Audio: pulse
        Target:
        SASL support: yes
        Gtk: 2.0

        Now type 'make' to build spice-gtk

# make

# find . -name "SpiceClientGtk*" -print
./gtk/SpiceClientGtk_la-spice-client-gtk-module.defs.o
./gtk/SpiceClientGtk.la
./gtk/SpiceClientGtk_la-spice-client-gtk-module.o
./gtk/.deps/SpiceClientGtk_la-spice-client-gtk-module.Plo
./gtk/.deps/SpiceClientGtk_la-spice-client-gtk-module.defs.Plo
./gtk/SpiceClientGtk_la-spice-client-gtk-module.lo
./gtk/.libs/SpiceClientGtk_la-spice-client-gtk-module.defs.o
./gtk/.libs/SpiceClientGtk.la
./gtk/.libs/SpiceClientGtk_la-spice-client-gtk-module.o
./gtk/.libs/SpiceClientGtk.a
./gtk/.libs/SpiceClientGtk.so
./gtk/.libs/SpiceClientGtk.lai
./gtk/SpiceClientGtk_la-spice-client-gtk-module.defs.lo

# make install (Doing so, i understand potential problems with spicec installed via PPA)

......

----------------------------------------------------------------------
test -z "/usr/bin" || /bin/mkdir -p "/usr/bin"
  /bin/bash ../libtool --mode=install /usr/bin/install -c spicy snappy '/usr/bin'
libtool: install: /usr/bin/install -c .libs/spicy /usr/bin/spicy
libtool: install: /usr/bin/install -c .libs/snappy /usr/bin/snappy
test -z "/usr/lib/python2.7/dist-packages" || /bin/mkdir -p "/usr/lib/python2.7/dist-packages"
 /bin/bash ../libtool --mode=install /usr/bin/install -c SpiceClientGtk.la '/usr/lib/python2.7/dist-packages'
libtool: install: warning: relinking `SpiceClientGtk.la'
libtool: install: (cd /root/spice-gtk-0.6/gtk; /bin/bash /root/spice-gtk-0.6/libtool --silent --tag CC --mode=relink gcc -std=gnu99 -pthread -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pixman-1 -I/usr/include/python2.7 -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/pygtk-2.0 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pixman-1 -g -O2 -module -avoid-version -fPIC -o SpiceClientGtk.la -rpath /usr/lib/python2.7/dist-packages SpiceClientGtk_la-spice-client-gtk-module.lo SpiceClientGtk_la-spice-client-gtk-module.defs.lo libspice-client-gtk-2.0.la libspice-client-glib-2.0.la -pthread -L/usr/lib/x86_64-linux-gnu -lgtk-x11-2...

Read more...

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

In spice session activated via virt-manager guest may run only in "VGA" mode. Setting video to "QXL" causes mouse to
disappear in VM's window.

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

I386 build constantly fails in my PPA https://launchpad.net/~bderzhavets/+archive/git-spice.
Build on local box ( Q9550,8 GB ) Ubuntu 11.04 (64-bit)

debuild -rfakeroot -b -k930900E6 | tee build-v35.log

doesn't have any problems with ./hw/qxl.c. I attached log and packages

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

@Boris,

The failure (in https://launchpadlibrarian.net/71569256/buildlog_ubuntu-natty-i386.qemu-kvm_0.14.0%2Bspice-v35-0ubuntu1_FAILEDTOBUILD.txt.gz) is:

/build/buildd/qemu-kvm-0.14.0+spice-v35/hw/qxl.c: In function 'interface_release_resource':
/build/buildd/qemu-kvm-0.14.0+spice-v35/hw/qxl.c:456:46: error: cast to pointer from integer of different size
/build/buildd/qemu-kvm-0.14.0+spice-v35/hw/qxl.c: In function 'qxl_add_memslot':
/build/buildd/qemu-kvm-0.14.0+spice-v35/hw/qxl.c:771:5: error: format '%llx' expects type 'long long unsigned int', but argument 5 has type 'long unsigned int'
/build/buildd/qemu-kvm-0.14.0+spice-v35/hw/qxl.c:771:5: error: format '%llx' expects type 'long long unsigned int', but argument 6 has type 'long unsigned int'
/build/buildd/qemu-kvm-0.14.0+spice-v35/hw/qxl.c: In function 'qxl_phys2virt':
/build/buildd/qemu-kvm-0.14.0+spice-v35/hw/qxl.c:813:16: error: cast to pointer from integer of different size
/build/buildd/qemu-kvm-0.14.0+spice-v35/hw/qxl.c: In function 'qxl_set_mode':
/build/buildd/qemu-kvm-0.14.0+spice-v35/hw/qxl.c:892:5: error: format '%lx' expects type 'long unsigned int', but argument 8 has type 'uint64_t'
/build/buildd/qemu-kvm-0.14.0+spice-v35/hw/qxl.c: In function 'qxl_map':
/build/buildd/qemu-kvm-0.14.0+spice-v35/hw/qxl.c:1028:5: error: format '%lx' expects type 'long unsigned int', but argument 6 has type 'pcibus_t'
/build/buildd/qemu-kvm-0.14.0+spice-v35/hw/qxl.c:1028:5: error: format '%lx' expects type 'long unsigned int', but argument 7 has type 'pcibus_t'
make[2]: *** [qxl.o] Error 1

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

@Serge,

I saw that. It doesn't happen when i extract source on local box via *.dsc file and build with 64-bit glibc.
I would guess it was attempt to compile with 32-bit version of glibc. 32-bit support on spice.v35 was dropped.

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

I commited build in mentioned PPA via

diff -Nru qemu-kvm-0.14.0+spice-v35/configure qemu-kvm-0.14.0+spicev35/configure
--- qemu-kvm-0.14.0+spice-v35/configure 2011-05-12 05:36:32.000000000 +0000
+++ qemu-kvm-0.14.0+spicev35/configure 2011-05-13 09:17:01.000000000 +0000
@@ -2484,7 +2484,7 @@
 if test -z "$werror" ; then
     if test "$z_version" = "50" -a \
         "$linux" = "yes" ; then
- werror="yes"
+ werror="no"
     else
         werror="no"
     fi

Actually , disabling "-Werror" to build qemu-common_0.14.0+spicev35-0ubuntu1_all.deb.
"qemu-kvm", "qemu" amd64 packages may be built with "-Werror" with no problems.
Please , DON'T install packages from https://launchpad.net/~bderzhavets/+archive/git-spice in 32-bit environment.

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :
Download full text (5.2 KiB)

Finally, i got it.

https://launchpadlibrarian.net/71622307/buildlog_ubuntu-natty-amd64.qemu-kvm_0.14.0%2Bspicev35-0ubuntu1_BUILDING.txt.gz

Log is clean

https://launchpadlibrarian.net/71622306/buildlog_ubuntu-natty-i386.qemu-kvm_0.14.0%2Bspicev35-0ubuntu1_BUILDING.txt.gz

qemu-common_0.14.0+spicev35-0ubuntu1_all.deb has nothing to do with "-Werror"

chroot-autobuild/build/buildd/qemu-common_0.14.0+spicev35-0ubuntu1_all.deb:
drwxr-xr-x root/root 0 2011-05-13 09:45 ./
drwxr-xr-x root/root 0 2011-05-13 09:45 ./usr/
drwxr-xr-x root/root 0 2011-05-13 09:45 ./usr/share/
drwxr-xr-x root/root 0 2011-05-13 09:45 ./usr/share/apport/
drwxr-xr-x root/root 0 2011-05-13 09:45 ./usr/share/apport/package-hooks/
-rw-r--r-- root/root 350 2011-05-13 09:15 ./usr/share/apport/package-hooks/source_qemu-kvm.py
drwxr-xr-x root/root 0 2011-05-13 09:45 ./usr/share/qemu/
-rwxr-xr-x root/root 1024 2011-05-13 09:44 ./usr/share/qemu/multiboot.bin
drwxr-xr-x root/root 0 2011-05-13 09:14 ./usr/share/qemu/keymaps/
-rw-r--r-- root/root 2587 2011-05-13 09:14 ./usr/share/qemu/keymaps/fr
-rw-r--r-- root/root 2576 2011-05-13 09:14 ./usr/share/qemu/keymaps/no
-rw-r--r-- root/root 1354 2011-05-13 09:14 ./usr/share/qemu/keymaps/pt-br
-rw-r--r-- root/root 2699 2011-05-13 09:14 ./usr/share/qemu/keymaps/hr
-rw-r--r-- root/root 934 2011-05-13 09:14 ./usr/share/qemu/keymaps/fr-ca
-rw-r--r-- root/root 11421 2011-05-13 09:14 ./usr/share/qemu/keymaps/bepo
-rw-r--r-- root/root 1866 2011-05-13 09:14 ./usr/share/qemu/keymaps/hu
-rw-r--r-- root/root 2672 2011-05-13 09:14 ./usr/share/qemu/keymaps/pl
-rw-r--r-- root/root 3064 2011-05-13 09:14 ./usr/share/qemu/keymaps/is
-rw-r--r-- root/root 1105 2011-05-13 09:14 ./usr/share/qemu/keymaps/nl
-rw-r--r-- root/root 3123 2011-05-13 09:14 ./usr/share/qemu/keymaps/th
-rw-r--r-- root/root 609 2011-05-13 09:14 ./usr/share/qemu/keymaps/en-us
-rw-r--r-- root/root 2735 2011-05-13 09:14 ./usr/share/qemu/keymaps/fr-be
-rw-r--r-- root/root 2649 2011-05-13 09:14 ./usr/share/qemu/keymaps/tr
-rw-r--r-- root/root 1096 2011-05-13 09:14 ./usr/share/qemu/keymaps/lt
-rw-r--r-- root/root 906 2011-05-13 09:14 ./usr/share/qemu/keymaps/fo
-rw-r--r-- root/root 293 2011-05-13 09:14 ./usr/share/qemu/keymaps/modifiers
-rw-r--r-- root/root 2450 2011-05-13 09:14 ./usr/share/qemu/keymaps/pt
-rw-r--r-- root/root 2462 2011-05-13 09:14 ./usr/share/qemu/keymaps/it
-rw-r--r-- root/root 2366 2011-05-13 09:14 ./usr/share/qemu/keymaps/mk
-rw-r--r-- root/root 2293 2011-05-13 09:14 ./usr/share/qemu/keymaps/sl
-rw-r--r-- root/root 1115 2011-05-13 09:14 ./usr/share/qemu/keymaps/et
-rw-r--r-- root/root 43 2011-05-13 09:14 ./usr/share/qemu/keymaps/nl-be
-rw-r--r-- root/root 2467 2011-05-13 09:14 ./usr/share/qemu/keymaps/de
-rw-r--r-- root/root 1008 2011-05-13 09:14 ./usr/share/qemu/keymaps/sv
-rw-r--r-- root/root 2581 2011-05-13 09:14 ./usr/share/qemu/keymaps/en-gb
-rw-r--r-- root/root 2239 2011-05-13 09:14 ./usr/share/qemu/keymaps/ar
-rw-r--r-- root/root 2576 2011-05-13 09:14 ./usr/s...

Read more...

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

Disabling -Werror on 32-bit builds is of course a workaround, but the right answer will be to see that the issues are fixed upstream.

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

Please, view one more time #50.

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

I have a hard time stomaching '32-bit support was dropped'. Is there an archived mailing list message saying more about that?

Can you build a 32-bit package (on a 32-bit host) with -Werror? If so, then I'm still misunderstanding your comment #50.

Sorry, please help me become unconfused :)

Revision history for this message
blueswirl (blauwirbel) wrote :

qemu-kvm.c does not exist in QEMU.

Changed in qemu:
status: Confirmed → Invalid
Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

@Serge,

> I have a hard time stomaching '32-bit support was dropped'. Is there an
> archived mailing list message saying more about that?

View: http://lists.freedesktop.org/archives/spice-devel/2010-November/001738.html

> Can you build a 32-bit package (on a 32-bit host) with -Werror?

No. I cannot

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

Responding # 56

> qemu-kvm.c does not exist in QEMU.
> Changed in qemu:
> status: Confirmed → Invalid

However ,

root@boris-System-P5Q3:~# lsmod | grep kvm
 kvm_intel 56851 8
 kvm 367707 1 kvm_intel

root@borus-System-P5Q3:~# virsh qemu-monitor-command --hmp VF15RC 'info kvm'
kvm support: enabled

Number 8 might decrease or en-crease when i stop and start domains.
I will try upload snapshot

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :
Revision history for this message
Boris Derzhavets (bderzhavets) wrote :
Revision history for this message
Boris Derzhavets (bderzhavets) wrote :
Revision history for this message
blueswirl (blauwirbel) wrote : Re: [Qemu-devel] [Bug 723871] Re: qemu-kvm-0.14.0 Aborts with -vga qxl

On Sat, May 14, 2011 at 9:20 PM, Boris Derzhavets
<email address hidden> wrote:
> Responding # 56
>
>> qemu-kvm.c does not exist in QEMU.
>> Changed in qemu:
>> status:       Confirmed → Invalid
>
> However ,
>
> root@boris-System-P5Q3:~# lsmod | grep kvm
>  kvm_intel              56851  8
>  kvm                   367707  1 kvm_intel
>
> root@borus-System-P5Q3:~# virsh qemu-monitor-command --hmp VF15RC 'info kvm'
> kvm support: enabled
>
> Number 8 might decrease or en-crease when i stop and start domains.
> I will try upload snapshot

qemu-kvm is still somewhat different from plain QEMU, even with
-no-kvm. Specifically the file where the crash happens only exists in
qemu-kvm.

In general, it's annoying to be bothered by bug report chatter of
other unrelated packages or for example distro packaging problems. In
this case, qemu-kvm and QEMU are very much related but this bug does
not happen to affect QEMU.

Maybe someone can unsubscribe qemu-devel-ml from this bug report,
please. Marking the bug 'Invalid' for QEMU didn't help. I couldn't
find anything from Launchpad docs and about 1,870,000 Google hits for
'unsubscribe launchpad' show that many others can't either.

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

> In this case, qemu-kvm and QEMU are very much related but this bug does
> not happen to affect QEMU.

In meantime, yes due to the most recent 3 commits .View :-

http://cgit.freedesktop.org/spice/qemu/log/?h=spice.v35

12 days spice: drop obsolete iothread lockingspice.v35 Gerd Hoffmann 2 -14/+0
12 days spice: don't call displaystate callbacks from spice server context. Gerd Hoffmann 4 -13/+29
12 days spice: don't create updates in spice server context. Gerd Hoffmann 3 -27/+54

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

Also in meantime git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git
contains commits:-

commit 196a778428989217b82de042725dc8eb29c8f8d8
Author: Gerd Hoffmann <email address hidden>
Date: Wed Apr 27 16:06:10 2011 +0200

    spice: drop obsolete iothread locking

    We don't use qemu internals from spice server context any more.
    Thus we don't also need to grab the iothread mutex from spice
    server context. And we don't have to temporarely release the
    lock to avoid deadlocks. Drop all the calls.

    Signed-off-by: Gerd Hoffmann <email address hidden>

commit 075360945860ad9bdd491921954b383bf762b0e5
Author: Gerd Hoffmann <email address hidden>
Date: Wed Apr 27 15:50:32 2011 +0200

    spice: don't call displaystate callbacks from spice server context.

    This patch moves the displaystate callback calls for setting the cursor
    and the mouse pointer from spice server to qemu (iothread) context.
    This allows us to simplify locking.

    Signed-off-by: Gerd Hoffmann <email address hidden>

commit e0c64d08d11736dcea7c5a6373e3e7f62db51d9e
Author: Gerd Hoffmann <email address hidden>
Date: Wed Apr 27 15:21:51 2011 +0200

    spice: don't create updates in spice server context.

    This patch moves the creation of spice screen updates from the spice
    server context to qemu iothread context (display refresh timer to be
    exact). This way we avoid accessing qemu internals (display surface)
    from spice thread context which in turn allows us to simplify locking.

    Signed-off-by: Gerd Hoffmann <email address hidden>

commit 14da8345b2f7c21bab20fd12b755a61d6277f171
Author: Jes Sorensen <email address hidden>
Date: Tue Feb 1 15:53:23 2011 +0100

    Make spice dummy functions inline to fix calls not checking return values

    qemu_spice_set_passwd() and qemu_spice_set_pw_expire() dummy functions
    needs to be inline, in order to handle the case where they are called
    without checking the return value.

    Signed-off-by: Jes Sorensen <email address hidden>
    Signed-off-by: Gerd Hoffmann <email address hidden>

So , git clone git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git
creates a directory allows to build tar ball for debian "qemu-kvm" packages ,
which work with no "QXL" patching at all.

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :
Revision history for this message
Boris Derzhavets (bderzhavets) wrote :
Revision history for this message
Boris Derzhavets (bderzhavets) wrote :
Revision history for this message
blueswirl (blauwirbel) wrote :

On Tue, May 17, 2011 at 8:32 PM, Boris Derzhavets
<email address hidden> wrote:
> Also in meantime git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git

This is not QEMU tree, but qemu-kvm. They are not the same.

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

PPA "Building qemu-kvm&spice based on current /virt/kvm/qemu-kvm.git for Ubuntu 11.04 " :-
https://launchpad.net/~bderzhavets/+archive/git-spice
is ready . In meantime build is based on unstable mater branch.

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

apt-get install gobject-introspection libgirepository1.0-dev

./configure --prefix=/usr --build=x86_64-linux-gnu \
 --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share \
 --sysconfdir=/etc --localstatedir=/var --libexecdir=/usr/bin \
 --with-python --disable-static --enable-introspection

. . . . . .

        Spice-Gtk 0.6
        ==============

        prefix: /usr
        c compiler: gcc -std=gnu99
        c++ compiler: g++

        Coroutine: ucontext
        Audio: pulse
        Target:
        SASL support: yes
        Gtk: 2.0

        Now type 'make' to build spice-gtk

make
checkinstall --install=no
dpkg -i --force-overwrite ./spice-gtk_0.6-1_amd64.deb

Libraries and binaries been overwritten are exactly the same as before.
Spice session via Virt-Manager ( video "qxl") is manageable via keyboard
before logging in (F14,Natty VM's). Mouse pointer appears and works stable
during all the time after login.

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :
Download full text (3.4 KiB)

# dpkg -i --force-overwrite ./spice-gtk_0.6-1_amd64.deb

Generates :-

root@boris-System-P5Q3:/usr/src/SPICE_GTK_0.6/WORK/usr# ls -CR
.:
bin include lib share

./bin:
snappy spicy

./include:
spice-client-glib-2.0 spice-client-gtk-2.0 spice-controller

./include/spice-client-glib-2.0:
channel-cursor.h channel-main.h spice-audio.h spice-client.h spice-types.h
channel-display.h channel-playback.h spice-channel-enums.h spice-glib-enums.h spice-util.h
channel-inputs.h channel-record.h spice-channel.h spice-session.h

./include/spice-client-gtk-2.0:
spice-grabsequence.h spice-widget-enums.h spice-widget.h

./include/spice-controller:
spice-controller.h

./lib:
girepository-1.0 libspice-client-gtk-2.0.la libspice-controller.so
libspice-client-glib-2.0.la libspice-client-gtk-2.0.so libspice-controller.so.0
libspice-client-glib-2.0.so libspice-client-gtk-2.0.so.1 libspice-controller.so.0.0.0
libspice-client-glib-2.0.so.3 libspice-client-gtk-2.0.so.1.1.0 pkgconfig
libspice-client-glib-2.0.so.3.0.2 libspice-controller.la python2.7

./lib/girepository-1.0:
SpiceClientGLib-2.0.typelib SpiceClientGtk-2.0.typelib

./lib/pkgconfig:
spice-client-glib-2.0.pc spice-client-gtk-2.0.pc spice-controller.pc

./lib/python2.7:
dist-packages

./lib/python2.7/dist-packages:
SpiceClientGtk.la SpiceClientGtk.so

./share:
doc gir-1.0 gtk-doc locale vala

./share/doc:
spice-gtk

./share/doc/spice-gtk:
ABOUT-NLS AUTHORS COPYING doc NEWS README THANKS TODO

./share/doc/spice-gtk/doc:
Makefile Makefile.am Makefile.in reference

./share/doc/spice-gtk/doc/reference:
html Makefile.am spice-gtk-docs.xml spice-gtk-sections.txt
Makefile Makefile.in spice-gtk-overrides.txt spice-gtk.types

./share/doc/spice-gtk/doc/reference/html:
api-index-deprecated.html home.png SpiceChannel.html SpiceInputsChannel.html
api-index-full.html index.html SpiceCursorChannel.html SpiceMainChannel.html
api-reference.html index.sgml SpiceDisplayChannel.html SpicePlaybackChannel.html
application-support.html left.png SpiceDisplay.html SpiceRecordChannel.html
ch01.html object-tree.html spice-gtk.devhelp SpiceSession.html
ch02.html right.png spice-gtk.devhelp2 style.css
ch03.html SpiceAudio.html spice-gtk-Utilities.html up.png

./share/gir-1.0:
SpiceClientGLib-2.0.gir SpiceClientGtk-2.0.gir

./share/gtk-doc:
html

./share/gtk-doc/html:
spice-gtk

./share/gtk-doc/html/spice-gtk:
api-index-deprecated.html home.png SpiceChannel.html SpiceInputsChannel.html
api-index-full.html index.html SpiceCursorChannel.html SpiceMainChannel.html
api-reference.html index.sgml SpiceDisplayChannel.html SpicePlaybackChannel.html
application-support.html left.png SpiceDisplay.html SpiceRecordChannel.html
ch01.html object-tree.html spice-gtk.devhelp SpiceSession.html
ch02.html right.png spice-gtk.devhelp2 style.css...

Read more...

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :
Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

@Serge,

I am getting error when build in PPA :-

make[2]: Entering directory `/build/buildd/spice-gtk-0.6/po'
cd .. \
   && CONFIG_FILES=po/Makefile.in CONFIG_HEADERS= CONFIG_LINKS= \
        /bin/bash ./config.status
config.status: creating po/Makefile.in
./config.status: line 1509: gawk: command not found <= ??
config.status: error: could not create po/Makefile.in
make[2]: *** [stamp-it] Error 127
make[2]: Leaving directory `/build/buildd/spice-gtk-0.6/po'
make[1]: *** [distclean-recursive] Error 1
make[1]: Leaving directory `/build/buildd/spice-gtk-0.6'
dh_auto_clean: make -j1 distclean returned exit code 2
make: *** [clean] Error 29
dpkg-buildpackage: error: /usr/bin/fakeroot debian/rules clean gave error exit status 2

Locally it doesn't happen.
# which gawk
/usr/bin/gawk

Revision history for this message
Serge Hallyn (serge-hallyn) wrote : Re: [Bug 723871] Re: qemu-kvm-0.14.0 Aborts with -vga qxl

Please move this thread to a wiki.ubuntu.com wiki page and a
private or different mailing list.

Since gawk is needed for the build, you need to add gawk to
the build-depends line in debian/control.

-serge

Quoting Boris Derzhavets (<email address hidden>):
> @Serge,
>
> I am getting error when build in PPA :-
>
> make[2]: Entering directory `/build/buildd/spice-gtk-0.6/po'
> cd .. \
> && CONFIG_FILES=po/Makefile.in CONFIG_HEADERS= CONFIG_LINKS= \
> /bin/bash ./config.status
> config.status: creating po/Makefile.in
> ./config.status: line 1509: gawk: command not found <= ??
> config.status: error: could not create po/Makefile.in
> make[2]: *** [stamp-it] Error 127
> make[2]: Leaving directory `/build/buildd/spice-gtk-0.6/po'
> make[1]: *** [distclean-recursive] Error 1
> make[1]: Leaving directory `/build/buildd/spice-gtk-0.6'
> dh_auto_clean: make -j1 distclean returned exit code 2
> make: *** [clean] Error 29
> dpkg-buildpackage: error: /usr/bin/fakeroot debian/rules clean gave error exit status 2
>
> Locally it doesn't happen.
> # which gawk
> /usr/bin/gawk
>
> --
> You received this bug notification because you are a bug assignee.
> https://bugs.launchpad.net/bugs/723871
>
> Title:
> qemu-kvm-0.14.0 Aborts with -vga qxl
>
> Status in QEMU:
> Invalid
> Status in “libvirt” package in Ubuntu:
> Triaged
> Status in “qemu-kvm” package in Ubuntu:
> Fix Released
>
> Bug description:
> Host CPU is Core i7 Q820. KVM is from 2.6.35-gentoo-r5 kernel (x86_64).
> Host has spice-0.7.2 and spice-protocol-0.7.0.
> Guest is Windows XP SP3 with qxl driver 0.6.1, virtio-serial 1.1.6 and vdagent 0.6.3.
>
> qemu-kvm is started like so:
> qemu-system-x86_64 -cpu host -enable-kvm -pidfile /home/rick/qemu/hds/wxp.pid -drive file=/home/rick/qemu/hds/wxp.raw,if=virtio,media=disk,aio=native,snapshot=on -m 768 -name WinXP -net nic,model=virtio -net user -localtime -usb -vga qxl -device virtio-serial -chardev spicevmc,name=vdagent,id=vdagent -device virtserialport,chardev=vdagent,name=com.redhat.spice.0 -spice port=1234,disable-ticketing -monitor stdio
> and crashes with:
> qemu-system-x86_64: /home/rick/qemu/src/qemu-kvm-0.14.0/qemu-kvm.c:1724: kvm_mutex_unlock: Assertion `!cpu_single_env' failed.
> Aborted
>
> If I use -no-kvm, it works fine. If I use -vga std, it works fine.
> -enable-kvm and -vga qxl crashes.

Changed in libvirt (Ubuntu):
status: Triaged → Fix Released
status: Fix Released → Invalid
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.