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 676216 - [gnome-boxes] SIGSEGV gvir_connection_find_storage_pool_by_name
[gnome-boxes] SIGSEGV gvir_connection_find_storage_pool_by_name
Status: RESOLVED FIXED
Product: gnome-boxes
Classification: Applications
Component: installer
3.4.x (unsupported)
Other Linux
: Normal major
: --
Assigned To: GNOME Boxes maintainer(s)
GNOME Boxes maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2012-05-17 09:20 UTC by Martin Holec
Modified: 2016-03-31 13:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Boxes backtrace (18.40 KB, text/plain)
2012-05-17 09:23 UTC, Martin Holec
  Details
Wait for libvirt setup before creating VMs (1.65 KB, patch)
2012-05-21 16:37 UTC, Zeeshan Ali
committed Details | Review

Description Martin Holec 2012-05-17 09:20:47 UTC
Description of problem:
Program received signal SIGSEGV, Segmentation fault.
gvir_connection_find_storage_pool_by_name (conn=0x0, 
    name=name@entry=0x45885f "gnome-boxes")
    at libvirt-gobject-connection.c:1155
1155	    GVirConnectionPrivate *priv = conn->priv;

Version-Release number of selected component (if applicable):
gnome-boxes-3.4.2-1.fc17.x86_64

How reproducible:
always

Steps to Reproduce:
1. Create new box in Gnome Boxes.

Actual results:
Gnome Boxes crash

Expected results:
New box is created and booted.

Backtrace:

(gnome-boxes:13152): Clutter-WARNING **: No listener with the specified listener id 32

(gnome-boxes:13152): GLib-CRITICAL **: g_hash_table_remove_internal: assertion `hash_table != NULL' failed

(gnome-boxes:13152): Clutter-WARNING **: Not able to remove listener with id 1

(gnome-boxes:13152): GLib-CRITICAL **: g_hash_table_size: assertion `hash_table != NULL' failed

(gnome-boxes:13152): Clutter-WARNING **: The actor 'ClutterBox' is currently inside an allocation cycle; calling clutter_actor_queue_relayout() is not recommended

Program received signal SIGSEGV, Segmentation fault.
gvir_connection_find_storage_pool_by_name (conn=0x0, 
    name=name@entry=0x45885f "gnome-boxes")
    at libvirt-gobject-connection.c:1155
1155	    GVirConnectionPrivate *priv = conn->priv;
Missing separate debuginfos, use: debuginfo-install spice-glib-0.12-2.fc17.x86_64 spice-gtk3-0.12-2.fc17.x86_64
(gdb) thread apply all bt full

Thread 1 (Thread 0x7ffff7faba00 (LWP 13152))

  • #0 gvir_connection_find_storage_pool_by_name
    at libvirt-gobject-connection.c line 1155
  • #1 boxes_vm_creator_get_storage_pool_co
    at vm-creator.c line 1901
  • #2 boxes_vm_creator_get_storage_pool
    at vm-creator.c line 1858
  • #3 boxes_vm_creator_create_domain_name_from_media_co
    at vm-creator.c line 1613
  • #4 boxes_vm_creator_create_and_launch_vm_co
    at vm-creator.c line 1127
  • #5 g_simple_async_result_complete
    at gsimpleasyncresult.c line 767
  • #6 complete_in_idle_cb
    at gsimpleasyncresult.c line 779
  • #7 g_main_dispatch
    at gmain.c line 2515
  • #8 g_main_context_dispatch
    at gmain.c line 3052
  • #9 g_main_context_iterate
  • #10 g_main_context_iteration
    at gmain.c line 3184
  • #11 g_application_run
    at gapplication.c line 1496
  • #12 boxes_app_run
    at app.c line 1189
  • #13 _vala_main
    at main.c line 675
  • #14 __libc_start_main
    at libc-start.c line 226
  • #15 _start

Comment 1 Martin Holec 2012-05-17 09:23:16 UTC
Created attachment 214239 [details]
Boxes backtrace
Comment 2 Christophe Fergeau 2012-05-17 09:45:13 UTC
Thread 7 seems to be an async helper connecting to libvirt and which is not done yet (ie connection takes time), maybe from App::setup_libvirt.
However, thread 1 (the main thread) seems to have moved on without waiting for the connection to be established, and we end up trying to use a connection while we haven't put anything yet in App::connections (this would explain the hash table warnings btw)
Comment 3 Martin Holec 2012-05-17 12:10:53 UTC
Error occured after overnight suspend.
"killall libvirtd" didn't helped, reboot worked.
Comment 4 Zeeshan Ali 2012-05-18 16:32:32 UTC
I think the main cause is a libvirtd hang that occurs sometimes after a suspend. I already got a backtrace for it but Daniel says thats not very useful and he is willing to debug it so if you could reproduce it somehow, contact danpb on IRC immediately and ask him what information he needs you to collect. I'll do the same when/if I reproduce it.
Comment 5 Christophe Fergeau 2012-05-18 17:10:23 UTC
This may occur because libvirtd is hung, but it still looks like gnome-boxes code is racy and this needs to be fixed.
Comment 6 Sergio Villar 2012-05-21 11:47:22 UTC
I can confirm I'm getting the same whenever I try to setup a box in Debian's gnome-boxes 3.4.1
Comment 7 Zeeshan Ali 2012-05-21 16:37:16 UTC
Created attachment 214569 [details] [review]
Wait for libvirt setup before creating VMs

There is a possibility that we attempt to create VM before the async
operation of creating libvirt connections is complete. When that
happens, we end up making calls to null connection.
Comment 8 Marc-Andre Lureau 2012-05-21 17:09:11 UTC
Review of attachment 214569 [details] [review]:

we use to not start the UI until the default connection is established. I wonder if we should try to bring that back instead. Otherwise, I am affraid we may want to delay things here and there..
Comment 9 Zeeshan Ali 2012-05-23 14:55:11 UTC
(In reply to comment #8)
> Review of attachment 214569 [details] [review]:
> 
> we use to not start the UI until the default connection is established. I
> wonder if we should try to bring that back instead. Otherwise, I am affraid we
> may want to delay things here and there..

Maybe but I recall there was a reason we changed this. This is one place we need to wait for connection for now so I'd say we should worry when we need to do this again in another part of the code.
Comment 10 Zeeshan Ali 2012-05-23 14:56:11 UTC
*** Bug 676340 has been marked as a duplicate of this bug. ***
Comment 11 Zeeshan Ali 2012-05-25 14:30:14 UTC
So whats the verdict?
Comment 12 Zeeshan Ali 2012-06-06 02:00:35 UTC
Attachment 214569 [details] pushed as b3547ed - Wait for libvirt setup before creating VMs