Bug 752040

Summary: gzip --list lists wrong information for files > 4 GB
Product: Red Hat Enterprise Linux 6 Reporter: JJ Keijser <jan.just.keijser>
Component: gzipAssignee: Petr Stodulka <pstodulk>
Status: CLOSED NOTABUG QA Contact: qe-baseos-daemons
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.4CC: ondrej.valousek, syeghiay
Target Milestone: rcKeywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-07-18 08:23:29 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description JJ Keijser 2011-11-08 11:55:09 UTC
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 Program Management 2011-11-08 12:28:47 UTC
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 Program Management 2012-09-07 05:09:40 UTC
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 Petr Stodulka 2014-07-18 08:23:29 UTC
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

Comment 5 Petr Stodulka 2017-04-18 14:18:31 UTC
*** Bug 1443125 has been marked as a duplicate of this bug. ***