virt-manager freezes the whole desktop for 3 seconds when starting/stopping a VM

Bug #1854396 reported by Mathieu Tarral
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
virt-manager
Won't Fix
High
virt-manager (Ubuntu)
Fix Released
Undecided
Unassigned
Focal
Incomplete
Undecided
Unassigned
Groovy
Won't Fix
Undecided
Unassigned

Bug Description

Hi,

When I start or shutdown a VM via virt-manager, it has the side effect of freeze the Gnome-Shell desktop for 3 seconds.

I can move the mouse, but I can't click on anything to get the focus, or drag'n drop a window.
(look at the desktop record in the attachments)

I have noticed the following line in my journactl when the freeze happens:

nov. 28 21:07:38 xxxx gnome-shell[3133]: [AppIndicatorSupport-WARN] Attempting to re-register :1.138/org/ayatana/NotificationItem/virt_manager; resetting instead
nov. 28 21:07:38 xxxx gnome-shell[3133]: [AppIndicatorSupport-WARN] Item :1.138/org/ayatana/NotificationItem/virt_manager is already registered
nov. 28 21:07:38 xxxx gnome-shell[3133]: [AppIndicatorSupport-WARN] Attempting to re-register :1.138/org/ayatana/NotificationItem/virt_manager; resetting instead
nov. 28 21:07:38 xxxx gnome-shell[3133]: [AppIndicatorSupport-WARN] Item :1.138/org/ayatana/NotificationItem/virt_manager is already registered
nov. 28 21:07:43 xxxx gnome-shell[3133]: [AppIndicatorSupport-WARN] Attempting to re-register :1.138/org/ayatana/NotificationItem/virt_manager; resetting instead
nov. 28 21:07:43 xxxx gnome-shell[3133]: [AppIndicatorSupport-WARN] Item :1.138/org/ayatana/NotificationItem/virt_manager is already registered

This is really annoying as I'm starting/stopping VMs frequently in my workflow.
Please provide a fix or a workaround.

Thanks.

ProblemType: Bug
DistroRelease: Ubuntu 19.10
Package: virt-manager 1:2.2.1-0ubuntu2
ProcVersionSignature: Ubuntu 5.3.0-23.25-generic 5.3.7
Uname: Linux 5.3.0-23-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.20.11-0ubuntu8.2
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Thu Nov 28 21:05:02 2019
InstallationDate: Installed on 2019-09-26 (63 days ago)
InstallationMedia: Ubuntu 19.04 "Disco Dingo" - Release amd64 (20190416)
PackageArchitecture: all
SourcePackage: virt-manager
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Mathieu Tarral (mathieu-tarral) wrote :
Revision history for this message
Mathieu Tarral (mathieu-tarral) wrote :

I've just found a workaround: disable the systray icon.

virt-manager's integration with Gnome-Shell systray is the root cause of this issue.

Revision history for this message
Christian Ehrhardt (paelzer) wrote :

That is interesting Mathieu,

2.2.1 is the latest official release and I found no existing fixes since then to try
  $ git log HEAD...v2.2.1 -- virtManager/systray.py

Therefore I'd ask you to report the bug upstream [1] and ping back here with the link to the one you created. That way we can track it and integrate whatever fix they come up.

Furthermore it will be interesting if you have had any customizations to the Desktop - e.g. X11 or Wayland or other non-default plugins to Gnome?

[1]: https://virt-manager.org/bugs/

Revision history for this message
Mathieu Tarral (mathieu-tarral) wrote :

Hi Chritian,

thanks for the feedback

I can report bugs on Ubuntu, but I would like to avoid being involved into other bugtackers, as it is time consuming.

Also, you have more authority and credibility than me to report the bug, so it will be taken seriously from the start.

Thanks

Revision history for this message
Christian Ehrhardt (paelzer) wrote :

@Mathieu
While I might be known upstream I can't recreate the issue myself in a Eoan VM with Ubuntu Desktop (to admit a rather quick try, but no stalls on that).
I can (and usually do) report issues that are clear or affect myself, as then I can answer any further questions to the setup used and/or test the suggestions. But in this case since it doesn't reproduce for me I can't.
And reporting bugs upstream which I can only shrug at any question that comes back will quickly ruin my credibility there :-)

@Andreas (now subscribed) IIRC you sometimes use virt-manager and are on Eoan/Focal right?
I know you faced slowness due to ZFS backing, but did you see anything in regard to the systray icon on your system?

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

I don't have the systray icon enabled. I just enabled it and will see how it goes.

Revision history for this message
In , mathieu.tarral (mathieu.tarral-redhat-bugs) wrote :

Description of problem:

If I enable the virt-manager systray icon in Ubuntu 19.10 with Gnome-Shell,
each time I'm starting or shutting down a VM, the desktop will freeze for 2/3 seconds.

Version-Release number of selected component (if applicable):
2.2.1-0ubuntu2

How reproducible:
always

Steps to Reproduce:
1. install ubuntu 19.10
2. start virt-manager
3. enable systray icon
4. start/stop a VM

Actual results:
The Gnome-Shell desktop is freezing

Expected results:
The Gnome-Shell desktop should have not been impacted

Additional info:

I can see the following lines on my journalctl:

nov. 28 21:07:38 xxxx gnome-shell[3133]: [AppIndicatorSupport-WARN] Attempting to re-register :1.138/org/ayatana/NotificationItem/virt_manager; resetting instead

The bug has originally been reported on launchpad:
https://bugs.launchpad.net/ubuntu/+source/virt-manager/+bug/1854396

You can view the video showcasing the issue there.

Thanks.

Revision history for this message
Mathieu Tarral (mathieu-tarral) wrote :

@Christian
I reported the bug upstream :-)
https://bugzilla.redhat.com/show_bug.cgi?id=1779362

Revision history for this message
Christian Ehrhardt (paelzer) wrote :

Thank you Mathieu!
I added it here for some automated tracking and subscribed myself to the bug there.

Changed in virt-manager:
importance: Unknown → High
status: Unknown → Confirmed
Revision history for this message
In , crobinso (crobinso-redhat-bugs) wrote :

Thanks for the report. I think this may fix it:

commit 4348d4b1282bac3cd58d2271844b679ad46ed8ae
Author: Cole Robinson <email address hidden>
Date: Thu Aug 20 16:19:26 2020 -0400

    systray: Don't rebuild the menu on every change

Previously we were rebuilding the whole menu on any VM/connection state change which with kstatusnotifier sends a lot of events over dbus. After this it updates as little as possible

Changed in virt-manager:
status: Confirmed → Won't Fix
Revision history for this message
Christian Ehrhardt (paelzer) wrote :

FYI: This is in v3.0 and I'm working on v3.1 for Ubuntu 21.04

Changed in virt-manager (Ubuntu):
status: New → In Progress
Revision history for this message
Christian Ehrhardt (paelzer) wrote :

Migrated to release
=> https://launchpad.net/ubuntu/+source/virt-manager/1:3.1.0-1

Thereby setting this to fixed in coming Ubuntu 21.04

Revision history for this message
Christian Ehrhardt (paelzer) wrote :

The patch does not cleanly, but almost apply to recent versions.
IMHO an SRU to Focal&Groovy would be useful if it works out well.

I've provided test builds in [1] and wanted to ask if you could test those for your case please?

[1]: https://launchpad.net/~ci-train-ppa-service/+archive/ubuntu/4341

Revision history for this message
Mathieu Tarral (mathieu-tarral) wrote :

Hi Christian,

Thank you for looking into this issue and providing a fix.

sorry but I won't have time to test if a build fixes the problem

Thanks.

Revision history for this message
Christian Ehrhardt (paelzer) wrote :

Ok, then this is fixed in Ubuntu 21.04 (done) and will need someone to pick up verification of the PPA to get going on the SRUs for 20.04 and 20.10.

It never really "hurt" me so far (was never like the reported 3 seconds for me), therefore alone I can't make a good case convincing the SRU team that the change is worth it in regard to the SRU policy [1].

If anyone else affected considers it really painful and important please give the PPAs in comment #13 a try and let me know.

[1]: https://wiki.ubuntu.com/StableReleaseUpdates

Changed in virt-manager (Ubuntu):
status: In Progress → Fix Released
Changed in virt-manager (Ubuntu Focal):
status: New → Incomplete
Changed in virt-manager (Ubuntu Groovy):
status: New → Incomplete
Revision history for this message
Christian Ehrhardt (paelzer) wrote :
Revision history for this message
Brian Murray (brian-murray) wrote :

The Groovy Gorilla has reached end of life, so this bug will not be fixed for that release

Changed in virt-manager (Ubuntu Groovy):
status: Incomplete → Won't Fix
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.