exo-eject crashes trying to eject a strangely stuck HAL device

Bug #264439 reported by Remove Me
8
Affects Status Importance Assigned to Milestone
thunar (Ubuntu)
Fix Released
Medium
Lionel Le Folgoc

Bug Description

Sadly, I have no idea exactly how I managed to get such a state of HAL database.
When I try to click on the icon on my desktop which represents the wretched thing
(a Canon camera formatted CF card), exo-eject just crashes in main:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f32c36fc7a0 (LWP 11140)]
0x00000000004033f5 in main (argc=1, argv=0x7fffcb72aa48) at main.c:338
338 main.c: No such file or directory.
 in main.c
(gdb) bt
#0 0x00000000004033f5 in main (argc=1, argv=0x7fffcb72aa48) at main.c:338
(gdb) dir ~/compile/libexo/exo-0.3.4/exo-mount
Source directories searched: /home/raa/compile/libexo/exo-0.3.4/exo-mount:$cdir:$cwd
(gdb) l
333 else
334 message = g_strdup_printf (_("Failed to mount \"%s\""), name);
335
336 /* popup an error message dialog */
337 dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, "%s.", message);
338 gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog), "%s.", err->message);
339 gtk_dialog_run (GTK_DIALOG (dialog));
340 gtk_widget_destroy (dialog);
341 g_free (message);
342 }
(gdb) p err
$1 = (GError *) 0x0
(gdb) quit

The hal-device output for the UDI:

$ hal-device
0: udi = '/org/freedesktop/Hal/devices/volume_uuid_220D_41BE'
  block.device = '/dev/sdc1' (string)
  info.capabilities = { 'volume', 'block' } (string list)
  volume.partition.media_size = 260047360 (0xf800200) (uint64)
  volume.partition.scheme = 'mbr' (string)
  block.major = 8 (0x8) (int)
  volume.partition.type = '0x06' (string)
  block.minor = 33 (0x21) (int)
  volume.partition.label = '' (string)
  block.is_volume = true (bool)
  volume.partition.uuid = '' (string)
  linux.hotplug_type = 3 (0x3) (int)
  volume.partition.flags = { } (string list)
  info.product = 'CANON_DC' (string)
  volume.ignore = false (bool)
  info.udi = '/org/freedesktop/Hal/devices/volume_uuid_220D_41BE' (string)
  org.freedesktop.Hal.Device.Volume.method_names = { 'Mount', 'Unmount', 'Eject' } (string list)
  org.freedesktop.Hal.Device.Volume.method_signatures = { 'ssas', 'as', 'as' } (string list)
  storage.model = '' (string)
  org.freedesktop.Hal.Device.Volume.method_argnames = { 'mount_point fstype extra_options', 'extra_options', 'extra_options' } (string list)
  org.freedesktop.Hal.Device.Volume.method_execpaths = { 'hal-storage-mount', 'hal-storage-unmount', 'hal-storage-eject' } (string list)
  info.interfaces = { 'org.freedesktop.Hal.Device.Volume' } (string list)
  volume.mount.valid_options = { 'ro', 'sync', 'dirsync', 'noatime', 'nodiratime', 'noexec', 'quiet', 'remount', 'exec', 'utf8', 'shortname=', 'codepage=', 'iocharset=', 'umask=', 'dmask=', 'fmask=', 'uid=', 'flush' } (string list)
  volume.unmount.valid_options = { 'lazy' } (string list)
  block.storage_device = '/org/freedesktop/Hal/devices/storage_serial_Generic_USB_Storage_CFC_20020723160609130_0_1' (string)
  volume.fstype = 'vfat' (string)
  volume.fsusage = 'filesystem' (string)
  volume.fsversion = 'FAT16' (string)
  volume.uuid = '220D-41BE' (string)
  volume.label = 'CANON_DC' (string)
  volume.mount_point = '' (string)
  volume.is_mounted = false (bool)
  linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1d.0/usb5/5-2/5-2:1.0/host5/target5:0:0/5:0:0:1/block/sdc/sdc1' (string)
  volume.is_mounted_read_only = false (bool)
  info.parent = '/org/freedesktop/Hal/devices/storage_serial_Generic_USB_Storage_CFC_20020723160609130_0_1' (string)
  volume.linux.is_device_mapper = false (bool)
  volume.is_disc = false (bool)
  volume.is_partition = true (bool)
  volume.partition.number = 1 (0x1) (int)
  volume.block_size = 512 (0x200) (int)
  volume.num_blocks = 507360 (0x7bde0) (int)
  volume.size = 259768320 (0xf7bc000) (uint64)
  info.category = 'volume' (string)
  volume.partition.start = 16384 (0x4000) (uint64)

Tags: patch xubuntu
Revision history for this message
Remove Me (remove-me) wrote :

I managed to work the problem around with the attached patch,
but someone should look into the issue deeper (why is the UDI
listed, for instance? The device is long gone!)

But the patch should be applied anyway: it is no good to try to
report an error which is not described properly (the GError *err
is never set when that err0 branch is taken. Not to mention
suspicious use of goto here: _inside_ a conditional _past_ exactly
that err != NULL check?!)

Revision history for this message
Martin Kaufmann (martin.kaufmann) wrote :

Hi,

i create a debdiff which includes your Patch

Revision history for this message
Charlie Kravetz (cjkgeek) wrote :

Thanks for reporting this bug and any supporting documentation. Since this bug has enough information provided for a developer to begin work, I'm going to mark it as confirmed and let them handle it from here.

Thanks for including the patch! It makes it easier to get this fixed.

Changed in exo:
status: New → Confirmed
Revision history for this message
Charlie Kravetz (cjkgeek) wrote :

Set to triaged; importance Medium; tags added "xubuntu" and "patch"

Changed in exo:
importance: Undecided → Medium
status: Confirmed → Triaged
Revision history for this message
Lionel Le Folgoc (mrpouit) wrote :

In natty, the mount/eject code has been dropped from exo 0.5.5, and is now handled directly by the "new" thunar (it will be uploaded after the alpha1 is released) and gio/gvfs. Reaffecting.

affects: exo (Ubuntu) → thunar (Ubuntu)
Revision history for this message
Lionel Le Folgoc (mrpouit) wrote :

Exo-eject has been dropped in natty.

Changed in thunar (Ubuntu):
assignee: nobody → Lionel Le Folgoc (mrpouit)
status: Triaged → Fix Released
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.