gparted didn't exit cleanly, no automount anymore

Bug #134712 reported by Kjell Braden
66
Affects Status Importance Assigned to Milestone
GParted
Fix Released
Medium
gparted (Debian)
Fix Released
Unknown
gparted (Ubuntu)
Fix Released
High
Martin Pitt
hal (Ubuntu)
Fix Released
High
Martin Pitt

Bug Description

Binary package hint: gparted

GParted currently writes a hal policy file ("/usr/share/hal/fdi/policy/gparted-disable-automount.fdi") when started, which prevents mobile disks from being mounted while GParted is running. When GParted doesn't exit cleanly, this file isn't removed, stopping the system from automounting any device.

Maybe we should add a wrapper script which would start GParted and remove the file when it is shut down (in any way)?

Related branches

Revision history for this message
Alexander Jones (alex-weej) wrote :

I'm surprised this works at all... FDI data is supposed to be static, right?

I think GParted should be inhibiting automounting via G-V-M interface, not via HAL interface.

Revision history for this message
Henrik Nilsen Omma (henrik) wrote :

Setting priority and milestone.

Changed in gparted:
importance: Undecided → High
Revision history for this message
Martin Pitt (pitti) wrote :

Note that this FDI hackery is not necessary at all any more, since hal now doesn't mount fixed drives automatically any more.

Revision history for this message
Alberto Milone (albertomilone) wrote :

removing /usr/share/hal/fdi/policy/gparted-disable-automount.fdi and restart hald solved the problem for me on Ubuntu Gutsy. I hope this is fixed soon.

Revision history for this message
Matti Lindell (mlind) wrote :

if it's okay to remove the fdi stuff gparted, here's a debdiff for it

Changed in gparted:
status: New → Confirmed
Changed in gparted:
status: Unknown → New
Changed in gparted:
status: Unknown → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote :

Taking.

Changed in gparted:
assignee: nobody → pitti
status: Confirmed → In Progress
Revision history for this message
Martin Pitt (pitti) wrote :

Hm, I am not sure I agree with this patch. See the discussion on the gnome bug. Initially I thought it would disable automounting for fixed drives, but it only does so for removable drives, and rightly so. It is unfortunate that hal does not provide a better solution to this common problem.

So, for one gparted should set storage.automount_enabled_hint to False, not volume.ignore to True.

A slightly better workaround for a crashing gparted (which would leave the file behind) is to remove the file in the hal init script, so that a reboot will fix it. WDYT?

Revision history for this message
Matti Lindell (mlind) wrote :

I guess it's better resolution than trying to write some sort of hacky crash handler/wrapper for gparted. Although making hal aware of gparted's mistakes is bit sad, but this needs to get fixed somehow.

Revision history for this message
Martin Pitt (pitti) wrote :

I agree that it is a hack, but it is a safe one for Gutsy. In the long run, hal needs to provide an interface to globally and temporarily disable automounting. We need that not only for gparted, but also for ubiquity, and probably a couple of other places which now just hack around the problem by killing g-v-m, etc.

Changed in hal:
assignee: nobody → pitti
importance: Undecided → High
status: New → In Progress
Revision history for this message
Martin Pitt (pitti) wrote :

For gparted, we should change the FDI to use automount_enabled_hint, and also install a signal handler which removes the file on program termination.

Revision history for this message
Martin Pitt (pitti) wrote :

gparted (0.3.3-2ubuntu6) gutsy; urgency=low

  * Add debian/patches/02_fdi_robustification.patch:
    - Install a signal handler for cleaning up the automount disabling FDI, so
      that it will be cleaned up on program crashes, too.
    - Use storage.automount_enabled_hint instead of volume.ignore for the
      automount disabling FDI. That way, the new drives will at least appear
      in Gnome and the user can mount them manually.
    - LP: #134712

 -- Martin Pitt <email address hidden> Mon, 01 Oct 2007 08:34:21 +0200

Changed in gparted:
status: In Progress → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote :

hal (0.5.9.1-6ubuntu1) gutsy; urgency=low

  * Merge recent fixes from Debian. Revert the libsmbios-dev build dep
    addition for Gutsy, since it is in universe.
  * debian/hal.init: Remove stray gparted-disable-automount.fdi on startup.
    (LP: #134712)

hal (0.5.9.1-6) unstable; urgency=low

  * debian/hal.init:
    + Don't start hal if sysfs is not mounted on /sys or a chrooted session
      is detected.

hal (0.5.9.1-5) unstable; urgency=low

  [ Sjoerd Simons ]
  * debian/patches/75-hal-serial-null.patch: Fix crash when linux.device_file
    of a serial device isn't known (Closes: #439919, #440468)

hal (0.5.9.1-4) unstable; urgency=low

  * debian/rules
    - Do not explicitely enable the dell-backlight support as libsmbios-dev is
      only available on amd64/i386. The ./configure script will automatically
      enable the feature for platforms where libsmbios-dev is installed.
      (Closes: #438459)

hal (0.5.9.1-3) unstable; urgency=low

  * Check for inotify support in the init script and fail gracefully with a
    proper error message. (Closes: #426049, #434615)
  * Check if dbus is running in the init script and fail gracefully with a
    proper error message. (Closes: #426420, #427332)
  * debian/hal-device-manager.desktop
    - Remove invalid category "Application" from the Categories field.

hal (0.5.9.1-2) unstable; urgency=low

  [ Sjoerd Simons ]
  * debian/control
    + Add libsmbios-dev build-depend on amd64 and i386 to build the dell
      backlight addon (Closes: #429871)
  * debian/patches/70-libhal-changeset-memleak.patch
    + Added. Fixes a memleak when freeing hal changesets. (Closes: #429823)

  [ Michael Biebl ]
  * debian/hal.preinst
    - Do not parse /var/lib/dpkg/status directly but use dpkg-query instead.

 -- Martin Pitt <email address hidden> Mon, 01 Oct 2007 09:25:50 +0200

Changed in hal:
status: In Progress → Fix Released
Changed in gparted:
status: New → Fix Released
Revision history for this message
Suchawato (anavi) wrote :

Any idea when we can expect a fix to this issue?
There are a LOT of people lining up in the forums with this problem.
This should out the door as soon as possible.

Revision history for this message
Matti Lindell (mlind) wrote :

Suchawato, this issue is already fixed in Gutsy.

Changed in gparted:
status: Fix Released → Confirmed
Changed in gparted:
status: Confirmed → Fix Released
Changed in gparted:
status: Fix Released → Confirmed
Changed in gparted:
status: Confirmed → Fix Released
Changed in gparted:
importance: Unknown → Medium
Revision history for this message
Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:
http://iso.qa.ubuntu.com/qatracker/reports/bugs/134712

tags: added: iso-testing
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.