GNU bug report logs - #10975
'make dist-gz dist-xz' fails

Previous Next

Package: automake;

Reported by: Olaf Lenz <olenz <at> icp.uni-stuttgart.de>

Date: Fri, 9 Mar 2012 07:52:01 UTC

Severity: minor

To reply to this bug, email your comments to 10975 AT debbugs.gnu.org.

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-automake <at> gnu.org:
bug#10975; Package automake. (Fri, 09 Mar 2012 07:52:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Olaf Lenz <olenz <at> icp.uni-stuttgart.de>:
New bug report received and forwarded. Copy sent to bug-automake <at> gnu.org. (Fri, 09 Mar 2012 07:52:01 GMT) Full text and rfc822 format available.

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

From: Olaf Lenz <olenz <at> icp.uni-stuttgart.de>
To: bug-automake <at> gnu.org
Subject: 'make dist-gz dist-xz' fails
Date: Thu, 08 Mar 2012 10:22:32 +0100
[Message part 1 (text/plain, inline)]
Hi!

I'm using Automake 1.11.3 and Autoconf 2.68.

Creating two different distribution packages on the command line of make
fails:

> make dist-bzip2 dist-xz
[clip]
tardir=espresso-3.1.0-1-gf2e4716-dirty && ${TAR-tar} chof - "$tardir" |
BZIP2=${BZIP2--9} bzip2 -c >espresso-3.1.0-1-gf2e4716-dirty.tar.bz2
if test -d "espresso-3.1.0-1-gf2e4716-dirty"; then find
"espresso-3.1.0-1-gf2e4716-dirty" -type d ! -perm -200 -exec chmod u+w
{} ';' && rm -rf "espresso-3.1.0-1-gf2e4716-dirty" || { sleep 5 && rm
-rf "espresso-3.1.0-1-gf2e4716-dirty"; }; else :; fi
tardir=espresso-3.1.0-1-gf2e4716-dirty && ${TAR-tar} chof - "$tardir" |
XZ_OPT=${XZ_OPT--e} xz -c >espresso-3.1.0-1-gf2e4716-dirty.tar.xz
tar: espresso-3.1.0-1-gf2e4716-dirty: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
if test -d "espresso-3.1.0-1-gf2e4716-dirty"; then find
"espresso-3.1.0-1-gf2e4716-dirty" -type d ! -perm -200 -exec chmod u+w
{} ';' && rm -rf "espresso-3.1.0-1-gf2e4716-dirty" || { sleep 5 && rm
-rf "espresso-3.1.0-1-gf2e4716-dirty"; }; else :; fi

The problem seems to be a race condition.
"make dist-bzip2" populates the distribution dir, tars it and deletes it
after 5 seconds. During that time "make dist-xz" has started and noticed
that the distdir already exists. Unfortunately, it is deleted while
dist-xz is still packing.

Olaf

-- 
Dr. rer. nat. Olaf Lenz
Institut für Computerphysik, Pfaffenwaldring 27, D-70569 Stuttgart
Phone: +49-711-685-63607
[olenz.vcf (text/x-vcard, attachment)]
[signature.asc (application/pgp-signature, attachment)]

Information forwarded to bug-automake <at> gnu.org:
bug#10975; Package automake. (Fri, 09 Mar 2012 19:55:02 GMT) Full text and rfc822 format available.

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

From: Tim Landscheidt <tim <at> tim-landscheidt.de>
To: bug-automake <at> gnu.org
Subject: Re: bug#10975: 'make dist-gz dist-xz' fails
Date: Fri, 09 Mar 2012 19:53:10 +0000
Olaf Lenz <olenz <at> icp.uni-stuttgart.de> wrote:

> [...]
> The problem seems to be a race condition.
> "make dist-bzip2" populates the distribution dir, tars it and deletes it
> after 5 seconds. During that time "make dist-xz" has started and noticed
> that the distdir already exists. Unfortunately, it is deleted while
> dist-xz is still packing.

For a possible workaround, see
<URI:http://permalink.gmane.org/gmane.comp.sysutils.automake.bugs/4940>.
I agree that it would be nice to fix this properly.

Tim





Information forwarded to bug-automake <at> gnu.org:
bug#10975; Package automake. (Fri, 09 Mar 2012 20:38:02 GMT) Full text and rfc822 format available.

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

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: 10975 <at> debbugs.gnu.org
Subject: Re: bug#10975: 'make dist-gz dist-xz' fails
Date: Fri, 09 Mar 2012 21:36:42 +0100
[Message part 1 (text/plain, inline)]
Hi Olaf, Tim.

On 03/09/2012 08:53 PM, Tim Landscheidt wrote:
> Olaf Lenz <olenz <at> icp.uni-stuttgart.de> wrote:
> 
>> [...]
>> The problem seems to be a race condition.
>> "make dist-bzip2" populates the distribution dir, tars it and deletes it
>> after 5 seconds.
>
Nope -- it deletes it *immediately*, and then re-tries to delete it after 5
seconds if the first deletion fails.  This is done in an attempt to accommodate
systems like MinGW where an "active" directory cannot be deleted:

 <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10470>

 During that time "make dist-xz" has started and noticed
>> that the distdir already exists. Unfortunately, it is deleted while
>> dist-xz is still packing.
> 
> For a possible workaround, see
> <URI:http://permalink.gmane.org/gmane.comp.sysutils.automake.bugs/4940>.
> I agree that it would be nice to fix this properly.
> 
> Tim
> 
I've reproduced the bug with the attached test case (committed to maint).

I've also verified that the bug was also present in automake 1.11.2 and
automake 1.11.1, so this is not a regression introduced by the "sleep 5"
change referenced above.

For the moment, and until the bug is properly fixed, my advice is: don't
run multiple "dist-*" targets in the same make invocations.

Regards,
  Stefano
[0001-coverage-expose-automake-bug-10975.patch (text/x-diff, attachment)]

Severity set to 'minor' from 'normal' Request was from Stefano Lattarini <stefano.lattarini <at> gmail.com> to control <at> debbugs.gnu.org. (Fri, 23 Mar 2012 19:58:01 GMT) Full text and rfc822 format available.

This bug report was last modified 13 years and 86 days ago.

Previous Next


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