From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 31 12:42:08 2014 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B3C45A6F; Fri, 31 Oct 2014 12:42:08 +0000 (UTC) Received: from mail-wi0-x22a.google.com (mail-wi0-x22a.google.com [IPv6:2a00:1450:400c:c05::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0339CC0A; Fri, 31 Oct 2014 12:42:07 +0000 (UTC) Received: by mail-wi0-f170.google.com with SMTP id q5so1180607wiv.3 for ; Fri, 31 Oct 2014 05:42:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=VL9pXPPWRX+hEscQBg3X8cg9j3iIzCmVGdEB1TUmBxc=; b=GsN7d7fuY04VRQe+bA0U51JwrWOYWKt4OXgFkiZ//qXFADwMuGt81fLpYFgi0iJeAi UrOsh023+WmyxZ+couEEY45MNR2WBqDMz4E9PfXomk4D8JpG/itqGafy4RVcGkovZ8m6 AGK3QkPpZoGcGK48wk0DOHO30gvRwLtoLOgzE3j2G63FS4b0iLMWz+EqclJj8BsAqH6P AuP5VJYl0hA/AhgH4ujljl2rzOx7So1yyKS/0N3NojY6YWIzfLNmqtrKmx00qrStAD6q PH12gsQX3t5zEg/QdYNBtkccOzTJmnW2OXXTnjE/eOs/M1M+7tuqt62y1G+3uNwoSLep KVAg== X-Received: by 10.180.187.130 with SMTP id fs2mr3646785wic.24.1414759326299; Fri, 31 Oct 2014 05:42:06 -0700 (PDT) Received: from localhost ([82.193.208.225]) by mx.google.com with ESMTPSA id gt7sm25473678wib.18.2014.10.31.05.42.05 for (version=SSLv3 cipher=RC4-SHA bits=128/128); Fri, 31 Oct 2014 05:42:05 -0700 (PDT) Date: Fri, 31 Oct 2014 13:42:01 +0100 From: To: Ian Lepore Subject: Re: tar behavior 9.* -> 10.* Message-ID: <20141031134201.00000127@gmail.com> In-Reply-To: <1414676160.17308.151.camel@revolution.hippie.lan> References: <20141024141552.000048ac@gmail.com> <544A6595.2070204@freebsd.org> <20141030133230.00004204@gmail.com> <1414676160.17308.151.camel@revolution.hippie.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Allan Jude X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Oct 2014 12:42:08 -0000 On Thu, 30 Oct 2014 07:36:00 -0600 Ian Lepore wrote: > On Thu, 2014-10-30 at 13:32 +0100, rank1seeker@gmail.com wrote: > > On Fri, 24 Oct 2014 10:43:33 -0400 > > Allan Jude wrote: > > > > > On 2014-10-24 08:15, rank1seeker@gmail.com wrote: > > > > https://forums.freebsd.org/threads/tar-errors-when-file-content-extracted-to-stdout-is-piped.48626/ > > > > > > > > Bug? > > > > _______________________________________________ > > > > > What happens if you pipe it to something that doesn't close the > > > pipe prematurely > > > > > > try: > > > > > > tar ... | cat - > > > > > > It makes sense that it throws an error when you pipe to head, > > > which then closes the pipe before the file has finished being > > > written. > > > > > > > Even in it's "cleanest form" it hangs: > > # tar -xOf src.txz usr/src/UPDATING > > Outputed complete content immidieatly to STDOUT and then hanged for > > 56 seconds! > > > > This is a completely different case, not at all related to what you > reported earlier. It is doing exactly what it is supposed to. With > the arguments you gave it, it must scan (and thus decompress) the > entire archive, because there could be a newer version of UPDATING > later in the archive (think tar --append). If you want it to quit as > soon as it has found the first copy of usr/src/UPDATING, add -q (or > --fast-read). > > -- Ian Thank you Ian. It did a trick. However, if you've looked at a link, you would see I've reported 2 issues of which 1 is now solved. It is tar's pipe problem, which started to occur in 10.* # tar -qxOf src.txz usr/src/UPDATING | head ... expected output ... ./usr/src/UPDATING: Write error tar: Error exit delayed from previous errors. Exits with 1 (fail) > > > With your code situation is same. > > > > To cut it short, this is a non critical bug fixed in 9.*, aka tar > > regression. > >