[Spice-devel] qemu run crash when divice_add another qxl display card

Marc-André Lureau marcandre.lureau at gmail.com
Thu Jul 31 03:02:13 PDT 2014


On Tue, Jul 29, 2014 at 9:50 AM, zhou link <freboat at gmail.com> wrote:

> here hit an assertion:
>
> qemu-system-x86_64 -monitor stdio -vga qxl -spice
> port=7777,disable-ticketing
> (/home/brook/local/bin/qemu-system-x86_64:27280): Spice-Warning **:
> reds.c:3295:spice_server_init: [07-29 23:41:47]ct: Jul 26 2014 00:28:12
>
>
QEMU 2.0.0 monitor - type 'help' for more information
> (qemu)
> (qemu)
> (qemu)
> (qemu) device_add qxl
> (/home/brook/local/bin/qemu-system-x86_64:27280): SpiceWorker-ERROR **:
> red_worker.c:12385:handle_dev_stop: [07-29 23:41:56]assertion
> `worker->running' failed
>
>
Breakpoint 3, qemu_spice_display_stop () at ui/spice-core.c:922
922        spice_server_vm_stop(spice_
server);
(gdb) bt
#0  qemu_spice_display_stop () at ui/spice-core.c:922
#1  0x0000555555806910 in qxl_hard_reset (d=0x555556612660, loadvm=0) at
hw/display/qxl.c:1158
#2  0x00005555558069b9 in qxl_reset_handler (dev=0x555556612660) at
hw/display/qxl.c:1184
#3  0x00005555557d25a9 in device_reset (dev=0x555556612660) at
hw/core/qdev.c:996
#4  0x00005555557d1e85 in device_set_realized (obj=0x555556612660,
value=true, errp=0x7fffffffc298)
    at hw/core/qdev.c:833
#5  0x00005555558c76c7 in property_set_bool (obj=0x555556612660,
v=0x55555637d770, opaque=0x55555639ddb0,
    name=0x5555559ae629 "realized", errp=0x7fffffffc298) at
qom/object.c:1421
#6  0x00005555558c6245 in object_property_set (obj=0x555556612660,
v=0x55555637d770,
    name=0x5555559ae629 "realized", errp=0x7fffffffc298) at qom/object.c:819
#7  0x00005555558c7d0f in object_property_set_qobject (obj=0x555556612660,
value=0x555556388f50,
    name=0x5555559ae629 "realized", errp=0x7fffffffc298) at
qom/qom-qobject.c:24
#8  0x00005555558c6490 in object_property_set_bool (obj=0x555556612660,
value=true,
    name=0x5555559ae629 "realized", errp=0x7fffffffc298) at qom/object.c:883
#9  0x000055555570fda2 in qdev_device_add (opts=0x5555565bbca0) at
qdev-monitor.c:560


In qemu, spice_server_vm_stop() is called from device "reset" when it is
added, because spice_display_is_running. The spice server exposes a single
state, regardless the number of devices/worker,

In Spice server, handle_dev_stop:
-    spice_assert(worker->running);
+    if (!worker->running)
+        return;
+

It looks like replacing the assert with a simple check solves the issue,
but I am not sure qemu or the spice code handles the rest fine. What were
you trying to achieve?


cheers


-- 
Marc-André Lureau
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20140731/4b044af0/attachment.html>


More information about the Spice-devel mailing list