Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <4014D541.3030900@mail.ru> Date: Mon, 26 Jan 2004 09:52:17 +0100 From: Ilya Pobelov Organization: ISG-3 User-Agent: Mozilla Thunderbird M5 (20040119) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: [bug] cygwin-1.5.6-1: corruption on tar | bzip2 > file.tar.bz2 RESOLVED References: <401298CB DOT 4030607 AT mail DOT ru> <4013C3B3 DOT 40105 AT mail DOT ru> <20040125170546 DOT GA1594 AT redhat DOT com> In-Reply-To: <20040125170546.GA1594@redhat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, hits=-3.4 required=5.0 tests=IN_REP_TO version=2.31 X-Spam-Level: Christopher Faylor wrote on 25.01.2004 18:05: > If I were you, I would be comparing the difference between the working > and non-working cases, like is the file size different? Thank you very much for a good question, it really helps to resolve my issue. The problem seems to be in -> (0A -> 0D 0A) convertion in pipe after bzip2, which occurs _only if_ option "Default Text File Type" = Dos. I didn't test any other utilities except cat, when it doesn't happend (=everything fine). Here is illustration. Non-working (fresh install, current version, almost minimal, cygwin-1.5.6-1). With option "Default Text File Type" = Dos $ bzip2 -kv gawk.info gawk.info: 4.508:1, 1.774 bits/byte, 77.82% saved, 980691 in, 217521 out. $ bzip2 -tv gawk.info.bz2 gawk.info.bz2: ok $ mv gawk.info.bz2 gawk.info.bz2-correct $ cat gawk.info | bzip2 -v > gawk.info.bz2 (stdin): 4.508:1, 1.774 bits/byte, 77.82% saved, 980691 in, 217521 out. $ bzip2 -tv gawk.info.bz2 gawk.info.bz2: data integrity (CRC) error in data You can use the `bzip2recover' program to attempt to recover data from undamaged sections of corrupted files. $ mv gawk.info.bz2 gawk.info.bz2-broken $ ls -1s --block=1 gawk.info.bz2* 219136 gawk.info.bz2-broken 218112 gawk.info.bz2-correct After comparison of gawk.info.bz2-correct and gawk.info.bz2-broken I found, that all 0A entries in correct file changed to 0D 0A are corrupted. Same installation with option "Default Text File Type" = Unix $ bzip2 -kv gawk.info gawk.info: 4.508:1, 1.774 bits/byte, 77.82% saved, 980691 in, 217521 out. $ bzip2 -tv gawk.info.bz2 gawk.info.bz2: ok $ mv gawk.info.bz2 gawk.info.bz2-correct $ cat gawk.info | bzip2 -v > gawk.info.bz2 (stdin): 4.508:1, 1.774 bits/byte, 77.82% saved, 980691 in, 217521 out. $ bzip2 -tv gawk.info.bz2 gawk.info.bz2: ok $ mv gawk.info.bz2 gawk.info.bz2-piped $ ls -1s --block=1 gawk.info.bz2* 218112 gawk.info.bz2-correct 218112 gawk.info.bz2-piped $ diff gawk.info.bz2-correct gawk.info.bz2-piped $ -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/