After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 678025 - Starting saved machine takes long and freezes app
Starting saved machine takes long and freezes app
Status: RESOLVED FIXED
Product: gnome-boxes
Classification: Applications
Component: general
unspecified
Other Linux
: Normal normal
: --
Assigned To: GNOME Boxes maintainer(s)
GNOME Boxes maintainer(s)
Depends on: 680851
Blocks:
 
 
Reported: 2012-06-13 14:52 UTC by Marc-Andre Lureau
Modified: 2016-03-31 13:58 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Marc-Andre Lureau 2012-06-13 14:52:40 UTC
in LibvirtMachine.connect_display()

calling domain.resume() is blocking and may take several seconds or minutes.

There is no UI indication, and the app is frozen during that time.
Comment 1 Marc-Andre Lureau 2012-06-13 16:23:52 UTC
actually domain.resume() seems pretty fast in all cases, it's domain.save() that is slow when the VM has been saved (ManagedSaved) and restarted
Comment 2 Zeeshan Ali 2012-06-13 22:09:34 UTC
(In reply to comment #1)
> actually domain.resume() seems pretty fast in all cases, it's domain.save()
> that is slow when the VM has been saved (ManagedSaved) and restarted

Perhaps we should wait for domain.save() to finish before quiting the UI and show some activity (spinner?) and message "Saving box 'Fedora 17'.."?
Comment 3 Marc-Andre Lureau 2012-06-13 22:44:42 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > actually domain.resume() seems pretty fast in all cases, it's domain.save()
> > that is slow when the VM has been saved (ManagedSaved) and restarted
> 
> Perhaps we should wait for domain.save() to finish before quiting the UI and
> show some activity (spinner?) and message "Saving box 'Fedora 17'.."?

I didn't explain correctly.

As the bug title suggest, what I am concerned in this bug is the freeze when starting a VM that was previously "saved".

I just sent domain_start_async() patch for libvirt-glib, and I have a patch ready for gnome-boxes to do display connection async/cancellable using it.

Since domain.save() happen in background when closing app, I guess we don't need to worry about it now
Comment 4 Zeeshan Ali 2012-06-13 22:50:37 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > (In reply to comment #1)
> > > actually domain.resume() seems pretty fast in all cases, it's domain.save()
> > > that is slow when the VM has been saved (ManagedSaved) and restarted
> > 
> > Perhaps we should wait for domain.save() to finish before quiting the UI and
> > show some activity (spinner?) and message "Saving box 'Fedora 17'.."?
> 
> I didn't explain correctly.
> 
> As the bug title suggest, what I am concerned in this bug is the freeze when
> starting a VM that was previously "saved".

You mean the 'save' operation was already done and loading from saved state is taking too long?
 
> I just sent domain_start_async() patch for libvirt-glib, and I have a patch
> ready for gnome-boxes to do display connection async/cancellable using it.

Cool.
 
> Since domain.save() happen in background when closing app, I guess we don't
> need to worry about it now

Yeah, with your approach we'll tackle not only the case of 'restore from saved state taking too long' but also 'saving operation not yet finished before boxes was launched again'.
Comment 5 Alexander Larsson 2012-06-21 18:38:27 UTC
Where are the patches for this?
Comment 6 Marc-Andre Lureau 2012-06-22 08:37:39 UTC
libvirt-glib https://www.redhat.com/archives/libvir-list/2012-June/msg00899.html
Comment 7 Marc-Andre Lureau 2012-09-07 16:51:06 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.