bzr repo corrupted

Bug #1368014 reported by Sondra Kinsey
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
New
Undecided
Unassigned

Bug Description

The bzr repository seems to have arbitrarily corrupted. I have another branch, so it's not a big deal for me. Is there any way to fix corrupted repositories, or at least glean the most recent revisions? I don't know what caused the corruption.

$ bzr check
Checking working tree at '[path]'.
Checking branch at 'file:///[path]/'.
Checking repository at 'file:///[path]/'.
bzr: ERROR: bzrlib.errors.ShortReadvError: readv() read 4109539 bytes rather than 8130994 bytes at 31431453 for "aa7e51fead19937e75b74e3ff6cd34f2.pack"

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 930, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 1121, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 673, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 697, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/cleanup.py", line 136, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/cleanup.py", line 166, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/builtins.py", line 3774, in run
    check_dwim(path, verbose, do_branch=branch, do_repo=repo, do_tree=tree)
  File "/usr/lib/python2.7/dist-packages/bzrlib/check.py", line 435, in check_dwim
    check_repo=do_repo)
  File "/usr/lib/python2.7/dist-packages/bzrlib/repository.py", line 1181, in check
    check_repo=check_repo)
  File "/usr/lib/python2.7/dist-packages/bzrlib/decorators.py", line 155, in read_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/vf_repository.py", line 1955, in _check
    result.check(callback_refs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/check.py", line 113, in check
    self.repository._check_inventories(self)
  File "/usr/lib/python2.7/dist-packages/bzrlib/vf_repository.py", line 1081, in _check_inventories
    self._do_check_inventories(checker, bar)
  File "/usr/lib/python2.7/dist-packages/bzrlib/vf_repository.py", line 1132, in _do_check_inventories
    for record in getattr(self, kind).check(keys=keys[kind]):
  File "/usr/lib/python2.7/dist-packages/bzrlib/groupcompress.py", line 1456, in get_record_stream
    orig_keys, ordering, include_delta_closure):
  File "/usr/lib/python2.7/dist-packages/bzrlib/groupcompress.py", line 1609, in _get_remaining_record_stream
    for factory in batcher.yield_factories():
  File "/usr/lib/python2.7/dist-packages/bzrlib/groupcompress.py", line 1170, in yield_factories
    block_read_memo, block = blocks.next()
  File "/usr/lib/python2.7/dist-packages/bzrlib/groupcompress.py", line 1412, in _get_blocks
    zdata = raw_records.next()
  File "/usr/lib/python2.7/dist-packages/bzrlib/repofmt/pack_repo.py", line 2043, in get_raw_records
    for names, read_func in reader.iter_records():
  File "/usr/lib/python2.7/dist-packages/bzrlib/pack.py", line 298, in _iter_records
    for record in self._iter_record_objects():
  File "/usr/lib/python2.7/dist-packages/bzrlib/pack.py", line 303, in _iter_record_objects
    record_kind = self.reader_func(1)
  File "/usr/lib/python2.7/dist-packages/bzrlib/pack.py", line 244, in reader_func
    return self._source.read(length)
  File "/usr/lib/python2.7/dist-packages/bzrlib/pack.py", line 200, in read
    self._next()
  File "/usr/lib/python2.7/dist-packages/bzrlib/pack.py", line 195, in _next
    offset, data = self.readv_result.next()
  File "/usr/lib/python2.7/dist-packages/bzrlib/transport/__init__.py", line 721, in _seek_and_read
    c_offset.length, actual=len(data))
ShortReadvError: readv() read 4109539 bytes rather than 8130994 bytes at 31431453 for "aa7e51fead19937e75b74e3ff6cd34f2.pack"

bzr 2.7.0dev1 on python 2.7.6 (Linux-3.13.0-24-generic-i686-with-
    Ubuntu-14.04-trusty)
arguments: ['/usr/bin/bzr', 'check']
plugins: bash_completion[2.7.0dev1], changelog_merge[2.7.0dev1],
    explorer[1.3.0], grep[2.7.0dev1], launchpad[2.7.0dev1],
    netrc_credential_store[2.7.0dev1], news_merge[2.7.0dev1],
    po_merge[2.7.0dev1], qbzr[0.23.1], weave_fmt[2.7.0dev1]
encoding: 'utf-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'

*** Bazaar has encountered an internal error. This probably indicates a
    bug in Bazaar. You can help us fix it by filing a bug report at
        https://bugs.launchpad.net/bzr/+filebug
    including this traceback and a description of the problem.

$ bzr version
Bazaar (bzr) 2.7.0dev1
  Python interpreter: /usr/bin/python 2.7.6
  Python standard library: /usr/lib/python2.7
  Platform: Linux-3.13.0-24-generic-i686-with-Ubuntu-14.04-trusty
  bzrlib: /usr/lib/python2.7/dist-packages/bzrlib
  Bazaar configuration: /home/lubuntu/.bazaar
  Bazaar log file: /home/lubuntu/.bzr.log

Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
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.