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 756275 - segfault in g_dbus_object_get_interface
segfault in g_dbus_object_get_interface
Status: RESOLVED OBSOLETE
Product: gnome-disk-utility
Classification: Core
Component: libgdu
3.16.x
Other Linux
: Normal critical
: ---
Assigned To: gnome-disk-utility-maint
gnome-disk-utility-maint
: 756703 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2015-10-09 07:23 UTC by Sebastien Bacher
Modified: 2017-11-13 14:42 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Sebastien Bacher 2015-10-09 07:23:34 UTC
Those segfault seem to have started with gdu 3.16

stacktrace

"#0  0xb6aa9e73 in g_dbus_object_get_interface (object=0x0, interface_name=0xb76b07e7 "org.freedesktop.UDisks2.Drive") at /build/glib2.0-Lm6jKr/glib2.0-2.45.7/./gio/gdbusobject.c:149
        iface = <optimized out>
        __func__ = "g_dbus_object_get_interface"
  • #1 udisks_object_peek_drive
    at udisks-generated.c line 31392
  • #2 gdu_window_select_object
    at gduwindow.c line 882
  • #3 create_partition_cb
    at gducreatepartitiondialog.c line 374
  • #4 g_task_return_now
    at /build/glib2.0-Lm6jKr/glib2.0-2.45.7/./gio/gtask.c line 1104
  • #5 g_task_return
    at /build/glib2.0-Lm6jKr/glib2.0-2.45.7/./gio/gtask.c line 1162
  • #6 reply_cb
    at /build/glib2.0-Lm6jKr/glib2.0-2.45.7/./gio/gdbusproxy.c line 2579
  • #7 g_task_return_now
    at /build/glib2.0-Lm6jKr/glib2.0-2.45.7/./gio/gtask.c line 1104
  • #8 g_task_return
    at /build/glib2.0-Lm6jKr/glib2.0-2.45.7/./gio/gtask.c line 1162
  • #9 g_dbus_connection_call_done
    at /build/glib2.0-Lm6jKr/glib2.0-2.45.7/./gio/gdbusconnection.c line 5704
  • #10 g_task_return_now
    at /build/glib2.0-Lm6jKr/glib2.0-2.45.7/./gio/gtask.c line 1104
  • #11 complete_in_idle_cb
    at /build/glib2.0-Lm6jKr/glib2.0-2.45.7/./gio/gtask.c line 1118

Reported on https://bugs.launchpad.net/ubuntu/+source/gnome-disk-utility/+bug/1479710 and https://retrace.fedoraproject.org/faf/reports/bthash/8281bb04e3d96be71f0533b318776dc95cc087b2

The rh bugzilla description state the user was creating an ext4 partition and an usb stick
Comment 1 Sebastien Bacher 2015-10-09 07:27:33 UTC
in fact older versions seem to have similar issues, the stacktrace is just slightly different and didn't match in the same error bucket on the errors.ubuntu.com reports
Comment 2 Sebastien Bacher 2015-10-09 08:19:00 UTC
The issue is quite easy to trigger by formatting an usb key and trying to add a partition directly after that, it segfault like a third of the tries
Comment 3 Michael Catanzaro 2015-10-09 22:55:53 UTC
Thanks for moving this upstream.

This doesn't look like an easy fix. We can return early in create_partition_cb if udisks_client_get_object returns NULL, but it's probably better to crash because the partition is not going to be formatted then. We need to figure out why udisks_client_get_object sometimes returns NULL. There is probably a race, either in udisks or possibly g-d-u itself.
Comment 4 Sebastien Bacher 2015-10-13 09:18:19 UTC
Reported against udisks with some extra debug info
https://bugs.freedesktop.org/show_bug.cgi?id=92446
Comment 5 Michael Catanzaro 2015-10-16 23:46:05 UTC
*** Bug 756703 has been marked as a duplicate of this bug. ***
Comment 6 Kai Lüke 2017-09-04 02:29:42 UTC
The solution is that UDisks needs to ensure that the object is there when returning from udisks_partition_table_call_create_partition. There is a correct waiter now in UDisks and if this ever happens again then the udisks_linux_block_object_trigger_uevent is guilty, it's located at the end of udisks_partition_table_call_create_partition (it might result in the object to disappear shortly - writing a waiter again will be hard because there is nothing which distinguishes the old from the new).
Comment 7 Kai Lüke 2017-09-04 02:40:51 UTC
UDisks 2.7.1 doesn't have the uevent call at the end, so I don't expect this problem to be there. But 2.7.2 adds this uevent and it would be good to know if this still happens.
Comment 8 Paul Wise 2017-09-07 03:38:11 UTC
I just used gnome-disk-utility 3.22.1-1 and udisks2 2.7.2-2 on Debian buster to format a USB stick to FAT format a few times without getting any crashes. IIRC that was the procedure that was causing crashes before.