Subject: Re: bzip2 data corruption
To: Ingolf Koch , Simon Burge <simonb@netbsd.org>
From: Gary Duzan <gary@wheel.tiac.net>
List: current-users
Date: 11/02/1999 09:43:58
In Message <19991102134041.D1437@djo-jena.de> ,
   Ingolf Koch <ingolf@djo-jena.de> wrote:

=>On Tue, Nov 02, 1999 at 01:24:48PM +0100, Bjoern Labitzke wrote:
=>> It seems there is really some kind of bug.
=>
=>I had the same problem a few weeks ago on a -current
=>NetBSD/sparc machine when decompressing archives which
=>were compressed on a Linux/i386 bzip2.
=>
=>So this might indicate that the bug (or better say "one of
=>the bugs") is in the NetBSD decompression part...
=>
=>    Ingolf

   This matches what I'm seeing. bunzip2 complains on NetBSD/i386
Athlon and Pentium II, but not AIX or FreeBSD 4.0-RELEASE. For
example, with "lion" being an IBM 43P running AIX 4.2.1 and "duzanmac"
(a misnomer) being a Pentium II 300 running NetBSD/i386 1.4L:

---------------------------------------------------------------------------
gdd0@lion { ~ } % bzip2 < bug3.tar | rsh duzanmac bunzip2 -tvv
  (stdin): 
    [1: huff+mtf 
(stdin): data integrity (CRC) error in data

You can use the `bzip2recover' program to *attempt* to recover
data from undamaged sections of corrupted files.

gdd0@lion { ~ } % 
---------------------------------------------------------------------------
gdd0@duzanmac { ~ } % bzip2 < bug3.tar | rsh lion /usr/local/bin/bunzip2 -tvv
  (stdin): 
    [1: huff+mtf rt+rld]
    [2: huff+mtf rt+rld]
    [3: huff+mtf rt+rld]
    [4: huff+mtf rt+rld]
    [5: huff+mtf rt+rld]
    [6: huff+mtf rt+rld]
    [7: huff+mtf rt+rld]
    [8: huff+mtf rt+rld]
    [9: huff+mtf rt+rld]
    [10: huff+mtf rt+rld]
    [11: huff+mtf rt+rld]
    [12: huff+mtf rt+rld]
    [13: huff+mtf rt+rld]
    [14: huff+mtf rt+rld]
    [15: huff+mtf rt+rld]
    [16: huff+mtf rt+rld]
    [17: huff+mtf rt+rld]
    [18: huff+mtf rt+rld]
    [19: huff+mtf rt+rld]
    [20: huff+mtf rt+rld]
    [21: huff+mtf rt+rld]
    ok
gdd0@duzanmac { ~ } % 
---------------------------------------------------------------------------

The bug3.tar file in question can be picked up at
< http://www.ccs.neu.edu/home/duzan/bug3.tar >.

					Gary D. Duzan