Opened 7 years ago

Closed 6 years ago

#3180 closed defect (fixed)

DataStore should remake a corrupted index instead of raising an exception

Reported by: erikb Owned by: tomeu
Priority: high Milestone: 8.2.0 (was Update.2)
Component: sugar-datastore Version:
Keywords: Cc: olpc-dev@…, tomeu
Blocked By: Blocking:
Deployments affected: Action Needed:
Verified: no

Description

If you insert a USB stick formatted with FAT16, it is mounted and readable by the XO.

However, when you open the Journal activity, and then click on an entry in the journal, the screen turns grey and the Journal hangs.

Workaround is to restart Sugar.

I would attach the log file, but since that functionality is not working now on trac, I will post it here instead:

1189012823.5333 WARNING - sugar.presence.presenceservice: Unable to retrieve activity handle for dbus.String(u'bf82b9e060cc7301c2a2c761da64df5f06a723dc') from presence service: org.laptop.Sugar.Presence.NotFound: Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/dbus/service.py", line 664, in _message_cb
    retval = candidate_method(self, *args, **keywords)
  File "/usr/share/sugar-presence-service/presenceservice.py", line 600, in GetActivityById
    raise NotFoundError("The activity was not found.")
NotFoundError: org.laptop.Sugar.Presence.NotFound: The activity was not found.
1189012823.5368 DEBUG - root: *** Act bf82b9e060cc7301c2a2c761da64df5f06a723dc, mesh instance None, scope private
1189012823.5388 DEBUG - root: Starting the journal activity
1189012825.5507 DEBUG - root: ListView.update_with_query
1189012825.8212 DEBUG - root: do_size_allocate: 11
1189012825.8256 DEBUG - root: _vadjustment_changed_cb:
 	0.0
 	11.0
 	11.0
 	1.0
 	0.0
1189012825.8288 DEBUG - root: dbus_helpers.find: {'mountpoints': [dbus.String(u'f8136f10-29f4-4b2c-b46c-03f634d60ce2', variant_level=1)], 'order_by': ['-mtime'], 'limit': 30}
1189012826.0742 DEBUG - root: _vadjustment_value_changed_cb value: 0
1189012826.0763 DEBUG - root: cache hit and no need to grow the cache
1189012826.0800 DEBUG - root: _vadjustment_changed_cb:
 	0.0
 	11.0
 	11.0
 	1.0
 	9.0
1189012826.3996 DEBUG - root: _vadjustment_value_changed_cb 0.32539916038513184
1189012827.1159 DEBUG - root: VolumeToolbar._add_hal_device: dbus.String(u'/org/freedesktop/Hal/devices/volume_uuid_73B9_140A')
1189012827.1683 DEBUG - root: VolumeToolbar._mount_in_datastore: dbus.String(u'/org/freedesktop/Hal/devices/volume_uuid_73B9_140A')
1189012827.3121 STDERR - Traceback (most recent call last):
  File "/usr/share/activities/Journal.activity/volumestoolbar.py", line 45, in _set_up_volumes
    volumes_manager = volumesmanager.get_volumes_manager()
  File "/usr/share/activities/Journal.activity/volumesmanager.py", line 284, in get_volumes_manager
    _volumes_manager = VolumesManager()
  File "/usr/share/activities/Journal.activity/volumesmanager.py", line 66, in __init__
    self._add_hal_device(udi)
  File "/usr/share/activities/Journal.activity/volumesmanager.py", line 125, in _add_hal_device
    volume_id = self._mount_in_datastore(udi)
  File "/usr/share/activities/Journal.activity/volumesmanager.py", line 192, in _mount_in_datastore
    dict(title=mount_point))
  File "/usr/lib/python2.5/site-packages/sugar/datastore/datastore.py", line 244, in mount
    return dbus_helpers.mount(uri, options)
  File "/usr/lib/python2.5/site-packages/sugar/datastore/dbus_helpers.py", line 80, in mount
    return _get_data_store().mount(uri, options)
  File "/usr/lib/python2.5/site-packages/dbus/proxies.py", line 136, in __call__
    **keywords)
  File "/usr/lib/python2.5/site-packages/dbus/connection.py", line 603, in call_blocking
    message, timeout)
DBusException: org.freedesktop.DBus.Python.xapian.DatabaseCorruptError: Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/dbus/service.py", line 664, in _message_cb
    retval = candidate_method(self, *args, **keywords)
  File "/usr/lib/python2.5/site-packages/olpc/datastore/datastore.py", line 76, in mount
    mp = self.connect_backingstore(uri, **_options)
  File "/usr/lib/python2.5/site-packages/olpc/datastore/datastore.py", line 168, in connect_backingstore
    bs.initialize_and_load()
  File "/usr/lib/python2.5/site-packages/olpc/datastore/backingstore.py", line 74, in initialize_and_load
    self.load()
  File "/usr/lib/python2.5/site-packages/olpc/datastore/backingstore.py", line 456, in load
    super(InplaceFileBackingStore, self).load()
  File "/usr/lib/python2.5/site-packages/olpc/datastore/backingstore.py", line 244, in load
    im.connect(index_name)
  File "/usr/lib/python2.5/site-packages/olpc/datastore/xapianindex.py", line 84, in connect
    self.write_index = secore.IndexerConnection(repo)
  File "/usr/lib/python2.5/site-packages/secore/indexerconnection.py", line 46, in __init__
    self._index = _xapian.WritableDatabase(indexpath, _xapian.DB_CREATE_OR_OPEN)
  File "/usr/lib/python2.5/site-packages/xapian.py", line 2759, in __init__
    _xapian.WritableDatabase_swiginit(self,_xapian.new_WritableDatabase(*args))
DatabaseCorruptError: Flint version file /media/GALILEO/.olpc.store/index/iamflint should be ((sizeof("IAmFlint""")-1) + 4) bytes, actually 0

1189012827.3155 STDERR - 
1189012827.3166 ERROR - Traceback (most recent call last):
  File "/usr/share/activities/Journal.activity/volumestoolbar.py", line 45, in _set_up_volumes
    volumes_manager = volumesmanager.get_volumes_manager()
  File "/usr/share/activities/Journal.activity/volumesmanager.py", line 284, in get_volumes_manager
    _volumes_manager = VolumesManager()
  File "/usr/share/activities/Journal.activity/volumesmanager.py", line 66, in __init__
    self._add_hal_device(udi)
  File "/usr/share/activities/Journal.activity/volumesmanager.py", line 125, in _add_hal_device
    volume_id = self._mount_in_datastore(udi)
  File "/usr/share/activities/Journal.activity/volumesmanager.py", line 192, in _mount_in_datastore
    dict(title=mount_point))
  File "/usr/lib/python2.5/site-packages/sugar/datastore/datastore.py", line 244, in mount
    return dbus_helpers.mount(uri, options)
  File "/usr/lib/python2.5/site-packages/sugar/datastore/dbus_helpers.py", line 80, in mount
    return _get_data_store().mount(uri, options)
  File "/usr/lib/python2.5/site-packages/dbus/proxies.py", line 136, in __call__
    **keywords)
  File "/usr/lib/python2.5/site-packages/dbus/connection.py", line 603, in call_blocking
    message, timeout)
DBusException: org.freedesktop.DBus.Python.xapian.DatabaseCorruptError: Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/dbus/service.py", line 664, in _message_cb
    retval = candidate_method(self, *args, **keywords)
  File "/usr/lib/python2.5/site-packages/olpc/datastore/datastore.py", line 76, in mount
    mp = self.connect_backingstore(uri, **_options)
  File "/usr/lib/python2.5/site-packages/olpc/datastore/datastore.py", line 168, in connect_backingstore
    bs.initialize_and_load()
  File "/usr/lib/python2.5/site-packages/olpc/datastore/backingstore.py", line 74, in initialize_and_load
    self.load()
  File "/usr/lib/python2.5/site-packages/olpc/datastore/backingstore.py", line 456, in load
    super(InplaceFileBackingStore, self).load()
  File "/usr/lib/python2.5/site-packages/olpc/datastore/backingstore.py", line 244, in load
    im.connect(index_name)
  File "/usr/lib/python2.5/site-packages/olpc/datastore/xapianindex.py", line 84, in connect
    self.write_index = secore.IndexerConnection(repo)
  File "/usr/lib/python2.5/site-packages/secore/indexerconnection.py", line 46, in __init__
    self._index = _xapian.WritableDatabase(indexpath, _xapian.DB_CREATE_OR_OPEN)
  File "/usr/lib/python2.5/site-packages/xapian.py", line 2759, in __init__
    _xapian.WritableDatabase_swiginit(self,_xapian.new_WritableDatabase(*args))
DatabaseCorruptError: Flint version file /media/GALILEO/.olpc.store/index/iamflint should be ((sizeof("IAmFlint""")-1) + 4) bytes, actually 0

1189013068.9118 DEBUG - root: ActivityService.set_active: 1.
1189013071.0976 DEBUG - root: button_press_event_cb
1189013071.1007 DEBUG - root: motion_notify_event_cb
1189013071.3368 DEBUG - root: VolumeToolbar._add_hal_device: dbus.String(u'/org/freedesktop/Hal/devices/volume_uuid_73B9_140A')
1189013071.3886 DEBUG - root: VolumeToolbar._mount_in_datastore: dbus.String(u'/org/freedesktop/Hal/devices/volume_uuid_73B9_140A')
1189013071.4881 STDERR - Traceback (most recent call last):
  File "/usr/share/activities/Journal.activity/journalactivity.py", line 111, in _entry_activated_cb
    self._entry_toolbar = EntryToolbar(entry.jobject)
  File "/usr/share/activities/Journal.activity/journaltoolbox.py", line 369, in __init__
    self._refresh_copy_palette()
  File "/usr/share/activities/Journal.activity/journaltoolbox.py", line 407, in _refresh_copy_palette
    volumes_manager = volumesmanager.get_volumes_manager()
  File "/usr/share/activities/Journal.activity/volumesmanager.py", line 284, in get_volumes_manager
    _volumes_manager = VolumesManager()
  File "/usr/share/activities/Journal.activity/volumesmanager.py", line 66, in __init__
    self._add_hal_device(udi)
  File "/usr/share/activities/Journal.activity/volumesmanager.py", line 125, in _add_hal_device
    volume_id = self._mount_in_datastore(udi)
  File "/usr/share/activities/Journal.activity/volumesmanager.py", line 192, in _mount_in_datastore
    dict(title=mount_point))
  File "/usr/lib/python2.5/site-packages/sugar/datastore/datastore.py", line 244, in mount
    return dbus_helpers.mount(uri, options)
  File "/usr/lib/python2.5/site-packages/sugar/datastore/dbus_helpers.py", line 80, in mount
    return _get_data_store().mount(uri, options)
  File "/usr/lib/python2.5/site-packages/dbus/proxies.py", line 136, in __call__
    **keywords)
  File "/usr/lib/python2.5/site-packages/dbus/connection.py", line 603, in call_blocking
    message, timeout)
DBusException: org.freedesktop.DBus.Python.xapian.DatabaseCorruptError: Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/dbus/service.py", line 664, in _message_cb
    retval = candidate_method(self, *args, **keywords)
  File "/usr/lib/python2.5/site-packages/olpc/datastore/datastore.py", line 76, in mount
    mp = self.connect_backingstore(uri, **_options)
  File "/usr/lib/python2.5/site-packages/olpc/datastore/datastore.py", line 168, in connect_backingstore
    bs.initialize_and_load()
  File "/usr/lib/python2.5/site-packages/olpc/datastore/backingstore.py", line 74, in initialize_and_load
    self.load()
  File "/usr/lib/python2.5/site-packages/olpc/datastore/backingstore.py", line 456, in load
    super(InplaceFileBackingStore, self).load()
  File "/usr/lib/python2.5/site-packages/olpc/datastore/backingstore.py", line 244, in load
    im.connect(index_name)
  File "/usr/lib/python2.5/site-packages/olpc/datastore/xapianindex.py", line 84, in connect
    self.write_index = secore.IndexerConnection(repo)
  File "/usr/lib/python2.5/site-packages/secore/indexerconnection.py", line 46, in __init__
    self._index = _xapian.WritableDatabase(indexpath, _xapian.DB_CREATE_OR_OPEN)
  File "/usr/lib/python2.5/site-packages/xapian.py", line 2759, in __init__
    _xapian.WritableDatabase_swiginit(self,_xapian.new_WritableDatabase(*args))
DatabaseCorruptError: Flint version file /media/GALILEO/.olpc.store/index/iamflint should be ((sizeof("IAmFlint""")-1) + 4) bytes, actually 0

1189013071.4923 STDERR - 
1189013071.4929 ERROR - Traceback (most recent call last):
  File "/usr/share/activities/Journal.activity/journalactivity.py", line 111, in _entry_activated_cb
    self._entry_toolbar = EntryToolbar(entry.jobject)
  File "/usr/share/activities/Journal.activity/journaltoolbox.py", line 369, in __init__
    self._refresh_copy_palette()
  File "/usr/share/activities/Journal.activity/journaltoolbox.py", line 407, in _refresh_copy_palette
    volumes_manager = volumesmanager.get_volumes_manager()
  File "/usr/share/activities/Journal.activity/volumesmanager.py", line 284, in get_volumes_manager
    _volumes_manager = VolumesManager()
  File "/usr/share/activities/Journal.activity/volumesmanager.py", line 66, in __init__
    self._add_hal_device(udi)
  File "/usr/share/activities/Journal.activity/volumesmanager.py", line 125, in _add_hal_device
    volume_id = self._mount_in_datastore(udi)
  File "/usr/share/activities/Journal.activity/volumesmanager.py", line 192, in _mount_in_datastore
    dict(title=mount_point))
  File "/usr/lib/python2.5/site-packages/sugar/datastore/datastore.py", line 244, in mount
    return dbus_helpers.mount(uri, options)
  File "/usr/lib/python2.5/site-packages/sugar/datastore/dbus_helpers.py", line 80, in mount
    return _get_data_store().mount(uri, options)
  File "/usr/lib/python2.5/site-packages/dbus/proxies.py", line 136, in __call__
    **keywords)
  File "/usr/lib/python2.5/site-packages/dbus/connection.py", line 603, in call_blocking
    message, timeout)
DBusException: org.freedesktop.DBus.Python.xapian.DatabaseCorruptError: Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/dbus/service.py", line 664, in _message_cb
    retval = candidate_method(self, *args, **keywords)
  File "/usr/lib/python2.5/site-packages/olpc/datastore/datastore.py", line 76, in mount
    mp = self.connect_backingstore(uri, **_options)
  File "/usr/lib/python2.5/site-packages/olpc/datastore/datastore.py", line 168, in connect_backingstore
    bs.initialize_and_load()
  File "/usr/lib/python2.5/site-packages/olpc/datastore/backingstore.py", line 74, in initialize_and_load
    self.load()
  File "/usr/lib/python2.5/site-packages/olpc/datastore/backingstore.py", line 456, in load
    super(InplaceFileBackingStore, self).load()
  File "/usr/lib/python2.5/site-packages/olpc/datastore/backingstore.py", line 244, in load
    im.connect(index_name)
  File "/usr/lib/python2.5/site-packages/olpc/datastore/xapianindex.py", line 84, in connect
    self.write_index = secore.IndexerConnection(repo)
  File "/usr/lib/python2.5/site-packages/secore/indexerconnection.py", line 46, in __init__
    self._index = _xapian.WritableDatabase(indexpath, _xapian.DB_CREATE_OR_OPEN)
  File "/usr/lib/python2.5/site-packages/xapian.py", line 2759, in __init__
    _xapian.WritableDatabase_swiginit(self,_xapian.new_WritableDatabase(*args))
DatabaseCorruptError: Flint version file /media/GALILEO/.olpc.store/index/iamflint should be ((sizeof("IAmFlint""")-1) + 4) bytes, actually 0

1189013400.3432 DEBUG - root: VolumesManager._hal_device_property_modified: dbus.String(u'/org/freedesktop/Hal/devices/volume_uuid_73B9_140A')
1189013400.4130 ERROR - dbus.connection: Exception in handler for D-Bus signal:
Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/dbus/connection.py", line 210, in maybe_handle_message
    self._handler(*args, **kwargs)
  File "/usr/share/activities/Journal.activity/volumesmanager.py", line 117, in <lambda>
    lambda *args: self._hal_device_property_modified_cb(udi, *args))
  File "/usr/share/activities/Journal.activity/volumesmanager.py", line 174, in _hal_device_property_modified_cb
    self._volumes.remove(volume)
ValueError: list.remove(x): x not in list
1189013400.4164 DEBUG - root: VolumesManager._hal_device_property_modified: dbus.String(u'/org/freedesktop/Hal/devices/volume_uuid_73B9_140A')
1189013400.4563 ERROR - dbus.connection: Exception in handler for D-Bus signal:
Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/dbus/connection.py", line 210, in maybe_handle_message
    self._handler(*args, **kwargs)
  File "/usr/share/activities/Journal.activity/volumesmanager.py", line 117, in <lambda>
    lambda *args: self._hal_device_property_modified_cb(udi, *args))
  File "/usr/share/activities/Journal.activity/volumesmanager.py", line 174, in _hal_device_property_modified_cb
    self._volumes.remove(volume)
ValueError: list.remove(x): x not in list
1189013400.4807 DEBUG - root: VolumesManager._hal_device_removed_cb: dbus.String(u'/org/freedesktop/Hal/devices/volume_uuid_73B9_140A')
1189013400.4929 ERROR - dbus.proxies: Introspect error on :1.2:/org/freedesktop/Hal/devices/volume_uuid_73B9_140A: dbus.exceptions.DBusException: org.freedesktop.Hal.NoSuchDevice: No device with id /org/freedesktop/Hal/devices/volume_uuid_73B9_140A
1189013400.4951 DEBUG - dbus.proxies: Executing introspect queue due to error
1189013400.5015 DEBUG - root: e: org.freedesktop.Hal.NoSuchDevice: No device with id /org/freedesktop/Hal/devices/volume_uuid_73B9_140A
1189013400.5036 DEBUG - root: VolumesManager._unmount_from_datastore: dbus.String(u'/org/freedesktop/Hal/devices/volume_uuid_73B9_140A')
1189013400.5070 DEBUG - root: VolumesManager._hal_device_removed_cb: dbus.String(u'/org/freedesktop/Hal/devices/volume_uuid_73B9_140A')
1189013400.5172 ERROR - dbus.proxies: Introspect error on :1.2:/org/freedesktop/Hal/devices/volume_uuid_73B9_140A: dbus.exceptions.DBusException: org.freedesktop.Hal.NoSuchDevice: No device with id /org/freedesktop/Hal/devices/volume_uuid_73B9_140A
1189013400.5194 DEBUG - dbus.proxies: Executing introspect queue due to error
1189013400.5272 DEBUG - root: e: org.freedesktop.Hal.NoSuchDevice: No device with id /org/freedesktop/Hal/devices/volume_uuid_73B9_140A
1189013400.5298 DEBUG - root: VolumesManager._unmount_from_datastore: dbus.String(u'/org/freedesktop/Hal/devices/volume_uuid_73B9_140A')
1189013448.5849 DEBUG - root: VolumesManager._hal_device_added_cb: dbus.String(u'/org/freedesktop/Hal/devices/volume_uuid_73B9_140A')
1189013448.6783 DEBUG - root: VolumeToolbar._add_hal_device: dbus.String(u'/org/freedesktop/Hal/devices/volume_uuid_73B9_140A')
1189013448.9013 DEBUG - root: VolumesManager._hal_device_added_cb: dbus.String(u'/org/freedesktop/Hal/devices/volume_uuid_73B9_140A')
1189013448.9778 DEBUG - root: VolumeToolbar._add_hal_device: dbus.String(u'/org/freedesktop/Hal/devices/volume_uuid_73B9_140A')
1189013449.0672 DEBUG - root: VolumeToolbar._mount_in_datastore: dbus.String(u'/org/freedesktop/Hal/devices/volume_uuid_73B9_140A')
1189013449.1746 ERROR - dbus.connection: Exception in handler for D-Bus signal:
Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/dbus/connection.py", line 210, in maybe_handle_message
    self._handler(*args, **kwargs)
  File "/usr/share/activities/Journal.activity/volumesmanager.py", line 84, in _hal_device_added_cb
    self._add_hal_device(udi)
  File "/usr/share/activities/Journal.activity/volumesmanager.py", line 125, in _add_hal_device
    volume_id = self._mount_in_datastore(udi)
  File "/usr/share/activities/Journal.activity/volumesmanager.py", line 192, in _mount_in_datastore
    dict(title=mount_point))
  File "/usr/lib/python2.5/site-packages/sugar/datastore/datastore.py", line 244, in mount
    return dbus_helpers.mount(uri, options)
  File "/usr/lib/python2.5/site-packages/sugar/datastore/dbus_helpers.py", line 80, in mount
    return _get_data_store().mount(uri, options)
  File "/usr/lib/python2.5/site-packages/dbus/proxies.py", line 136, in __call__
    **keywords)
  File "/usr/lib/python2.5/site-packages/dbus/connection.py", line 603, in call_blocking
    message, timeout)
DBusException: org.freedesktop.DBus.Python.xapian.DatabaseCorruptError: Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/dbus/service.py", line 664, in _message_cb
    retval = candidate_method(self, *args, **keywords)
  File "/usr/lib/python2.5/site-packages/olpc/datastore/datastore.py", line 76, in mount
    mp = self.connect_backingstore(uri, **_options)
  File "/usr/lib/python2.5/site-packages/olpc/datastore/datastore.py", line 168, in connect_backingstore
    bs.initialize_and_load()
  File "/usr/lib/python2.5/site-packages/olpc/datastore/backingstore.py", line 74, in initialize_and_load
    self.load()
  File "/usr/lib/python2.5/site-packages/olpc/datastore/backingstore.py", line 456, in load
    super(InplaceFileBackingStore, self).load()
  File "/usr/lib/python2.5/site-packages/olpc/datastore/backingstore.py", line 244, in load
    im.connect(index_name)
  File "/usr/lib/python2.5/site-packages/olpc/datastore/xapianindex.py", line 84, in connect
    self.write_index = secore.IndexerConnection(repo)
  File "/usr/lib/python2.5/site-packages/secore/indexerconnection.py", line 46, in __init__
    self._index = _xapian.WritableDatabase(indexpath, _xapian.DB_CREATE_OR_OPEN)
  File "/usr/lib/python2.5/site-packages/xapian.py", line 2759, in __init__
    _xapian.WritableDatabase_swiginit(self,_xapian.new_WritableDatabase(*args))
DatabaseCorruptError: Flint version file /media/GALILEO/.olpc.store/index/iamflint should be ((sizeof("IAmFlint""")-1) + 4) bytes, actually 0
1189013449.1808 DEBUG - root: VolumesManager._hal_device_property_modified: dbus.String(u'/org/freedesktop/Hal/devices/volume_uuid_73B9_140A')
1189013449.2195 DEBUG - root: VolumeToolbar._mount_in_datastore: dbus.String(u'/org/freedesktop/Hal/devices/volume_uuid_73B9_140A')
1189013449.2981 ERROR - dbus.connection: Exception in handler for D-Bus signal:
Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/dbus/connection.py", line 210, in maybe_handle_message
    self._handler(*args, **kwargs)
  File "/usr/share/activities/Journal.activity/volumesmanager.py", line 117, in <lambda>
    lambda *args: self._hal_device_property_modified_cb(udi, *args))
  File "/usr/share/activities/Journal.activity/volumesmanager.py", line 171, in _hal_device_property_modified_cb
    volume_id = self._mount_in_datastore(udi)
  File "/usr/share/activities/Journal.activity/volumesmanager.py", line 192, in _mount_in_datastore
    dict(title=mount_point))
  File "/usr/lib/python2.5/site-packages/sugar/datastore/datastore.py", line 244, in mount
    return dbus_helpers.mount(uri, options)
  File "/usr/lib/python2.5/site-packages/sugar/datastore/dbus_helpers.py", line 80, in mount
    return _get_data_store().mount(uri, options)
  File "/usr/lib/python2.5/site-packages/dbus/proxies.py", line 136, in __call__
    **keywords)
  File "/usr/lib/python2.5/site-packages/dbus/connection.py", line 603, in call_blocking
    message, timeout)
DBusException: org.freedesktop.DBus.Python.xapian.DatabaseCorruptError: Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/dbus/service.py", line 664, in _message_cb
    retval = candidate_method(self, *args, **keywords)
  File "/usr/lib/python2.5/site-packages/olpc/datastore/datastore.py", line 76, in mount
    mp = self.connect_backingstore(uri, **_options)
  File "/usr/lib/python2.5/site-packages/olpc/datastore/datastore.py", line 168, in connect_backingstore
    bs.initialize_and_load()
  File "/usr/lib/python2.5/site-packages/olpc/datastore/backingstore.py", line 74, in initialize_and_load
    self.load()
  File "/usr/lib/python2.5/site-packages/olpc/datastore/backingstore.py", line 456, in load
    super(InplaceFileBackingStore, self).load()
  File "/usr/lib/python2.5/site-packages/olpc/datastore/backingstore.py", line 244, in load
    im.connect(index_name)
  File "/usr/lib/python2.5/site-packages/olpc/datastore/xapianindex.py", line 84, in connect
    self.write_index = secore.IndexerConnection(repo)
  File "/usr/lib/python2.5/site-packages/secore/indexerconnection.py", line 46, in __init__
    self._index = _xapian.WritableDatabase(indexpath, _xapian.DB_CREATE_OR_OPEN)
  File "/usr/lib/python2.5/site-packages/xapian.py", line 2759, in __init__
    _xapian.WritableDatabase_swiginit(self,_xapian.new_WritableDatabase(*args))
DatabaseCorruptError: Flint version file /media/GALILEO/.olpc.store/index/iamflint should be ((sizeof("IAmFlint""")-1) + 4) bytes, actually 0
1189013449.3060 DEBUG - root: VolumesManager._hal_device_property_modified: dbus.String(u'/org/freedesktop/Hal/devices/volume_uuid_73B9_140A')
1189013449.3431 DEBUG - root: VolumeToolbar._mount_in_datastore: dbus.String(u'/org/freedesktop/Hal/devices/volume_uuid_73B9_140A')
1189013449.4449 ERROR - dbus.connection: Exception in handler for D-Bus signal:
Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/dbus/connection.py", line 210, in maybe_handle_message
    self._handler(*args, **kwargs)
  File "/usr/share/activities/Journal.activity/volumesmanager.py", line 117, in <lambda>
    lambda *args: self._hal_device_property_modified_cb(udi, *args))
  File "/usr/share/activities/Journal.activity/volumesmanager.py", line 171, in _hal_device_property_modified_cb
    volume_id = self._mount_in_datastore(udi)
  File "/usr/share/activities/Journal.activity/volumesmanager.py", line 192, in _mount_in_datastore
    dict(title=mount_point))
  File "/usr/lib/python2.5/site-packages/sugar/datastore/datastore.py", line 244, in mount
    return dbus_helpers.mount(uri, options)
  File "/usr/lib/python2.5/site-packages/sugar/datastore/dbus_helpers.py", line 80, in mount
    return _get_data_store().mount(uri, options)
  File "/usr/lib/python2.5/site-packages/dbus/proxies.py", line 136, in __call__
    **keywords)
  File "/usr/lib/python2.5/site-packages/dbus/connection.py", line 603, in call_blocking
    message, timeout)
DBusException: org.freedesktop.DBus.Python.xapian.DatabaseCorruptError: Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/dbus/service.py", line 664, in _message_cb
    retval = candidate_method(self, *args, **keywords)
  File "/usr/lib/python2.5/site-packages/olpc/datastore/datastore.py", line 76, in mount
    mp = self.connect_backingstore(uri, **_options)
  File "/usr/lib/python2.5/site-packages/olpc/datastore/datastore.py", line 168, in connect_backingstore
    bs.initialize_and_load()
  File "/usr/lib/python2.5/site-packages/olpc/datastore/backingstore.py", line 74, in initialize_and_load
    self.load()
  File "/usr/lib/python2.5/site-packages/olpc/datastore/backingstore.py", line 456, in load
    super(InplaceFileBackingStore, self).load()
  File "/usr/lib/python2.5/site-packages/olpc/datastore/backingstore.py", line 244, in load
    im.connect(index_name)
  File "/usr/lib/python2.5/site-packages/olpc/datastore/xapianindex.py", line 84, in connect
    self.write_index = secore.IndexerConnection(repo)
  File "/usr/lib/python2.5/site-packages/secore/indexerconnection.py", line 46, in __init__
    self._index = _xapian.WritableDatabase(indexpath, _xapian.DB_CREATE_OR_OPEN)
  File "/usr/lib/python2.5/site-packages/xapian.py", line 2759, in __init__
    _xapian.WritableDatabase_swiginit(self,_xapian.new_WritableDatabase(*args))
DatabaseCorruptError: Flint version file /media/GALILEO/.olpc.store/index/iamflint should be ((sizeof("IAmFlint""")-1) + 4) bytes, actually 0
1189013449.4515 DEBUG - root: VolumesManager._hal_device_property_modified: dbus.String(u'/org/freedesktop/Hal/devices/volume_uuid_73B9_140A')
1189013449.4895 DEBUG - root: VolumeToolbar._mount_in_datastore: dbus.String(u'/org/freedesktop/Hal/devices/volume_uuid_73B9_140A')
1189013449.5749 ERROR - dbus.connection: Exception in handler for D-Bus signal:
Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/dbus/connection.py", line 210, in maybe_handle_message
    self._handler(*args, **kwargs)
  File "/usr/share/activities/Journal.activity/volumesmanager.py", line 117, in <lambda>
    lambda *args: self._hal_device_property_modified_cb(udi, *args))
  File "/usr/share/activities/Journal.activity/volumesmanager.py", line 171, in _hal_device_property_modified_cb
    volume_id = self._mount_in_datastore(udi)
  File "/usr/share/activities/Journal.activity/volumesmanager.py", line 192, in _mount_in_datastore
    dict(title=mount_point))
  File "/usr/lib/python2.5/site-packages/sugar/datastore/datastore.py", line 244, in mount
    return dbus_helpers.mount(uri, options)
  File "/usr/lib/python2.5/site-packages/sugar/datastore/dbus_helpers.py", line 80, in mount
    return _get_data_store().mount(uri, options)
  File "/usr/lib/python2.5/site-packages/dbus/proxies.py", line 136, in __call__
    **keywords)
  File "/usr/lib/python2.5/site-packages/dbus/connection.py", line 603, in call_blocking
    message, timeout)
DBusException: org.freedesktop.DBus.Python.xapian.DatabaseCorruptError: Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/dbus/service.py", line 664, in _message_cb
    retval = candidate_method(self, *args, **keywords)
  File "/usr/lib/python2.5/site-packages/olpc/datastore/datastore.py", line 76, in mount
    mp = self.connect_backingstore(uri, **_options)
  File "/usr/lib/python2.5/site-packages/olpc/datastore/datastore.py", line 168, in connect_backingstore
    bs.initialize_and_load()
  File "/usr/lib/python2.5/site-packages/olpc/datastore/backingstore.py", line 74, in initialize_and_load
    self.load()
  File "/usr/lib/python2.5/site-packages/olpc/datastore/backingstore.py", line 456, in load
    super(InplaceFileBackingStore, self).load()
  File "/usr/lib/python2.5/site-packages/olpc/datastore/backingstore.py", line 244, in load
    im.connect(index_name)
  File "/usr/lib/python2.5/site-packages/olpc/datastore/xapianindex.py", line 84, in connect
    self.write_index = secore.IndexerConnection(repo)
  File "/usr/lib/python2.5/site-packages/secore/indexerconnection.py", line 46, in __init__
    self._index = _xapian.WritableDatabase(indexpath, _xapian.DB_CREATE_OR_OPEN)
  File "/usr/lib/python2.5/site-packages/xapian.py", line 2759, in __init__
    _xapian.WritableDatabase_swiginit(self,_xapian.new_WritableDatabase(*args))
DatabaseCorruptError: Flint version file /media/GALILEO/.olpc.store/index/iamflint should be ((sizeof("IAmFlint""")-1) + 4) bytes, actually 0
1189013449.5812 DEBUG - root: VolumesManager._hal_device_property_modified: dbus.String(u'/org/freedesktop/Hal/devices/volume_uuid_73B9_140A')
1189013449.6345 DEBUG - root: VolumeToolbar._mount_in_datastore: dbus.String(u'/org/freedesktop/Hal/devices/volume_uuid_73B9_140A')
1189013449.7175 ERROR - dbus.connection: Exception in handler for D-Bus signal:
Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/dbus/connection.py", line 210, in maybe_handle_message
    self._handler(*args, **kwargs)
  File "/usr/share/activities/Journal.activity/volumesmanager.py", line 117, in <lambda>
    lambda *args: self._hal_device_property_modified_cb(udi, *args))
  File "/usr/share/activities/Journal.activity/volumesmanager.py", line 171, in _hal_device_property_modified_cb
    volume_id = self._mount_in_datastore(udi)
  File "/usr/share/activities/Journal.activity/volumesmanager.py", line 192, in _mount_in_datastore
    dict(title=mount_point))
  File "/usr/lib/python2.5/site-packages/sugar/datastore/datastore.py", line 244, in mount
    return dbus_helpers.mount(uri, options)
  File "/usr/lib/python2.5/site-packages/sugar/datastore/dbus_helpers.py", line 80, in mount
    return _get_data_store().mount(uri, options)
  File "/usr/lib/python2.5/site-packages/dbus/proxies.py", line 136, in __call__
    **keywords)
  File "/usr/lib/python2.5/site-packages/dbus/connection.py", line 603, in call_blocking
    message, timeout)
DBusException: org.freedesktop.DBus.Python.xapian.DatabaseCorruptError: Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/dbus/service.py", line 664, in _message_cb
    retval = candidate_method(self, *args, **keywords)
  File "/usr/lib/python2.5/site-packages/olpc/datastore/datastore.py", line 76, in mount
    mp = self.connect_backingstore(uri, **_options)
  File "/usr/lib/python2.5/site-packages/olpc/datastore/datastore.py", line 168, in connect_backingstore
    bs.initialize_and_load()
  File "/usr/lib/python2.5/site-packages/olpc/datastore/backingstore.py", line 74, in initialize_and_load
    self.load()
  File "/usr/lib/python2.5/site-packages/olpc/datastore/backingstore.py", line 456, in load
    super(InplaceFileBackingStore, self).load()
  File "/usr/lib/python2.5/site-packages/olpc/datastore/backingstore.py", line 244, in load
    im.connect(index_name)
  File "/usr/lib/python2.5/site-packages/olpc/datastore/xapianindex.py", line 84, in connect
    self.write_index = secore.IndexerConnection(repo)
  File "/usr/lib/python2.5/site-packages/secore/indexerconnection.py", line 46, in __init__
    self._index = _xapian.WritableDatabase(indexpath, _xapian.DB_CREATE_OR_OPEN)
  File "/usr/lib/python2.5/site-packages/xapian.py", line 2759, in __init__
    _xapian.WritableDatabase_swiginit(self,_xapian.new_WritableDatabase(*args))
DatabaseCorruptError: Flint version file /media/GALILEO/.olpc.store/index/iamflint should be ((sizeof("IAmFlint""")-1) + 4) bytes, actually 0

Change History (13)

comment:1 Changed 7 years ago by marco

  • Owner changed from marco to tomeu

comment:2 Changed 7 years ago by tomeu

  • Cc tomeu added
  • Component changed from journal-activity to datastore
  • Milestone changed from Trial-3 to Untriaged
  • Owner changed from tomeu to bcsaller
  • Summary changed from FAT16 USB Sticks hang the Journal to DataStore should remake a corrupted index instead of raising an exception

As far as I can see, this has nothing to do with FAT16. The xapian index is corrupted, and in these cases, I think the datastore should remake it.

Of course, would be good to know how the xapian index got corrupted.

comment:3 Changed 7 years ago by kimquirk

  • Milestone changed from Untriaged to Trial-3

This sounds like a bug that needs to be fixed this week in Trial-3.

comment:4 Changed 7 years ago by tomeu

  • Cc bcsaller added; tomeu removed
  • Owner changed from bcsaller to tomeu

Will look at this as Ben is on holidays.

comment:5 Changed 7 years ago by kimquirk

  • Priority changed from normal to blocker

Making this a blocker just to get feedback in the next day or two as to what can be done (if anything) and how long it will take.

comment:6 Changed 7 years ago by tomeu

  • Cc tomeu added; bcsaller removed
  • Milestone changed from Trial-3 to Untriaged
  • Owner changed from tomeu to bcsaller
  • Priority changed from blocker to high

Pushed a patch for Trial-3 that will recreate an index for a device that we fail to mount.

We probably should review this later and think about better ways for recovering from this kind of errors.

comment:7 Changed 7 years ago by kimquirk

  • Milestone changed from Untriaged to First Deployment, V1.0

Thanks Tomeu. Moving to FRS for more discussion.

comment:8 Changed 7 years ago by tomeu

Oct 03 14:18:51 <jg>    it strikes me that the USB key is where
the index is most likely to get zapped; jffs2 is a journaling file
system, and if one is careful on using it, one should have
consistent results.  I'm most worried about USB key corruption.  So
only executing it for mountable media seems sensible to me.

So I'm going to only remake the index for removable devices, not internal flash.

comment:9 Changed 7 years ago by jg

OK for trial-3.

comment:10 Changed 7 years ago by marco

  • Milestone changed from First Deployment, V1.0 to Trial-3

comment:11 Changed 7 years ago by marco

  • Milestone changed from Trial-3 to First Deployment, V1.0

Trial-3 workaround is in 613.

comment:12 Changed 7 years ago by gnu

This may be a duplicate of #2445 (which was closed as unreproducible).

comment:13 Changed 6 years ago by tomeu

  • Resolution set to fixed
  • Status changed from new to closed

#2849 covers the longer term fix.

Note: See TracTickets for help on using tickets.