Debian Bug report logs - #533356
tar: broken behaviour with input/output pipe and compression

version graph

Package: tar; Maintainer for tar is Bdale Garbee <bdale@gag.com>; Source for tar is src:tar (PTS, buildd, popcon).

Reported by: Petr Salinger <Petr.Salinger@seznam.cz>

Date: Tue, 16 Jun 2009 19:33:04 UTC

Severity: important

Tags: fixed-upstream, patch

Found in version tar/1.22-1

Fixed in version 1.23-3

Done: Petr Salinger <Petr.Salinger@seznam.cz>

Bug is archived. No further changes may be made.

Forwarded to bug-tar@gnu.org

Toggle useless messages

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


Report forwarded to debian-bugs-dist@lists.debian.org, Bdale Garbee <bdale@gag.com>:
Bug#533356; Package tar. (Tue, 16 Jun 2009 19:33:07 GMT) (full text, mbox, link).


Acknowledgement sent to Petr Salinger <Petr.Salinger@seznam.cz>:
New Bug report received and forwarded. Copy sent to Bdale Garbee <bdale@gag.com>. (Tue, 16 Jun 2009 19:33:07 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Petr Salinger <Petr.Salinger@seznam.cz>
To: submit@bugs.debian.org
Subject: tar: broken behaviour with input/output pipe and compression
Date: Tue, 16 Jun 2009 21:58:16 +0200 (CEST)
Package: tar
Severity: important
Version: 1.22-1
Tags: patch
User: glibc-bsd-devel@lists.alioth.debian.org
Usertags: kfreebsd

Hi,

the current version of tar breaks build of gcj-4.4 on GNU/kFreeBSD.

https://buildd.debian.org/fetch.cgi?&pkg=gcj-4.4&ver=4.4.0-6j1&arch=kfreebsd-amd64&stamp=1245000137&file=log:

	uudecode -o - java-classes.tgz.uue | tar -C src -xvz
	libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main.class
	sbuild received SIGPIPE -- shutting down

It looks like related to #525437, #532570, #525818.

The problem appears when a grandchild tar is used.
In the "child_pid", the child_pid is zero, the kill() signals
every process in the process group of the calling process
instead of themselves.

Please apply patch bellow, it would also be nice
if you can inform upstream about this issue.

Thanks in advance

                        Petr

--- src/system.c~       2009-03-29 05:23:17.000000000 +0200
+++ src/system.c        2009-06-16 21:11:20.000000000 +0200
@@ -435,7 +435,7 @@

   if (WIFSIGNALED (wait_status))
     {
-      kill (child_pid, WTERMSIG (wait_status));
+      kill (getpid(), WTERMSIG (wait_status));
       exit_status = TAREXIT_FAILURE;
     }
   else if (WEXITSTATUS (wait_status) != 0)
@@ -573,7 +573,7 @@

   if (WIFSIGNALED (wait_status))
     {
-      kill (child_pid, WTERMSIG (wait_status));
+      kill (getpid(), WTERMSIG (wait_status));
       exit_status = TAREXIT_FAILURE;
     }
   else if (WEXITSTATUS (wait_status) != 0)





Tags added: fixed-upstream Request was from Petr Salinger <Petr.Salinger@seznam.cz> to control@bugs.debian.org. (Thu, 18 Jun 2009 11:24:15 GMT) (full text, mbox, link).


Reply sent to Bdale Garbee <bdale@gag.com>:
You have marked Bug as forwarded. (Sat, 20 Jun 2009 15:51:06 GMT) (full text, mbox, link).


Message #10 received at 533356-forwarded@bugs.debian.org (full text, mbox, reply):

From: Bdale Garbee <bdale@gag.com>
To: bug-tar@gnu.org
Cc: 533356-forwarded@bugs.debian.org
Subject: [Fwd: Bug#533356: tar: broken behaviour with input/output pipe and compression]
Date: Sat, 20 Jun 2009 09:49:28 -0600
[Message part 1 (text/plain, inline)]
Please see the attached proposed patch from Petr Salinger.  Looks
reasonable to me... your thoughts?

Bdale

[Message part 2 (message/rfc822, inline)]
From: Petr Salinger <Petr.Salinger@seznam.cz>
To: submit@bugs.debian.org
Subject: Bug#533356: tar: broken behaviour with input/output pipe and compression
Date: Tue, 16 Jun 2009 21:58:16 +0200 (CEST)
Package: tar
Severity: important
Version: 1.22-1
Tags: patch
User: glibc-bsd-devel@lists.alioth.debian.org
Usertags: kfreebsd

Hi,

the current version of tar breaks build of gcj-4.4 on GNU/kFreeBSD.

https://buildd.debian.org/fetch.cgi?&pkg=gcj-4.4&ver=4.4.0-6j1&arch=kfreebsd-amd64&stamp=1245000137&file=log:

	uudecode -o - java-classes.tgz.uue | tar -C src -xvz
	libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main.class
	sbuild received SIGPIPE -- shutting down

It looks like related to #525437, #532570, #525818.

The problem appears when a grandchild tar is used.
In the "child_pid", the child_pid is zero, the kill() signals
every process in the process group of the calling process
instead of themselves.

Please apply patch bellow, it would also be nice
if you can inform upstream about this issue.

Thanks in advance

                        Petr

--- src/system.c~       2009-03-29 05:23:17.000000000 +0200
+++ src/system.c        2009-06-16 21:11:20.000000000 +0200
@@ -435,7 +435,7 @@

   if (WIFSIGNALED (wait_status))
     {
-      kill (child_pid, WTERMSIG (wait_status));
+      kill (getpid(), WTERMSIG (wait_status));
       exit_status = TAREXIT_FAILURE;
     }
   else if (WEXITSTATUS (wait_status) != 0)
@@ -573,7 +573,7 @@

   if (WIFSIGNALED (wait_status))
     {
-      kill (child_pid, WTERMSIG (wait_status));
+      kill (getpid(), WTERMSIG (wait_status));
       exit_status = TAREXIT_FAILURE;
     }
   else if (WEXITSTATUS (wait_status) != 0)




Message #11 received at 533356-forwarded@bugs.debian.org (full text, mbox, reply):

From: Sergey Poznyakoff <gray@gnu.org.ua>
To: "Bdale Garbee" <bdale@gag.com>
Cc: <bug-tar@gnu.org>, <533356-forwarded@bugs.debian.org>
Subject: Re: [Bug-tar] [Fwd: Bug#533356: tar: broken behaviour with input/output pipe and compression]
Date: Sat, 20 Jun 2009 20:42:49 +0300
Bdale Garbee <bdale@gag.com> ha escrit:

> Please see the attached proposed patch from Petr Salinger.  Looks
> reasonable to me... your thoughts?

Please, take a look at the repository, where it is fixed already.

Regards,
Sergey




Information forwarded to debian-bugs-dist@lists.debian.org, Bdale Garbee <bdale@gag.com>:
Bug#533356; Package tar. (Wed, 05 Aug 2009 07:36:07 GMT) (full text, mbox, link).


Acknowledgement sent to Petr Salinger <Petr.Salinger@seznam.cz>:
Extra info received and forwarded to list. Copy sent to Bdale Garbee <bdale@gag.com>. (Wed, 05 Aug 2009 07:36:07 GMT) (full text, mbox, link).


Message #16 received at 533356@bugs.debian.org (full text, mbox, reply):

From: Petr Salinger <Petr.Salinger@seznam.cz>
To: 533356@bugs.debian.org
Subject: [ping] Bug#533356 fixed upstream - tar: broken behaviour with input/output pipe and compression
Date: Wed, 5 Aug 2009 10:01:01 +0200 (CEST)
Hi,

please could you integrate either proposed patch or the enhanced patch applied upstream

http://git.savannah.gnu.org/cgit/tar.git/commit/?id=af30244849448c775b3e447a84ba8b0249b4b697

It is really not GNU/kFreeBSD specific problem, moreover appearance is timing dependent.

Petr




Reply sent to Petr Salinger <Petr.Salinger@seznam.cz>:
You have taken responsibility. (Mon, 08 Nov 2010 07:45:11 GMT) (full text, mbox, link).


Notification sent to Petr Salinger <Petr.Salinger@seznam.cz>:
Bug acknowledged by developer. (Mon, 08 Nov 2010 07:45:12 GMT) (full text, mbox, link).


Message #21 received at 533356-done@bugs.debian.org (full text, mbox, reply):

From: Petr Salinger <Petr.Salinger@seznam.cz>
To: 533356-done@bugs.debian.org
Subject: Bug#533356 fixed upstream - tar: broken behaviour with input/output pipe and compression
Date: Mon, 8 Nov 2010 08:43:25 +0100 (CET)
Version: 1.23-3

Have been for some time fixed in upstream,
may be even 1.23-1 have been fine.

Petr




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Tue, 07 Dec 2010 07:35:40 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sun Jan 7 09:24:06 2018; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.