#2545 HIGH Trial-2: datastore fails to unmount a volume when the volume has already been removed

Zarro Boogs per Child bugtracker at laptop.org
Fri Jul 27 12:33:17 EDT 2007


#2545: datastore fails to unmount a volume when the volume has already been
removed
-----------------------+----------------------------------------------------
 Reporter:  tomeu      |       Owner:  bcsaller
     Type:  defect     |      Status:  new     
 Priority:  high       |   Milestone:  Trial-2 
Component:  datastore  |     Version:          
 Keywords:             |    Verified:  0       
-----------------------+----------------------------------------------------
 Sometimes, the user will remove the usb stick before unmounting from the
 system. In this cases, we need to cleanup the data related with that
 device.

 The datastore currently fails to unmount a device if it has already been
 removed:
 {{{
 1185566361.3227 DEBUG - root: VolumesToolbar._unmount_from_datastore:
 dbus.String(u'/org/freedesktop/Hal/devices/volume_label_LEXAR')
 45      1185566361.4560 ERROR - dbus.connection: Exception in handler for
 D-Bus signal:
 46      Traceback (most recent call last):
 47        File "/usr/lib/python2.5/site-packages/dbus/connection.py", line
 210, in maybe_handle_message
 48          self._handler(*args, **kwargs)
 49        File "/usr/share/activities/Journal.activity/volumestoolbar.py",
 line 231, in _hal_device_removed_cb
 50          self._unmount_from_datastore(udi)
 51        File "/usr/share/activities/Journal.activity/volumestoolbar.py",
 line 245, in _unmount_from_datastore
 52          datastore.unmount(mount_id)
 53        File "/usr/lib/python2.5/site-
 packages/sugar/datastore/datastore.py", line 230, in unmount
 54          dbus_helpers.unmount(mount_point_id)
 55        File "/usr/lib/python2.5/site-
 packages/sugar/datastore/dbus_helpers.py", line 74, in unmount
 56          _data_store.unmount(mount_point_id)
 57        File "/usr/lib/python2.5/site-packages/dbus/proxies.py", line
 136, in __call__
 58          **keywords)
 59        File "/usr/lib/python2.5/site-packages/dbus/connection.py", line
 603, in call_blocking
 60          message, timeout)
 61      DBusException: org.freedesktop.DBus.Python.xapian.DatabaseError:
 Traceback (most recent call last):
 62        File "/usr/lib/python2.5/site-packages/dbus/service.py", line
 664, in _message_cb
 63          retval = candidate_method(self, *args, **keywords)
 64        File "/usr/lib/python2.5/site-
 packages/olpc/datastore/datastore.py", line 106, in unmount
 65          self.mountpoints[mountpoint_id].stop()
 66        File "/usr/lib/python2.5/site-
 packages/olpc/datastore/backingstore.py", line 541, in stop
 67          self.indexmanager.stop()
 68        File "/usr/lib/python2.5/site-
 packages/olpc/datastore/xapianindex.py", line 107, in stop
 69          self.write_index.close()
 70        File "/usr/lib/python2.5/site-
 packages/secore/indexerconnection.py", line 271, in close
 71          self.flush()
 72        File "/usr/lib/python2.5/site-
 packages/secore/indexerconnection.py", line 250, in flush
 73          self._index.flush()
 74      DatabaseError: Error writing to file (Input/output error)
 }}}

 When the datastore is requested to unmount a volume, it should clean up
 all the state associated to that mount point and _try_ to flush the data
 to the device.

 It shouldn't fail to unmount the device because it is not in the system
 anymore.

-- 
Ticket URL: <https://dev.laptop.org/ticket/2545>
One Laptop Per Child <http://laptop.org/>



More information about the Bugs mailing list