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

version graph

Package: gzip; Maintainer for gzip is Bdale Garbee <>; Source for gzip is src:gzip.

Reported by: Jakub Wilk <>

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 <>

Bug is archived. No further changes may be made.

Full log

Message #55 received at (full text, mbox):

Received: (at 647522) by; 8 Feb 2012 11:36:37 +0000
From Wed Feb 08 11:36:37 2012
X-Spam-Checker-Version: SpamAssassin 3.3.1-bugs.debian.org_2005_01_02
	(2010-03-16) on
X-Spam-Status: No, score=-11.9 required=4.0 tests=BAYES_00,FOURLA,
	autolearn=ham version=3.3.1-bugs.debian.org_2005_01_02
X-Spam-Bayes: score:0.0000 Tokens: new, 19; hammy, 151; neutral, 64; 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: <>
Received: from ([])
	by with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.72)
	(envelope-from <>)
	id 1Rv5ot-0008VH-1f
	for; Wed, 08 Feb 2012 11:36:30 +0000
Received: from [2a01:e35:2ec8:9d70:21e:64ff:fe0e:9a16] (
	by with esmtp (Exim 4.72)
	(envelope-from <>)
	id 1Rv5o1-0004Yr-F7; Wed, 08 Feb 2012 12:35:21 +0100
Received: from kibi by with local (Exim 4.77)
	(envelope-from <>)
	id 1Rv5oo-0007fu-N6; Wed, 08 Feb 2012 12:36:10 +0100
Date: Wed, 8 Feb 2012 12:36:10 +0100
From: Cyril Brulebois <>
To: Zack Weinberg <>,
Cc:, Riku Voipio <>
Subject: Re: Bug#647522: non-deterministic compression results with gzip -n9
Message-ID: <>
References: <>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="KsGdsel6WgEHnImy"
Content-Disposition: inline
In-Reply-To: <>
Organization: Debian
User-Agent: Mutt/1.5.21 (2010-09-15)
[Message part 1 (text/plain, inline)]
Zack Weinberg <> (07/02/2012):
> I've seen inexplicable nondeterminism like this before, and quite
> often it's turned out to be controlled by the total size of the
> command line argument area (that is, argv + environ + ELF auxv).

FWIW, a quick look on kfreebsd-amd64 with ppl's CREDITS file led me to:
  gzip -9nf CREDITS → 6343 bytes

running dh_installdocs && dh_compress with DH_VERBOSE, I noticed the
following command line:
  gzip -9nf README CREDITS
and the result → 6344 bytes.

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.

[signature.asc (application/pgp-signature, inline)]

Send a report that this bug log contains spam.

Debian bug tracking system administrator <>. Last modified: Thu Apr 17 18:58:31 2014; Machine Name:

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