bzr crashed with ShortReadvError in _seek_and_read()
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Confirmed
|
High
|
Vincent Ladeuil | ||
bzr (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: bzr
My bzr metadata has somehow become corrupted making any bzr operations fail with a crash like that submitted (although bzr status returns fine).
The doing md5sum on the files in packs/ gives me one file with an incorrect name (that given by 4d46aaa30ce4a05
To fail like this is pretty serious. How much of the version data is lost? Is there any way to revert it? It seems the data itself is fine, so its not a catastrophe, but I'm currently unable to commit changes.
ProblemType: Crash
DistroRelease: Ubuntu 10.10
Package: bzr 2.2.1-0ubuntu1
Uname: Linux 2.6.36-
Architecture: amd64
BzrDebugFlags: set()
BzrPlugins:
bash_completion /usr/lib/
bzrtools /usr/lib/
launchpad /usr/lib/
netrc_
news_merge /usr/lib/
BzrVersion: 2.2.1
CommandLine: ['/usr/bin/bzr', 'commit', '-m', 'not sure']
CrashDb: bzr
Date: Wed Jan 5 19:14:29 2011
ExecutablePath: /usr/bin/bzr
FileSystemEncoding: UTF-8
InstallationMedia: Ubuntu 10.04 "Lucid Lynx" - Beta amd64 (20100318)
InterpreterPath: /usr/bin/python2.6
Locale: en_GB.utf8
Platform: Linux-2.
ProcCmdline: /usr/bin/python /usr/bin/bzr commit -m not\ sure
ProcEnviron:
SHELL=/bin/bash
LANG=en_GB.utf8
PythonVersion: 2.6.6
SourcePackage: bzr
Title: bzr crashed with ShortReadvError in _seek_and_read()
UserEncoding: UTF-8
UserGroups: adm admin cdrom daemon dialout lpadmin plugdev sambashare
tags: | removed: need-duplicate-check |
visibility: | private → public |
Changed in bzr (Ubuntu): | |
status: | New → Confirmed |
Changed in bzr: | |
status: | New → Confirmed |
importance: | Undecided → High |
As seen in the ML thread, this is caused by an empty pack file.
The attached script will help restore the *repository* in a working state (by getting rid of the reference to the empty pack file) but will not fix any branch that refer to it (nor restore its content which is lost for good :-/).
Fixing the branch itself can be achieved while keeping the changes in the working tree and committing again which will create a new pack file.
To get there:
- create a branch based on a valid revision,
- copy the 'last-revision' file in '.bzr/branch' from the good branch to the broken one
- 'bzr st' and 'bzr diff' should show you the uncommitted changes