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 682792 - Boxes should do vm removal async
Boxes should do vm removal async
Status: RESOLVED FIXED
Product: gnome-boxes
Classification: Applications
Component: general
3.5.x (unsupported)
Other Linux
: Normal normal
: --
Assigned To: GNOME Boxes maintainer(s)
GNOME Boxes maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2012-08-27 11:25 UTC by Alexander Larsson
Modified: 2016-03-31 13:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Mark callback function as owned in run_in_thread (1.08 KB, patch)
2012-08-27 13:14 UTC, Alexander Larsson
committed Details | Review
Do vm removal async (2.07 KB, patch)
2012-08-27 13:14 UTC, Alexander Larsson
committed Details | Review

Description Alexander Larsson 2012-08-27 11:25:25 UTC
VM (storage really) removal is a pretty heavy operation ans should be done async.

Here is the backtrace i get when this is slow:
  • #0 poll
    at ../sysdeps/unix/syscall-template.S line 81
  • #1 poll
    at /usr/include/bits/poll2.h line 46
  • #2 virNetClientIOEventLoop
    at rpc/virnetclient.c line 1342
  • #3 virNetClientIO
    at rpc/virnetclient.c line 1605
  • #4 virNetClientSendInternal
    at rpc/virnetclient.c line 1771
  • #5 virNetClientSendWithReply
    at rpc/virnetclient.c line 1799
  • #6 virNetClientProgramCall
    at rpc/virnetclientprogram.c line 330
  • #7 callWithFD
    at remote/remote_driver.c line 4799
  • #8 call
    at remote/remote_driver.c line 4820
  • #9 remoteStorageVolDelete
    at remote/remote_client_bodies.h line 5915
  • #10 virStorageVolDelete
    at libvirt.c line 12875
  • #11 gvir_storage_vol_delete
    at libvirt-gobject-storage-vol.c line 312
  • #12 boxes_libvirt_machine_real_delete
    at libvirt-machine.c line 3181
  • #13 boxes_machine_delete
    at machine.c line 1763

Comment 1 Alexander Larsson 2012-08-27 13:14:35 UTC
Created attachment 222546 [details] [review]
Mark callback function as owned in run_in_thread

Without this vala will not automatically ref/unref any data
(such as locals blocks) during the runtime of the operation.
Comment 2 Alexander Larsson 2012-08-27 13:14:38 UTC
Created attachment 222547 [details] [review]
Do vm removal async

This can be a pretty expensive operation if it deletes files
and all the calls are sync, so we do them in a thread.
Comment 3 Alexander Larsson 2012-08-27 14:31:26 UTC
Attachment 222546 [details] pushed as d3c7a34 - Mark callback function as owned in run_in_thread
Attachment 222547 [details] pushed as 6c9995d - Do vm removal async
Comment 4 Marc-Andre Lureau 2012-09-07 23:48:59 UTC
(In reply to comment #1)
> Created an attachment (id=222546) [details] [review]
> Mark callback function as owned in run_in_thread
> 
> Without this vala will not automatically ref/unref any data
> (such as locals blocks) during the runtime of the operation.

that patch causes very annoying leaks, ultimately leading to libvirtd running out of fds:
https://bugzilla.gnome.org/show_bug.cgi?id=683600