bzr crashes on pull

Bug #655371 reported by Sven Oostenbrink
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
New
Undecided
Unassigned

Bug Description

bzr pull ../path from a sister repository caused bzr to crash. pulling again works normally.. This crash happens every so often without leaving any problems..

Revision history for this message
Sven Oostenbrink (so-oostenbrink) wrote :
Revision history for this message
Sven Oostenbrink (so-oostenbrink) wrote :

Correction, it keeps popping up for this repository.. pushing or pulling gives me this error

bzr: ERROR: bzrlib.errors.ShortReadvError: readv() read 0 bytes rather than 169 bytes at 0 for "c11dbecfe3a92f616a9be65a0f2b099f.rix"

with the same crash file..

Revision history for this message
Martin Pool (mbp) wrote :

Hi Sven,

This means one of the bzr repository files has been truncated to 0 bytes. This typically happens because of a machine crash or filesystem error beyond bzr's control.

To fix this you should be able to:
1- make a backup of the whole repository
2- move the c11dbecfe3a92f616a9be65a0f2b099f pack and index files out of the repository
3- run 'bzr pack'

I also filed bug 655503 for this.

Revision history for this message
Sven Oostenbrink (so-oostenbrink) wrote : Re: [Bug 655371] Re: bzr crashes on pull

Problem is that my machine crashed, yes, and since I have ext4, the data was
not flushed, files were emtpy. As I understand it, these are index files,
can't they, somehow, be regenerated again when empty / missing / corrupted ?

Cheers

Sven

On Wed, Oct 6, 2010 at 1:01 AM, Martin Pool <email address hidden> wrote:

> *** This bug is a duplicate of bug 655503 ***
> https://bugs.launchpad.net/bugs/655503
>
> Hi Sven,
>
> This means one of the bzr repository files has been truncated to 0
> bytes. This typically happens because of a machine crash or filesystem
> error beyond bzr's control.
>
> To fix this you should be able to:
> 1- make a backup of the whole repository
> 2- move the c11dbecfe3a92f616a9be65a0f2b099f pack and index files out of
> the repository
> 3- run 'bzr pack'
>
> I also filed bug 655503 for this.
>
> ** This bug has been marked a duplicate of bug 655503
> need automatic recovery from truncated pack/index files
> * You can subscribe to bug 655503 by following this link:
> https://bugs.edge.launchpad.net/bzr/+bug/655503/+subscribe
>
> --
> bzr crashes on pull
> https://bugs.launchpad.net/bugs/655371
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in Bazaar Version Control System: New
>
> Bug description:
> bzr pull ../path from a sister repository caused bzr to crash. pulling
> again works normally.. This crash happens every so often without leaving any
> problems..
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/bzr/+bug/655371/+subscribe
>

Revision history for this message
Martin Pool (mbp) wrote :

John may correct me, but I think there is graph data in the indexes
that can't be recreated from the pack files. In theory we might
rebuild it using the reconcile code to work out what it should be, but
I don't think that's supported.

Revision history for this message
Vincent Ladeuil (vila) wrote :

I hope we don't have anything in the indexes that can't be recreated from the packs...

Anyway, about the empty pack files, here is a very crude script (you need to edit it to be able to use it in your case) that we should polish and include in bzr:

#!/usr/bin/env python
"""Repair a repo with an empty pack file.
"""

from bzrlib import repository, btree_index, transport

t = transport.get_transport('/repo/.bzr/repository')
pn_index = btree_index.BTreeGraphIndex(t, 'pack-names', None)
nodes = pn_index.iter_all_entries()

new_index = btree_index.BTreeBuilder(0, 1)

for _, key, value in nodes:
  if key == ('128bb4cf175c5a51a7c4802f09d55b8d',):
    continue
  new_index.add_node(key, value)

new_index_content = new_index.finish()
t.put_file('pack-names', new_index_content)

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.