Bug 752040 - gzip --list lists wrong information for files > 4 GB
gzip --list lists wrong information for files > 4 GB
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: gzip (Show other bugs)
6.4
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: pstodulk
qe-baseos-daemons
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-11-08 06:55 EST by JJ Keijser
Modified: 2014-07-18 04:23 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-07-18 04:23:29 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description JJ Keijser 2011-11-08 06:55:09 EST
Description of problem:

gzip --list lists wrong information for files > 4 GB


Version-Release number of selected component (if applicable):

gzip --version
gzip 1.3.12
Copyright (C) 2007 Free Software Foundation, Inc.
Copyright (C) 1993 Jean-loup Gailly.
This is free software.  You may redistribute copies of it under the terms of
the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
There is NO WARRANTY, to the extent permitted by law.

Written by Jean-loup Gailly.

How reproducible:

always

Steps to Reproduce:
1. create a .gz file larger than 4 GB (e.g)
2. run 'gzip --list file.gz'
  
Actual results:

$ gzip -l Dpc-209.tar.gz
         compressed        uncompressed  ratio uncompressed_name
         5751209016          3408472064 -68.7% Dpc-209.tar

Expected results:

$ ls -l Dpc-209.tar Dpc-209.tar.gz

-rw-rw-r-- 1 root root 7703439360 Nov  8  2011 Dpc-209.tar
-rw-rw-r-- 1 root root 5751209016 Nov  8  2011 Dpc-209.tar.gz


Additional info:

7703439360 % 32bit = 3408472064

so it looks like an integer32 problem.
This bug was reported originally in 2002!
Comment 2 RHEL Product and Program Management 2011-11-08 07:28:47 EST
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unfortunately unable to
address this request at this time. Red Hat invites you to
ask your support representative to propose this request, if
appropriate and relevant, in the next release of Red Hat
Enterprise Linux. If you would like it considered as an
exception in the current release, please ask your support
representative.
Comment 3 RHEL Product and Program Management 2012-09-07 01:09:40 EDT
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unable to address this
request at this time.

Red Hat invites you to ask your support representative to
propose this request, if appropriate, in the next release of
Red Hat Enterprise Linux.
Comment 4 pstodulk 2014-07-18 04:23:29 EDT
This is not about 32b integer. This output is specified in RFC 1952 [0], where printed original size is "original size modulo 2^32". This problem was discussed in upstream [1, 2]. RFC won't be changed. Only possible solution is implementation of new option, which decompress data and continuosly will calculate and throw decompressed data. Probably I will implement this new feature during next few months (maybe this August). However, it will be still slow solution for really big archives.

I close this, because solution is future feature and RFC specify this as right output.

[0] http://www.ietf.org/rfc/rfc1952.txt
[1] http://lists.gnu.org/archive/html/bug-gzip/2010-08/msg00009.html
[2] http://lists.gnu.org/archive/html/bug-gzip/2014-06/msg00008.html

Note You need to log in before you can comment on or make changes to this bug.