ShortReadvError on index file
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Confirmed
|
High
|
Unassigned | ||
Breezy |
Triaged
|
High
|
Unassigned |
Bug Description
Summary:
You may encounter a message like this:
bzr: ERROR: bzrlib.
(This is distinct from the similar bug 413430 where the filename is ends in 'pack').
As far as we know, this is always caused by the file being truncated on disk outside of bzr's control. ext4 seems very prone to do this when a machine crashes or is abruptly halted.
However, it is a bug in bzr that the message is opaque and that there's no easy way out.
The shortest workaround if you hit this case is:
1- make a new repository directory
2- branch your main branches (trunk etc) into it, either from a backup or another copy of those branches; this will repopulate most of history
3- you should then be able to branch particular newly-changed branches into the new repository too
As a fix for this we could do any of:
1- try to force files to disk after writing
2- teach check to detect this situation and rebuild index files
...
bash-3.2$ bzr commit -m "Mach compiler improvements, Bfly recv takes an optional argument for the received message"
Committing to: /Volumes/
modified Butterfly/
modified Butterfly/
modified Butterfly/
modified Butterfly/
modified Butterfly/
modified Butterfly/
modified Butterfly/
modified Okeanos/
modified Okeanos/
modified tools/useful-
Traceback (most recent call last):
File "/Library/
return the_callable(*args, **kwargs)
File "/Library/
ret = run(*run_argv)
File "/Library/
return self.run(
File "/Library/
exclude=
File "/Library/
result = unbound(self, *args, **kwargs)
File "/Library/
result = WorkingTree3.
File "/Library/
result = unbound(self, *args, **kwargs)
File "/Library/
*args, **kwargs)
File "/Library/
self.
File "/Library/
self.
File "/Library/
find_
File "/Library/
result = unbound(self, *args, **kwargs)
File "/Library/
return self._pack(
File "/Library/
revision_
File "/Library/
return self._create_
File "/Library/
new_
File "/Library/
index.
File "/Library/
k for (idx, k, v, r) in
File "/Library/
for node in index.iter_
File "/Library/
self.
File "/Library/
search_results = content_
File "/Library/
self.
File "/Library/
for offset, data in readv_data:
File "/Library/
c_offset.
ShortReadvError: readv() read 268 bytes rather than 4096 bytes at 171764 for "d0580144782295
bzr 1.16.1 on python 2.5.1 (darwin)
arguments: ['/usr/
encoding: 'UTF-8', fsenc: 'utf-8', lang: 'en_US.UTF-8'
plugins:
bzrtools /Library/
email /Library/
extmerge /Library/
launchpad /Library/
loom /Library/
netrc_
qbzr /Library/
rebase /Library/
search /Library/
svn /Library/
*** Bazaar has encountered an internal error.
Please report a bug at https:/
including this traceback, and a description of what you
were doing when the error occurred.
description: | updated |
tags: | added: data-integrity |
tags: | added: ui |
tags: | added: check-for-breezy |
tags: | removed: check-for-breezy |
Changed in brz: | |
status: | New → Triaged |
importance: | Undecided → High |
tags: | added: bzr-format |
The on-disk index file is apparently truncated. Could you please attach it to this bug and we can see if that is true?