Debian Bug report logs - #647522
gzip -9n is not deterministic

version graph

Package: gzip; Maintainer for gzip is Bdale Garbee <bdale@gag.com>; Source for gzip is src:gzip.

Reported by: Jakub Wilk <jwilk@debian.org>

Date: Thu, 3 Nov 2011 14:48:02 UTC

Severity: normal

Found in version gzip/1.4-1

Fixed in version gzip/1.4-5

Done: Bdale Garbee <bdale@gag.com>

Bug is archived. No further changes may be made.

Full log


Message #60 received at 647522@bugs.debian.org (full text, mbox):

Received: (at 647522) by bugs.debian.org; 8 Feb 2012 12:47:23 +0000
From kibi@mraw.org Wed Feb 08 12:47:23 2012
X-Spam-Checker-Version: SpamAssassin 3.3.1-bugs.debian.org_2005_01_02
	(2010-03-16) on busoni.debian.org
X-Spam-Level: 
X-Spam-Status: No, score=-11.4 required=4.0 tests=BAYES_00,FOURLA,
	FROMDEVELOPER,HAS_BUG_NUMBER,IMPRONONCABLE_2,MONEY,MURPHY_DRUGS_REL8,
	PGPSIGNATURE,STOCKLIKE autolearn=ham version=3.3.1-bugs.debian.org_2005_01_02
X-Spam-Bayes: score:0.0000 Tokens: new, 45; hammy, 151; neutral, 137; spammy,
	0. spammytokens: hammytokens:0.000-+--H*o:Debian, 0.000-+--H*r:2a01,
	0.000-+--H*F:U*kibi, 0.000-+--KiBi, 0.000-+--H*rp:U*kibi
Return-path: <kibi@mraw.org>
Received: from glenfiddich.mraw.org ([88.191.124.82])
	by busoni.debian.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.72)
	(envelope-from <kibi@mraw.org>)
	id 1Rv6vV-0005kx-25
	for 647522@bugs.debian.org; Wed, 08 Feb 2012 12:47:12 +0000
Received: from [2a01:e35:2ec8:9d70:21e:64ff:fe0e:9a16] (helo=bowmore.home.mraw.org)
	by glenfiddich.mraw.org with esmtp (Exim 4.72)
	(envelope-from <kibi@mraw.org>)
	id 1Rv6Pb-0005SR-AE; Wed, 08 Feb 2012 13:14:11 +0100
Received: from kibi by bowmore.home.mraw.org with local (Exim 4.77)
	(envelope-from <kibi@bowmore.home.mraw.org>)
	id 1Rv6QO-00006u-Oa; Wed, 08 Feb 2012 13:15:00 +0100
Date: Wed, 8 Feb 2012 13:15:00 +0100
From: Cyril Brulebois <kibi@debian.org>
To: Zack Weinberg <zackw@panix.com>, 647522@bugs.debian.org
Cc: bug-gzip@gnu.org, Riku Voipio <riku.voipio@iki.fi>
Subject: Re: Bug#647522: non-deterministic compression results with gzip -n9
Message-ID: <20120208121500.GA32241@mraw.org>
References: <CAKCAbMgWzxjeKJdErDK7Vud4uPuh8_eC-4zG7nC6EU44_hdXyg@mail.gmail.com>
 <20120208113610.GA29106@mraw.org>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="/WwmFnJnmDyWGHa4"
Content-Disposition: inline
In-Reply-To: <20120208113610.GA29106@mraw.org>
Organization: Debian
User-Agent: Mutt/1.5.21 (2010-09-15)
[Message part 1 (text/plain, inline)]
Cyril Brulebois <kibi@debian.org> (08/02/2012):
> Playing on amd64:
> cbrulebois@Cygnus:/tmp/ppl-0.11.2$ cp ../ppl-pristine/{CREDITS,README} .
> cbrulebois@Cygnus:/tmp/ppl-0.11.2$ gzip -9nf CREDITS README
> cbrulebois@Cygnus:/tmp/ppl-0.11.2$ ls -l *gz
> -rw-r--r-- 1 cbrulebois cbrulebois 6343 Feb  8 12:34 CREDITS.gz
> -rw-r--r-- 1 cbrulebois cbrulebois 8745 Feb  8 12:34 README.gz
> cbrulebois@Cygnus:/tmp/ppl-0.11.2$ cp ../ppl-pristine/{CREDITS,README} .
> cbrulebois@Cygnus:/tmp/ppl-0.11.2$ gzip -9nf README CREDITS
> cbrulebois@Cygnus:/tmp/ppl-0.11.2$ ls -l *gz
> -rw-r--r-- 1 cbrulebois cbrulebois 6344 Feb  8 12:34 CREDITS.gz
> -rw-r--r-- 1 cbrulebois cbrulebois 8745 Feb  8 12:34 README.gz
> 
> It looks to me like it shouldn't be hard to figure out what happens here
> given the few tests I performed with the above command lines. On a few
> iterations, reproducibility (with a given input command line) doesn't
> seem to be an issue.

I think at least the attached patch won't hurt (when the DYN_ALLOC part
is fixed; and possibly turning that into a MEMSET-like macro).

And given dh_compress is passing files in an arbitrary order (it's using
“find” to detect files which needs to be compressed), I think we have
an explanation about the apparently-hard-to-reproduce issues.

Mraw,
KiBi.
[gzip-zeroify-buffers.diff (text/x-diff, attachment)]
[signature.asc (application/pgp-signature, inline)]

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Fri Apr 18 22:01:17 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.