GNU bug report logs - #18301
texi-vers.am: Problem with parallel builds due to vti.tmp

Previous Next

Package: automake;

Reported by: Friedrich Beckmann <friedrich.beckmann <at> gmx.de>

Date: Wed, 20 Aug 2014 15:46:01 UTC

Severity: normal

Tags: patch

Found in version 1.11.6-1

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

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Friedrich Beckmann <friedrich.beckmann <at> gmx.de>
Subject: bug#18301: closed (Re:  texi-vers.am: Problem with parallel
 builds due to vti.tmp)
Date: Sat, 23 Aug 2014 14:59:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#18301: texi-vers.am: Problem with parallel builds due to vti.tmp

which was filed against the automake package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 18301 <at> debbugs.gnu.org.

-- 
18301: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18301
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Paul Eggert <eggert <at> cs.ucla.edu>
To: 18301-done <at> debbugs.gnu.org
Subject: Re:  texi-vers.am: Problem with parallel builds due to vti.tmp
Date: Sat, 23 Aug 2014 07:58:37 -0700
[Message part 3 (text/plain, inline)]
Thanks, I installed the attached patch, which has the more-usual 
approach of a uniquely-named temporary.
[0001-build-fix-race-in-parallel-builds.patch (text/plain, attachment)]
[Message part 5 (message/rfc822, inline)]
From: Friedrich Beckmann <friedrich.beckmann <at> gmx.de>
To: bug-automake <at> gnu.org
Subject: texi-vers.am: Problem with parallel builds due to vti.tmp
Date: Wed, 20 Aug 2014 11:17:59 +0200
[Message part 6 (text/plain, inline)]
Package: automake
Version: 1.11.6-1

I encounter a problem with automake during parallel builds for the debian pspp package. When I run the build
process non-parallel then it works. The problem only occurs sometimes when I do a parallel build. The build
is a debian package build. Here are the relevant sections from the build.log and Makefile.in: 

======== snippet from pspp_0.8.3-3_amd64.build ============
make[4]: Entering directory `/home/fritz/pspp/new/pspp-0.8.3'
make[4]: »doc/.dirstamp« ist bereits aktualisiert.
make[4]: Leaving directory `/home/fritz/pspp/new/pspp-0.8.3'
Updating ./doc/version.texi
Updating ./doc/version.texi
cp: Aufruf von stat für „vti.tmp“ nicht möglich: Datei oder Verzeichnis nicht gefunden
make[3]: *** [doc/stamp-vti] Fehler 1
make[3]: Leaving directory `/home/fritz/pspp/new/pspp-0.8.3'
make[2]: *** [pdf-recursive] Fehler 1
make[2]: *** Warte auf noch nicht beendete Prozesse…
================================================================

The build log shows „Updating ./doc/version.texi“ two times. This message is generated when
the stamp-vti target is build. So obviously the parallel build results in two parallel processes to build
stamp-vti. 

================ Relevant section from Makefile.in ======================
$(srcdir)/doc/version.texi:  $(srcdir)/doc/stamp-vti
$(srcdir)/doc/stamp-vti: doc/pspp.texinfo $(top_srcdir)/configure
        test -f doc/$(am__dirstamp) || $(MAKE) $(AM_MAKEFLAGS) doc/$(am__dirstamp)
        @(dir=.; test -f ./doc/pspp.texinfo || dir=$(srcdir); \
        set `$(SHELL) $(top_srcdir)/build-aux/mdate-sh $$dir/doc/pspp.texinfo`; \
        echo "@set UPDATED $$1 $$2 $$3"; \
        echo "@set UPDATED-MONTH $$2 $$3"; \
        echo "@set EDITION $(VERSION)"; \
        echo "@set VERSION $(VERSION)") > vti.tmp
        @cmp -s vti.tmp $(srcdir)/doc/version.texi \
          || (echo "Updating $(srcdir)/doc/version.texi"; \
              cp vti.tmp $(srcdir)/doc/version.texi)
        -@rm -f vti.tmp
================================================================

I think the problem is due to the file „vti.tmp“ which is generated and removed during the build. When
one process has already deleted the file and the other process wants to delete it, then the error message
in the build log: "cp: Aufruf von stat für „vti.tmp“ nicht möglich: Datei oder Verzeichnis nicht gefunden“
will show up. This means that the file vti.tmp is not found for the copy action.

A possible solution could be based on unique temporary files, instead of vti.tmp.  The relevant automake file
is http://git.savannah.gnu.org/cgit/automake.git/tree/lib/am/texi-vers.am. I think the relevant part of the file
did not change since version 1.11.6. Attached is the full build.log. 
The bug report in the pspp project is here: https://savannah.gnu.org/bugs/?43029

Friedrich


[pspp_0.8.3-3_amd64.build (application/octet-stream, attachment)]
[Message part 8 (text/plain, inline)]





This bug report was last modified 10 years and 275 days ago.

Previous Next


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