bazaar corruption causing crash

Henry Gomersall heng at cantab.net
Thu Jan 6 18:54:48 UTC 2011


On Thu, 2011-01-06 at 17:35 +0100, Vincent Ladeuil wrote:
> >>>>> Henry Gomersall <heng at cantab.net> writes:
> 
> 
>     > I submitted the problem as a bug report (697815), but its seriously
>     > stalling me so I am keen to get feedback on how I can get my repository
>     > up and running again.
> 
> You made the bug private and I can't access it.

Its public now.

> 
>     > My bzr metadata has somehow become corrupted making any bzr operations
>     > fail with a crash like that submitted (although bzr status returns
>     > fine).
> 
>     > Doing md5sum on the files in packs/ gives me one file with an incorrect
>     > name (that given by 4d46aaa30ce4a05d9a71342fb858bfe7.pack with the same
>     > name as the .rix file referenced in the bug report).
> 
> If md5sum gives you a number different than the file name, you have a
> serious problem: the name is defined by the file content md5sum,
> i.e. the file is created under a temporary name, its md5 sum calculated
> and the file renamed with it. bzr *never* change the content of the file
> after its creation.
> 
> So either you have a dying hard drive or you had a crash corrupting your
> file system.
> 

I have had a fairly flaky system lately. I assumed it was the kernel but
its possible that my (less than a year old) hard drive is dying. Running
a full SMART self-test now (the short one did not fail).

>     > To fail like this is pretty serious.
> 
> Indeed. What OS/file system are you using, did you experience crashes
> lately ?
> 

Its Ubuntu 10.10 on ext4. As I said, yes, some crashes recently. No idea
what is causing them though. Could it have been a crash of any kind that
buggers up a commit?

>     > How much of the version data is lost?
> 
> The content of the pack file itself, so depending on its size one or
> several revisions.
> 
>     > Is there any way to revert it?
> 
> If the revisions have been pushed elsewhere (or pulled from elsewhere),
> yes.
> 
> First you need to get rid of the broken pack file and repair the
> repository. There are various ways to do it but we'll need more details
> first like:
> - ls -lR .bzr
> - bzr dump-btree ./bzr/repository/pack-names

Nope, that was the only place. The version information is actually *not
that* important (its pretty early stage).

(('42400c555867e468de8490632553f9cb',), '152 152 384 72 185', None)
(('4d46aaa30ce4a05d9a71342fb858bfe7',), '179 178 783 72 189', None)
(('69baf7e719c10bb8242de0f262add1ed',), '175 176 418 72 187', None)
(('a330f43803baa120bc317c045c1334a5',), '173 175 201 72 186', None)
(('c3312e133c78109d27af049e1e71f44c',), '181 181 1728 72 189', None)
(('e5f41a382e51400a59ad8b950a36ce7b',), '179 180 779 72 186', None)

the output from `ls -lR .bzr` is attached.

> If it's your hard disk dying, get a new one :-/
> 

Indeed. :)

Many thanks,

Henry

-------------- next part --------------
.bzr:
total 24
drwxr-xr-x 3 whg21 whg21 4096 2010-12-04 19:35 branch
-rw-r--r-- 1 whg21 whg21   35 2010-10-20 16:54 branch-format
drwxr-xr-x 2 whg21 whg21 4096 2010-10-20 16:54 branch-lock
drwxr-xr-x 3 whg21 whg21 4096 2010-10-20 16:54 checkout
-rw-r--r-- 1 whg21 whg21  141 2010-10-20 16:54 README
drwxr-xr-x 7 whg21 whg21 4096 2011-01-06 15:09 repository

.bzr/branch:
total 12
-rw-r--r-- 1 whg21 whg21    0 2010-10-20 16:54 branch.conf
-rw-r--r-- 1 whg21 whg21   39 2010-10-20 16:54 format
-rw-r--r-- 1 whg21 whg21   50 2010-12-04 19:35 last-revision
drwxr-xr-x 2 whg21 whg21 4096 2011-01-06 15:15 lock
-rw-r--r-- 1 whg21 whg21    0 2010-10-20 16:54 tags

.bzr/branch/lock:
total 0

.bzr/branch-lock:
total 0

.bzr/checkout:
total 36
-rw-r--r-- 1 whg21 whg21    27 2010-10-20 16:54 conflicts
-rw-r--r-- 1 whg21 whg21 21953 2011-01-06 14:40 dirstate
-rw-r--r-- 1 whg21 whg21    40 2010-10-20 16:54 format
drwxr-xr-x 2 whg21 whg21  4096 2011-01-06 15:15 lock
-rw-r--r-- 1 whg21 whg21     0 2010-10-20 16:54 views

.bzr/checkout/lock:
total 0

.bzr/repository:
total 28
-rw-r--r-- 1 whg21 whg21   54 2010-10-20 16:54 format
drwxr-xr-x 2 whg21 whg21 4096 2011-01-06 15:09 indices
drwxr-xr-x 2 whg21 whg21 4096 2010-12-04 19:35 lock
drwxr-xr-x 2 whg21 whg21 4096 2010-10-20 16:54 obsolete_packs
-rw-r--r-- 1 whg21 whg21  277 2010-12-04 19:35 pack-names
drwxr-xr-x 2 whg21 whg21 4096 2011-01-06 15:09 packs
drwxr-xr-x 2 whg21 whg21 4096 2010-12-04 19:35 upload

.bzr/repository/indices:
total 100
-rw-r--r-- 1 whg21 whg21  185 2010-10-20 16:55 42400c555867e468de8490632553f9cb.cix
-rw-r--r-- 1 whg21 whg21  152 2010-10-20 16:55 42400c555867e468de8490632553f9cb.iix
-rw-r--r-- 1 whg21 whg21  152 2010-10-20 16:55 42400c555867e468de8490632553f9cb.rix
-rw-r--r-- 1 whg21 whg21   72 2010-10-20 16:55 42400c555867e468de8490632553f9cb.six
-rw-r--r-- 1 whg21 whg21  384 2010-10-20 16:55 42400c555867e468de8490632553f9cb.tix
-rw-r--r-- 1 whg21 whg21    0 2010-12-04 19:35 4d46aaa30ce4a05d9a71342fb858bfe7.cix
-rw-r--r-- 1 whg21 whg21    0 2010-12-04 19:35 4d46aaa30ce4a05d9a71342fb858bfe7.iix
-rw-r--r-- 1 whg21 whg21    0 2010-12-04 19:35 4d46aaa30ce4a05d9a71342fb858bfe7.rix
-rw-r--r-- 1 whg21 whg21    0 2010-12-04 19:35 4d46aaa30ce4a05d9a71342fb858bfe7.six
-rw-r--r-- 1 whg21 whg21    0 2010-12-04 19:35 4d46aaa30ce4a05d9a71342fb858bfe7.tix
-rw-r--r-- 1 whg21 whg21  187 2010-12-02 18:56 69baf7e719c10bb8242de0f262add1ed.cix
-rw-r--r-- 1 whg21 whg21  176 2010-12-02 18:56 69baf7e719c10bb8242de0f262add1ed.iix
-rw-r--r-- 1 whg21 whg21  175 2010-12-02 18:56 69baf7e719c10bb8242de0f262add1ed.rix
-rw-r--r-- 1 whg21 whg21   72 2010-12-02 18:56 69baf7e719c10bb8242de0f262add1ed.six
-rw-r--r-- 1 whg21 whg21  418 2010-12-02 18:56 69baf7e719c10bb8242de0f262add1ed.tix
-rw-r--r-- 1 whg21 whg21  186 2010-11-25 18:18 a330f43803baa120bc317c045c1334a5.cix
-rw-r--r-- 1 whg21 whg21  175 2010-11-25 18:18 a330f43803baa120bc317c045c1334a5.iix
-rw-r--r-- 1 whg21 whg21  173 2010-11-25 18:18 a330f43803baa120bc317c045c1334a5.rix
-rw-r--r-- 1 whg21 whg21   72 2010-11-25 18:18 a330f43803baa120bc317c045c1334a5.six
-rw-r--r-- 1 whg21 whg21  201 2010-11-25 18:18 a330f43803baa120bc317c045c1334a5.tix
-rw-r--r-- 1 whg21 whg21  189 2010-11-25 18:00 c3312e133c78109d27af049e1e71f44c.cix
-rw-r--r-- 1 whg21 whg21  181 2010-11-25 18:00 c3312e133c78109d27af049e1e71f44c.iix
-rw-r--r-- 1 whg21 whg21  181 2010-11-25 18:00 c3312e133c78109d27af049e1e71f44c.rix
-rw-r--r-- 1 whg21 whg21   72 2010-11-25 18:00 c3312e133c78109d27af049e1e71f44c.six
-rw-r--r-- 1 whg21 whg21 1728 2010-11-25 18:00 c3312e133c78109d27af049e1e71f44c.tix
-rw-r--r-- 1 whg21 whg21  186 2010-12-01 18:36 e5f41a382e51400a59ad8b950a36ce7b.cix
-rw-r--r-- 1 whg21 whg21  180 2010-12-01 18:36 e5f41a382e51400a59ad8b950a36ce7b.iix
-rw-r--r-- 1 whg21 whg21  179 2010-12-01 18:36 e5f41a382e51400a59ad8b950a36ce7b.rix
-rw-r--r-- 1 whg21 whg21   72 2010-12-01 18:36 e5f41a382e51400a59ad8b950a36ce7b.six
-rw-r--r-- 1 whg21 whg21  779 2010-12-01 18:36 e5f41a382e51400a59ad8b950a36ce7b.tix

.bzr/repository/lock:
total 0

.bzr/repository/obsolete_packs:
total 0

.bzr/repository/packs:
total 124
-rw-r--r-- 1 whg21 whg21  4723 2010-10-20 16:55 42400c555867e468de8490632553f9cb.pack
-rw-r--r-- 1 whg21 whg21     0 2010-12-04 19:35 4d46aaa30ce4a05d9a71342fb858bfe7.pack
-rw-r--r-- 1 whg21 whg21 11301 2010-12-02 18:56 69baf7e719c10bb8242de0f262add1ed.pack
-rw-r--r-- 1 whg21 whg21  4581 2010-11-25 18:18 a330f43803baa120bc317c045c1334a5.pack
-rw-r--r-- 1 whg21 whg21 75019 2010-11-25 18:00 c3312e133c78109d27af049e1e71f44c.pack
-rw-r--r-- 1 whg21 whg21 16455 2010-12-01 18:36 e5f41a382e51400a59ad8b950a36ce7b.pack

.bzr/repository/upload:
total 0


More information about the bazaar mailing list