GNU bug report logs - #23314
gzip-1.7-1 regression: cannot redirect output of gzip -l

Previous Next

Package: gzip;

Reported by: Eric Blake <eblake <at> redhat.com>

Date: Tue, 19 Apr 2016 14:05:01 UTC

Severity: normal

Merged with 23315, 23316

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 23314 in the body.
You can then email your comments to 23314 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gzip <at> gnu.org:
bug#23314; Package gzip. (Tue, 19 Apr 2016 14:05:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Eric Blake <eblake <at> redhat.com>:
New bug report received and forwarded. Copy sent to bug-gzip <at> gnu.org. (Tue, 19 Apr 2016 14:05:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Eric Blake <eblake <at> redhat.com>
To: cygwin <at> cygwin.com, bug-gzip <at> gnu.org
Subject: Re: gzip-1.7-1 regression: cannot redirect output of gzip -l
Date: Tue, 19 Apr 2016 08:04:13 -0600
[Message part 1 (text/plain, inline)]
On 04/19/2016 03:49 AM, Christian Franke wrote:
> gzip-1.7-1 reports a write error if result of -l is redirected:
> 
> $ uname -srvm
> CYGWIN_NT-6.1-WOW 2.5.0(0.297/5/3) 2016-04-11 09:55 i686
> 
> $ cygcheck -f /bin/gzip
> gzip-1.7-1
> 
> $ echo text | gzip > text.gz
> 
> $ gzip -l text.gz
>          compressed        uncompressed  ratio uncompressed_name
>                  25                   5 -40.0% text
> 
> $ gzip -l text.gz | cat
> gzip: write error: Bad file descriptor

Thanks for the report; I can confirm the problem exists upstream, so I'm
redirecting your report there.

$ ./gzip -l text.gz | cat
./gzip: write error: Bad file descriptor
$ git describe HEAD
v1.7-2-ga420fba

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

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

Information forwarded to bug-gzip <at> gnu.org:
bug#23314; Package gzip. (Tue, 19 Apr 2016 14:12:02 GMT) Full text and rfc822 format available.

Message #8 received at 23314 <at> debbugs.gnu.org (full text, mbox):

From: Eric Blake <eblake <at> redhat.com>
To: 23314 <at> debbugs.gnu.org
Subject: Re: bug#23314: gzip-1.7-1 regression: cannot redirect output of gzip
 -l
Date: Tue, 19 Apr 2016 08:11:32 -0600
[Message part 1 (text/plain, inline)]
On 04/19/2016 08:04 AM, Eric Blake wrote:

> Thanks for the report; I can confirm the problem exists upstream, so I'm
> redirecting your report there.
> 
> $ ./gzip -l text.gz | cat
> ./gzip: write error: Bad file descriptor
> $ git describe HEAD
> v1.7-2-ga420fba

git bisect blames:

e6516c537071ac28b3e8e12439fbaf54bfe4fbd0 is the first bad commit
commit e6516c537071ac28b3e8e12439fbaf54bfe4fbd0
Author: Paul Eggert <eggert <at> cs.ucla.edu>
Date:   Sat Feb 27 23:58:54 2016 -0800

    gzip: new option --synchronous

    This follows up on the earlier patch to avoid data loss near the
    system crashes.  It makes the new behavior optional, with the
    default off.  See: http://bugs.gnu.org/22768
    * NEWS, doc/gzip.texi (Sample, Invoking gzip), gunzip.in (usage):
    * gzip.1, zcat.in (usage):
    Document this.
    * gzip.c (synchronous): New static var.
    (SYNCHRONOUS_OPTION): New constant.
    (longopts, help, main, treat_file): Add support for --synchronous.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

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

Merged 23314 23315 23316. Request was from Eric Blake <eblake <at> redhat.com> to control <at> debbugs.gnu.org. (Tue, 19 Apr 2016 15:49:01 GMT) Full text and rfc822 format available.

Reply sent to Paul Eggert <eggert <at> cs.ucla.edu>:
You have taken responsibility. (Wed, 20 Apr 2016 00:50:01 GMT) Full text and rfc822 format available.

Notification sent to Eric Blake <eblake <at> redhat.com>:
bug acknowledged by developer. (Wed, 20 Apr 2016 00:50:02 GMT) Full text and rfc822 format available.

Message #15 received at 23314-done <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: 23314-done <at> debbugs.gnu.org, Christian Franke <Christian.Franke <at> t-online.de>
Cc: John Stanley <jpsinthemix <at> verizon.net>, cygwin <at> cygwin.com,
 Giorgio Ciucci <giorgio <at> crcc.it>, Eric Blake <eblake <at> redhat.com>
Subject: Re: bug#23314: gzip-1.7-1 regression: cannot redirect output of gzip
 -l
Date: Tue, 19 Apr 2016 17:49:35 -0700
[Message part 1 (text/plain, inline)]
Thanks for reporting the problem. I installed the attached gzip patch on 
savannah.
[0001-gzip-fix-bug-with-l-output-to-pipes.patch (application/x-patch, attachment)]

Reply sent to Paul Eggert <eggert <at> cs.ucla.edu>:
You have taken responsibility. (Wed, 20 Apr 2016 00:50:02 GMT) Full text and rfc822 format available.

Notification sent to Giorgio Ciucci <giorgio <at> crcc.it>:
bug acknowledged by developer. (Wed, 20 Apr 2016 00:50:02 GMT) Full text and rfc822 format available.

Reply sent to Paul Eggert <eggert <at> cs.ucla.edu>:
You have taken responsibility. (Wed, 20 Apr 2016 00:50:02 GMT) Full text and rfc822 format available.

Notification sent to John Stanley <jpsinthemix <at> verizon.net>:
bug acknowledged by developer. (Wed, 20 Apr 2016 00:50:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gzip <at> gnu.org:
bug#23314; Package gzip. (Wed, 20 Apr 2016 05:33:02 GMT) Full text and rfc822 format available.

Message #28 received at 23314-done <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: 23314-done <at> debbugs.gnu.org
Cc: cygwin <at> cygwin.com, Eric Blake <eblake <at> redhat.com>
Subject: Re: bug#23314: gzip-1.7-1 regression: cannot redirect output of gzip
 -l
Date: Tue, 19 Apr 2016 22:32:35 -0700
[Message part 1 (text/plain, inline)]
Come to think of it, that part of gzip can be simplified considerably, which 
should make future problems like this less likely. I installed the attached 
additional patch. Yay, 46 fewer files in the gzip tarball!

[0001-gzip-simplify-by-closing-ourselves.patch (text/x-diff, attachment)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 20 May 2016 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 7 years and 342 days ago.

Previous Next


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