bzr: ERROR: da15e8553fc8b356d836c78b0eff5e65.iix is not an index of type <class 'bzrlib.index.GraphIndex'>

Asked by Erik Heeren on 2012-02-15

We recently noticed this problem with an older repo on our server. Any action (branch, log -v, ...) will produce it. It's a bare repo, so we can't just copy the files out of it.

The server is running Ubuntu version 9.04.
The bzr version on the server is 1.13.1-1 but the repo was made with an older version: the upgrade to Ubuntu 9.04 and bzr 1.13.1-1 happened between repo creation and the last commit/push on this repo.

I've got a copy of the repo on my laptop (gentoo, bzr 2.4.1) for experimenting purposes.
With this copy, I've tried rebuilding the pack-names file using https://code.launchpad.net/~eric97/bzr/regenerate-pack-names/+merge/49756 , but the file it generates is identical to the original pack-names.

When I do

less da15e8553fc8b356d836c78b0eff5e65.iix

I see:

00000000 00 00 00 00 06 00 00 00 00 00 00 00 02 00 00 00 |................|
00000010 83 00 00 00 05 00 00 00 00 00 00 00 21 00 00 00 |............!...|
00000020 00 00 00 00 04 00 00 00 01 00 00 00 0b 00 00 00 |................|
00000030 00 00 00 00 07 00 00 00 00 00 00 00 0a 00 00 00 |................|
00000040 00 00 00 00 03 00 00 00 00 00 00 00 09 00 00 00 |................|
00000050 00 00 00 00 10 00 00 00 00 00 00 00 0c 00 00 00 |................|
00000060 00 00 00 00 0f 00 00 00 00 00 00 00 08 00 00 00 |................|
00000070 00 00 00 00 0e 00 00 00 00 00 00 00 15 00 00 00 |................|
00000080 00 00 00 00 11 00 00 00 00 00 00 00 14 00 00 00 |................|
00000090 00 00 00 00 30 00 00 00 00 00 00 00 13 00 00 00 |....0...........|
000000a0 00 00 00 00 1a 00 00 00 00 00 00 00 16 00 00 00 |................|
000000b0 00 00 00 00 19 00 00 00 00 00 00 00 2b 00 00 00 |............+...|
000000c0

Which doesn't seem to be nearly enough, compared to less-ing some of the other .iix files in the indices directory.

Best-case scenario would be recovering both the history and the files, but I could settle for just recovering the files, preferably at the state of the last commit.
Understanding what went wrong would be a major bonus, with prevention in mind :-)

Question information

Language:
English Edit question
Status:
Open
For:
Bazaar Edit question
Assignee:
No assignee Edit question
Last query:
2012-02-15
Last reply:
Martin Packman (gz) said : #1

We have an existing bug report that results in a similar error, the cause may not be the same though. Getting more info about the cause here would be great.

Erik Heeren (erik-heeren) said : #2

Hadn't seen that bug yet, wonder how I missed it.

If there's any information I can provide you with, please ask. I'll see if I can attach the relevant stacktrace from my .bzr.log here.

Erik Heeren (erik-heeren) said : #3

No attachments on questions, it seems.

Wed 2012-02-15 15:03:12 +0100
0.079 bazaar version: 2.4.1
0.079 bzr arguments: [u'branch', u'dynappsconnect', u'b']
0.105 looking for plugins in /home/erik/.bazaar/plugins
0.105 looking for plugins in /usr/lib64/python2.7/site-packages/bzrlib/plugins
0.132 encoding stdout as sys.stdout encoding 'UTF-8'
0.175 opening working tree '/home/erik/ABC/recovery/dynappsconnect'
0.191 opening working tree '/home/erik/ABC/recovery/dynappsconnect'
0.196 creating repository in file:///home/erik/ABC/recovery/b/.bzr/.
0.200 Using fetch logic to copy between KnitPackRepository('file:///home/erik/ABC/recovery/dynappsconnect/.bzr/repository/')(RepositoryFormatKnitPack1()) and KnitPackRepository('file:///home/erik/ABC/recovery/b/.bzr/repository/')(RepositoryFormatKnitPack1())
0.200 fetching: <PendingAncestryResult heads:frozenset(['<email address hidden>']) repo:KnitPackRepository('file:///home/erik/ABC/recovery/dynappsconnect/.bzr/repository/')>
0.255 Transferred: 0kB (0.0kB/s r:0kB w:0kB)
0.261 Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 946, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 1150, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 699, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 721, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/bzrlib/cleanup.py", line 135, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/bzrlib/cleanup.py", line 165, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/bzrlib/builtins.py", line 1371, in run
    source_branch=br_from)
  File "/usr/lib64/python2.7/site-packages/bzrlib/bzrdir.py", line 453, in sprout
    create_tree_if_local=create_tree_if_local)
  File "/usr/lib64/python2.7/site-packages/bzrlib/cleanup.py", line 131, in run
    self.cleanups, self.func, self, *args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/bzrlib/cleanup.py", line 165, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/bzrlib/bzrdir.py", line 494, in _sprout
    result_repo.fetch(source_repository, fetch_spec=fetch_spec)
  File "/usr/lib64/python2.7/site-packages/bzrlib/repository.py", line 724, in fetch
    find_ghosts=find_ghosts, fetch_spec=fetch_spec)
  File "/usr/lib64/python2.7/site-packages/bzrlib/decorators.py", line 217, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/bzrlib/vf_repository.py", line 2499, in fetch
    find_ghosts=find_ghosts)
  File "/usr/lib64/python2.7/site-packages/bzrlib/fetch.py", line 75, in __init__
    self.__fetch()
  File "/usr/lib64/python2.7/site-packages/bzrlib/fetch.py", line 102, in __fetch
    self._fetch_everything_for_search(search_result)
  File "/usr/lib64/python2.7/site-packages/bzrlib/fetch.py", line 130, in _fetch_everything_for_search
    stream, from_format, [])
  File "/usr/lib64/python2.7/site-packages/bzrlib/vf_repository.py", line 1962, in insert_stream
    src_format, is_resume)
  File "/usr/lib64/python2.7/site-packages/bzrlib/vf_repository.py", line 2030, in insert_stream_without_locking
    substream)
  File "/usr/lib64/python2.7/site-packages/bzrlib/knit.py", line 1588, in insert_record_stream
    for record in stream:
  File "/usr/lib64/python2.7/site-packages/bzrlib/repofmt/knitpack_repo.py", line 539, in _filtered_inv_stream
    for record in stream:
  File "/usr/lib64/python2.7/site-packages/bzrlib/knit.py", line 1395, in get_record_stream
    ordering, include_delta_closure):
  File "/usr/lib64/python2.7/site-packages/bzrlib/knit.py", line 1408, in _get_remaining_record_stream
    build_details = self._index.get_build_details(keys)
  File "/usr/lib64/python2.7/site-packages/bzrlib/knit.py", line 2989, in get_build_details
    for entry in entries:
  File "/usr/lib64/python2.7/site-packages/bzrlib/knit.py", line 3017, in _get_entries
    for node in self._graph_index.iter_entries(keys):
  File "/usr/lib64/python2.7/site-packages/bzrlib/index.py", line 1366, in iter_entries
    for node in index.iter_entries(keys):
  File "/usr/lib64/python2.7/site-packages/bzrlib/index.py", line 677, in iter_entries
    if self._nodes is None and len(keys) * 20 > self.key_count():
  File "/usr/lib64/python2.7/site-packages/bzrlib/index.py", line 786, in key_count
    self._read_and_parse([_HEADER_READV])
  File "/usr/lib64/python2.7/site-packages/bzrlib/index.py", line 1229, in _read_and_parse
    self._buffer_all(StringIO(data))
  File "/usr/lib64/python2.7/site-packages/bzrlib/index.py", line 462, in _buffer_all
    self._read_prefix(stream)
  File "/usr/lib64/python2.7/site-packages/bzrlib/index.py", line 555, in _read_prefix
    raise errors.BadIndexFormatSignature(self._name, GraphIndex)
BadIndexFormatSignature: da15e8553fc8b356d836c78b0eff5e65.iix is not an index of type <class 'bzrlib.index.GraphIndex'>.

0.261 return code 3

Erik Heeren (erik-heeren) said : #4

Is there anything planned around this question / bug? Or is there a way to at least recover the data from this repository?

Can you help with this problem?

Provide an answer of your own, or ask Erik Heeren for more information if necessary.

To post a message you must log in.