[Bug 1964777] Re: qxl_send_events: spice-server bug: guest stopped, ignoring

2022-05-20 Thread Bug Watch Updater
** Changed in: spice-xpi Status: Unknown => Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1964777 Title: qxl_send_events: spice-server bug: guest stopped, ignoring To manage not

[Bug 1964777] Re: qxl_send_events: spice-server bug: guest stopped, ignoring

2022-03-22 Thread Launchpad Bug Tracker
This bug was fixed in the package spice - 0.15.0-2ubuntu4 --- spice (0.15.0-2ubuntu4) jammy; urgency=medium * d/p/Revert-reds-start-QXL-devices-if-VM-is-running-fix-r.patch: fix race on spice init (LP: #1964777) -- Christian Ehrhardt Mon, 21 Mar 2022 09:23:33 +0100 ** Chang

[Bug 1964777] Re: qxl_send_events: spice-server bug: guest stopped, ignoring

2022-03-22 Thread Christian Ehrhardt 
MP approved, tests good, upstream ok with the change (some CI issues, but nothing really stopping it) => uploaded the fix for Jammy. ** Changed in: spice (Ubuntu) Assignee: Lena Voytek (lvoytek) => Christian Ehrhardt  (paelzer) -- You received this bug notification because you are a member

[Bug 1964777] Re: qxl_send_events: spice-server bug: guest stopped, ignoring

2022-03-21 Thread Christian Ehrhardt 
I did some more case analysis on this - this is complex and I might be wrong - but for now it seems to me that a revert of the offending commit is the best short term option. I've updated the upstream issue and submitted a PR: - https://gitlab.freedesktop.org/spice/spice/-/issues/64 - https://gitl

[Bug 1964777] Re: qxl_send_events: spice-server bug: guest stopped, ignoring

2022-03-21 Thread Launchpad Bug Tracker
** Merge proposal linked: https://code.launchpad.net/~paelzer/ubuntu/+source/spice/+git/spice/+merge/417153 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1964777 Title: qxl_send_events: spice-se

[Bug 1964777] Re: qxl_send_events: spice-server bug: guest stopped, ignoring

2022-03-17 Thread Christian Ehrhardt 
** Tags removed: server-triage-discuss ** Changed in: spice (Ubuntu) Assignee: (unassigned) => Lena Voytek (lvoytek) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1964777 Title: qxl_send_event

[Bug 1964777] Re: qxl_send_events: spice-server bug: guest stopped, ignoring

2022-03-17 Thread Christian Ehrhardt 
In terms of annoyance this is "Critical", but since it correctly initializes just a bit later and then works fine I can't consider it worse than "Medium" at the moment. ** Tags added: server-todo server-triage-discuss ** Changed in: spice (Ubuntu) Importance: Undecided => Medium -- You recei

[Bug 1964777] Re: qxl_send_events: spice-server bug: guest stopped, ignoring

2022-03-15 Thread Christian Ehrhardt 
FYI I chimed in on https://gitlab.freedesktop.org/spice/spice/-/issues/64 outlining what I've found. I'll check back later if there is an easy conclusion and follow up now that the people that know more about this code see what happens. -- You received this bug notification because you are a memb

[Bug 1964777] Re: qxl_send_events: spice-server bug: guest stopped, ignoring

2022-03-15 Thread Christian Ehrhardt 
In fact - as always - when you know what exactly you search for you find it. Related are: - https://gitlab.freedesktop.org/spice/spice/-/issues/64 - https://bugzilla.redhat.com/show_bug.cgi?id=2007363 - https://bugs.archlinux.org/task/71473 ** Bug watch added: Red Hat Bugzilla #2007363 https://

[Bug 1964777] Re: qxl_send_events: spice-server bug: guest stopped, ignoring

2022-03-15 Thread Christian Ehrhardt 
Report exists, but no progress yet https://gitlab.freedesktop.org/spice/spice/-/issues/64 ** Also affects: spice-xpi via https://gitlab.freedesktop.org/spice/spice/-/issues/64 Importance: Unknown Status: Unknown -- You received this bug notification because you are a member of Ubunt

[Bug 1964777] Re: qxl_send_events: spice-server bug: guest stopped, ignoring

2022-03-15 Thread Christian Ehrhardt 
Identified commit that causes this: commit c23cbd6fa821fea8ac4ed97ca679afebe2333c8c Author: Marc-André Lureau Date: Thu Jan 28 13:59:24 2021 +0400 reds: start QXL devices if VM is running Like char devices, QXL devices need to be explicily started. For some historical reason, cha

[Bug 1964777] Re: qxl_send_events: spice-server bug: guest stopped, ignoring

2022-03-15 Thread Christian Ehrhardt 
With debuginfo into libspice this looks like: (gdb) bt #0 __pthread_create_2_1 (newthread=0x572d4f10, attr=0x0, start_routine=0x77e33950 , arg=0x572d4f10) at ./nptl/pthread_create.c:621 #1 0x77eb11e6 in red_worker_run.isra.0 (worker=worker@entry=0x572d4f10) at ../serve

[Bug 1964777] Re: qxl_send_events: spice-server bug: guest stopped, ignoring

2022-03-15 Thread Christian Ehrhardt 
With the old lib, when the `qemu_spice_display_start` happens in the main thread the spawned "SPICE worker" still is at: (gdb) bt #0 0x7770ad7f in __GI___poll (fds=0x7fffb80031b0, nfds=2, timeout=2147483647) at ../sysdeps/unix/sysv/linux/poll.c:29 #1 0x77ab6686 in () at /lib/x8

[Bug 1964777] Re: qxl_send_events: spice-server bug: guest stopped, ignoring

2022-03-15 Thread Christian Ehrhardt 
It seems that when spawning the "SPICE worker" in the bad case the worker passes events before the other side is ready. In both cases the spawn goes through the same control path #0 __pthread_create_2_1 (newthread=0x572d4f10, attr=0x0, start_routine=0x77e33950, arg=0x572d4f10) at ./

[Bug 1964777] Re: qxl_send_events: spice-server bug: guest stopped, ignoring

2022-03-14 Thread Christian Ehrhardt 
Thread spawn for the spice worker: Thread 1 "qemu-system-x86" hit Breakpoint 5, __pthread_create_2_1 (newthread=0x572d1690, attr=0x0, start_routine=0x77e3d140, arg=0x572d1690) at pthread_create.c:597 597 in pthread_create.c (gdb) info threads Id Target Id

[Bug 1964777] Re: qxl_send_events: spice-server bug: guest stopped, ignoring

2022-03-14 Thread Christian Ehrhardt 
In the bad case the spice worker is at the fist qxl_send_events while at the same time the main process initializing is still not done yet. (gdb) info thread Id Target IdFrame 1Thread 0x767dbc40 (LWP 144970) "qemu-system-x86" qemu_spice_d

[Bug 1964777] Re: qxl_send_events: spice-server bug: guest stopped, ignoring

2022-03-14 Thread Christian Ehrhardt 
Good case (qemu_spice_display_start before qxl_send_events) Thread 1 "qemu-system-x86" hit Breakpoint 4, qemu_spice_display_start () at ../ui/spice-core.c:995 995 if (spice_display_is_running) { (gdb) bt #0 qemu_spice_display_start () at ../ui/spice-core.c:995 #1 0x55a8b6b7 in q

[Bug 1964777] Re: qxl_send_events: spice-server bug: guest stopped, ignoring

2022-03-14 Thread Christian Ehrhardt 
Bad case (qemu_spice_display_start after qxl_send_events) Thread 4 "SPICE Worker" hit Breakpoint 3, qxl_send_events (d=0x57194210, events=16) at ../hw/display/qxl.c:1867 1867uint32_t le_events = cpu_to_le32(events); (gdb) bt #0 qxl_send_events (d=0x57194210, events=16) at ../hw/d

[Bug 1964777] Re: qxl_send_events: spice-server bug: guest stopped, ignoring

2022-03-14 Thread Launchpad Bug Tracker
Status changed to 'Confirmed' because the bug affects multiple users. ** Changed in: qemu (Ubuntu) Status: New => Confirmed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1964777 Title: qxl_s

[Bug 1964777] Re: qxl_send_events: spice-server bug: guest stopped, ignoring

2022-03-14 Thread Christian Ehrhardt 
Compare the same git build between Impish and Jammy: ~/qemu/build$ gdb ./qemu-system-x86_64 (gdb) watch spice_display_is_running (gdb) b qxl_send_events (gdb) b qemu_spice_display_is_running (gdb) b qemu_spice_display_start (gdb) handle SIGUSR1 nostop noprint pass (gdb) run -cpu qemu64 -machine q3

[Bug 1964777] Re: qxl_send_events: spice-server bug: guest stopped, ignoring

2022-03-14 Thread Christian Ehrhardt 
We see that on Jammy the initialization ordering is different, here we get a call to `qxl_send_events` before qemu_spice_display_start happened and therefore triggering the error message. Later on the init happens and that might explain why I see no fatal issues later on on when using spice. Never

[Bug 1964777] Re: qxl_send_events: spice-server bug: guest stopped, ignoring

2022-03-14 Thread Christian Ehrhardt 
An -O0 build later for debugging... SimpleSpiceDisplay *ssd is ignored, the value qemu_spice_display_is_running returns is the global spice_display_is_running of ui/spice-core.c $6 = (int *) 0x5650d5b4 That is always 0 up to the point this checks it. A watch on ~/work/qemu/qemu.git/ui/spice

[Bug 1964777] Re: qxl_send_events: spice-server bug: guest stopped, ignoring

2022-03-14 Thread Christian Ehrhardt 
I wanted to start bisecting to identify the offending commit. But what I've found is that even old build e.g. v5.2.0 are broken in this Ubuntu 22.04 test system. In return I checked older Ubuntu systems if I might just have missed the message before. But up until 21.10 with qemu 6.0 it was just fi

[Bug 1964777] Re: qxl_send_events: spice-server bug: guest stopped, ignoring

2022-03-14 Thread Christian Ehrhardt 
Looking at the code that warning is from here: ``` static void qxl_send_events(PCIQXLDevice *d, uint32_t events) { uint32_t old_pending; uint32_t le_events = cpu_to_le32(events); trace_qxl_send_events(d->id, events); if (!qemu_spice_display_is_running(&d->ssd)) { /*