tritcask crash if there are no keydir stats for an inactive file

Bug #848224 reported by Guillermo Gonzalez on 2011-09-12
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu One Client
Status tracked in Trunk
Stable-1-6
High
Guillermo Gonzalez
Trunk
High
Guillermo Gonzalez
ubuntuone-client (Ubuntu)
High
dobey
Natty
High
Unassigned
Oneiric
High
dobey

Bug Description

If there are no stats for a inactive data file, e.g: the file is 100% deletes (tombstones) there are no stats for that in the keydir and tritcask crash with a KeyError

Related branches

Guillermo Gonzalez (verterok) wrote :
Download full text (3.3 KiB)

python /usr/lib/ubuntuone-client/ubuntuone-syncdaemon --debug
2011-09-12 13:48:26,882 - ubuntuone.SyncDaemon.Main - INFO - Starting Ubuntu One client version 1.6.2
2011-09-12 13:48:26,917 - ubuntuone.SyncDaemon.tritcask - INFO - Initializing Tritcask on: /home/lauratika/.local/share/ubuntuone/syncdaemon/tritcask
2011-09-12 13:48:26,918 - ubuntuone.SyncDaemon.tritcask - DEBUG - lookingup data files
2011-09-12 13:48:26,918 - ubuntuone.SyncDaemon.tritcask - INFO - found 3 data files and 0 dead files
2011-09-12 13:48:26,919 - ubuntuone.SyncDaemon.tritcask - DEBUG - building the keydir, using: ['131580868115017', '131580860858513']
2011-09-12 13:48:26,919 - ubuntuone.SyncDaemon.tritcask - DEBUG - loading entries from hint of: /home/lauratika/.local/share/ubuntuone/syncdaemon/tritcask/131580860858513.inactive.tritcask-v1.data
2011-09-12 13:48:28,024 - ubuntuone.SyncDaemon.tritcask - DEBUG - loading entries from hint of: /home/lauratika/.local/share/ubuntuone/syncdaemon/tritcask/131580868115017.inactive.tritcask-v1.data
2011-09-12 13:48:28,029 - ubuntuone.SyncDaemon.tritcask - DEBUG - Ignoring empty live file.
2011-09-12 13:48:28,029 - ubuntuone.SyncDaemon.tritcask - INFO - keydir ready! (keys: 27707)
2011-09-12 13:48:28,030 - ubuntuone.SyncDaemon - ERROR - Unexpected error
Traceback (most recent call last):
  File "/usr/lib/ubuntuone-client/ubuntuone-syncdaemon", line 190, in <module>
    main(sys.argv)
  File "/usr/lib/ubuntuone-client/ubuntuone-syncdaemon", line 139, in main
    ignore_files=options.ignore)
  File "/usr/lib/pymodules/python2.7/ubuntuone-client/ubuntuone/syncdaemon/main.py", line 100, in __init__
    self.db = tritcask.Tritcask(self.tritcask_dir)
  File "/usr/lib/pymodules/python2.7/ubuntuone-client/ubuntuone/syncdaemon/tritcask.py", line 578, in __init__
    self._rotate_and_merge()
  File "/usr/lib/pymodules/python2.7/ubuntuone-client/ubuntuone/syncdaemon/tritcask.py", line 638, in _rotate_and_merge
    if self.should_merge(self._immutable):
  File "/usr/lib/pymodules/python2.7/ubuntuone-client/ubuntuone/syncdaemon/tritcask.py", line 619, in should_merge
    for file_id in file_ids])
  File "/usr/lib/pymodules/python2.7/ubuntuone-client/ubuntuone/syncdaemon/tritcask.py", line 513, in get_stats
    return self._stats[file_id].copy()
KeyError: '131580868115017'
Traceback (most recent call last):
  File "/usr/lib/ubuntuone-client/ubuntuone-syncdaemon", line 190, in <module>
    main(sys.argv)
  File "/usr/lib/ubuntuone-client/ubuntuone-syncdaemon", line 139, in main
    ignore_files=options.ignore)
  File "/usr/lib/pymodules/python2.7/ubuntuone-client/ubuntuone/syncdaemon/main.py", line 100, in __init__
    self.db = tritcask.Tritcask(self.tritcask_dir)
  File "/usr/lib/pymodules/python2.7/ubuntuone-client/ubuntuone/syncdaemon/tritcask.py", line 578, in __init__
    self._rotate_and_merge()
  File "/usr/lib/pymodules/python2.7/ubuntuone-client/ubuntuone/syncdaemon/tritcask.py", line 638, in _rotate_and_merge
    if self.should_merge(self._immutable):
  File "/usr/lib/pymodules/python2.7/ubuntuone-client/ubuntuone/syncdaemon/tritcask.py", line 619, in should_merge
    for file_id in file_ids])
  File "/usr/lib/pymodules/python2.7/ub...

Read more...

Changed in ubuntuone-client:
status: Triaged → In Progress
Changed in ubuntuone-client:
status: In Progress → Fix Committed
dobey (dobey) on 2011-09-27
Changed in ubuntuone-client (Ubuntu):
assignee: nobody → Rodney Dawes (dobey)
importance: Undecided → High
status: New → In Progress
Changed in ubuntuone-client (Ubuntu Oneiric):
milestone: none → ubuntu-11.10
Changed in ubuntuone-client (Ubuntu Natty):
milestone: none → natty-updates
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntuone-client - 2.0.0-0ubuntu1

---------------
ubuntuone-client (2.0.0-0ubuntu1) oneiric; urgency=low

  * New upstream release.
    - No watches needed on parent folders (LP: #838111)
    - Root is always subscribed (LP: #842839)
    - Unicode path asserts failing (LP: #845009)
    - Local Rescan is putting non-UTF8 paths into syncdaemon (LP: #696901)
    - IOError in tritcask metadata (LP: #776386)
    - Missinglogin_email_password on Linux (LP: #831043)
    - Unsubscribing share and deleting content triggers unlinks (LP: #820353)
    - Only make the link if it doesn't exist (LP: #833812)
    - Client restarts on SSL connection error (LP: #833388)
    - Stop logging sensitive data (LP: #837488)
    - Add delay to the hash queue (LP: #838104)
    - Crash if no keydir stats for inactive file (LP: #848224)
    - Use correct desktop file for launcher progress bar (LP: #851187)
    - Folder nesting check is incorrect (LP: #854776)
    - Should have a --version switch for u1sdtool (LP: #379841)
  * debian/control:
    - Update versions of some dependencies to be more correct
    - Recommend ubuntuone-installer needed for Unity launcher integration
 -- Rodney Dawes <email address hidden> Tue, 27 Sep 2011 11:18:41 -0400

Changed in ubuntuone-client (Ubuntu Oneiric):
status: In Progress → Fix Released
tags: added: u1-natty-sru
Changed in ubuntuone-client (Ubuntu Natty):
importance: Undecided → High
dino99 (9d9) wrote :

4.2 is the stable version now

Changed in ubuntuone-client (Ubuntu Natty):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers