Skip Menu |
 

From: "Michael Kaufmann" <mik4@gmx.ch>
To: krb5-bugs@mit.edu
Subject: Error when building with "make -j8"
Date: Tue, 15 Jul 2014 10:17:50 +0200
When building Kerberos krb5-1.11.3 using multiple jobs in parallel (command: "make -j8"), sometimes the build fails. This happens infrequently (about 1 build in 20 builds).
 
[...]
gmake[4]: Entering directory `/var/tmp/kerberos_vhYo/krb5-1.11.3/src/util/profile/testmod'
cp prof_err.et et-c-prof_err.et
sed  >> binutils.versions < ./libprofile.exports "s/$/;/"
../../util/et/compile_et -d ../../util/et --textdomain mit-krb5 et-h-prof_err.et
gmake[4]: Leaving directory `/var/tmp/kerberos_vhYo/krb5-1.11.3/src/util/profile/testmod'
../../util/et/compile_et -d ../../util/et --textdomain mit-krb5 et-c-prof_err.et
echo >> binutils.versions "};"
echo >> binutils.versions "HIDDEN { local: __*; _rest*; _save*; *; };"
+ gawk -f ../../util/et/et_h.awk outfile=et-h-prof_err.h et-h-prof_err.et
+ gawk -f ../../util/et/et_h.awk outfile=et-c-prof_err.h et-c-prof_err.et
+ gawk -f ../../util/et/et_c.awk outfile=et-c-prof_err.c textdomain=mit-krb5 localedir= et-c-prof_err.et
+ gawk -f ../../util/et/et_c.awk outfile=et-h-prof_err.c textdomain=mit-krb5 localedir= et-h-prof_err.et
mv -f et-c-prof_err.c prof_err.c
rm -f et-c-prof_err.et et-c-prof_err.h
gcc -fPIC -DSHARED  -DHAS_STDARG -DLIBDIR=\"/files/sources/kerberos/kerberos-inst/x86_64-unknown-linux-gnu/lib\" -I../../include -I../../include -I.  -DKRB5_DEPRECATED=1 -DKRB5_PRIVATE  -g -O2 -Wall -Wcast-align -Wshadow -Wmissing-prototypes -Wno-format-zero-length -Woverflow -Wstrict-overflow -Wmissing-format-attribute -Wmissing-prototypes -Wreturn-type -Wmissing-braces -Wparentheses -Wswitch -Wunused-function -Wunused-label -Wunused-variable -Wunused-value -Wunknown-pragmas -Wsign-compare -Werror=uninitialized -Werror=declaration-after-statement -Werror=variadic-macros -Werror-implicit-function-declaration -pthread -c prof_err.c -o prof_err.so.o && mv -f prof_err.so.o prof_err.so
mv -f et-h-prof_err.h prof_err.h
rm -f et-h-prof_err.et et-h-prof_err.c
cat ./profile.hin prof_err.h > profile.h
if cmp profile.h \
../../include/profile.h >/dev/null 2>&1; then :; \
else \
    (set -x; rm -f ../../include/profile.h; \
     cp profile.h ../../include/profile.h) ; \
fi
cp profile.h "../../include/profile.h"
+ rm -f ../../include/profile.h
+ cp profile.h ../../include/profile.h
cp: cannot create regular file `../../include/profile.h': File exists
gmake[3]: *** [../../include/profile.h] Error 1
gmake[3]: *** Waiting for unfinished jobs....
gmake[3]: Leaving directory `/var/tmp/kerberos_vhYo/krb5-1.11.3/src/util/profile'
gmake[2]: *** [all-recurse] Error 1
gmake[2]: Leaving directory `/var/tmp/kerberos_vhYo/krb5-1.11.3/src/util'
gmake[1]: *** [all-recurse] Error 1
gmake[1]: Leaving directory `/var/tmp/kerberos_vhYo/krb5-1.11.3/src'
 
 
I hope that this is enough information to find the bug.
[mik4@gmx.ch - Tue Jul 15 11:22:41 2014]:

Show quoted text
> <div>I hope that this is enough information to find the bug.</div>
> </div></div></body></html>

The bug was already fixed in the development master branch in:

commit 4d3827ac1b0e9e6447a132c57f3e2d74d3dfe8a9
Author: Greg Hudson <ghudson@mit.edu>
Date: Thu Oct 17 14:02:14 2013 -0400

but that change has not been picked back to either the 1.12 or 1.11 branches.
From: "Michael Kaufmann" <mik4@gmx.ch>
To: rt-comment@krbdev.mit.edu
Subject: Re: [krbdev.mit.edu #7967] Error when building with "make -j8"
Date: Tue, 15 Jul 2014 18:56:41 +0200
RT-Send-Cc:
Show quoted text
> The bug was already fixed in the development master branch in:
> commit 4d3827ac1b0e9e6447a132c57f3e2d74d3dfe8a9
> Author: Greg Hudson <ghudson@mit.edu>
> Date: Thu Oct 17 14:02:14 2013 -0400

Thank you! (and sorry for the HTML mail...)

I have found the patch here: http://mailman.mit.edu/pipermail/cvs-krb5/2013-October/012264.html

Any chance that this will be ported back to 1.11 / 1.12 ?
From: Tom Yu <tlyu@MIT.EDU>
To: rt@krbdev.mit.edu
Subject: Re: [krbdev.mit.edu #7967] Error when building with "make -j8"
Date: Tue, 15 Jul 2014 14:23:03 -0400
RT-Send-Cc:
" Michael Kaufmann via RT" <rt-comment@krbdev.mit.edu> writes:

Show quoted text
> I have found the patch here: http://mailman.mit.edu/pipermail/cvs-krb5/2013-October/012264.html
>
> Any chance that this will be ported back to 1.11 / 1.12 ?

That looks reasonably safe to back port, so I can probably do that.
From: tlyu@mit.edu
Subject: git commit

Fix race in util/profile/Makefile.in

$(BUILDTOP)/include/profile.h was being updated by two different
rules, which could collide with make -j. Use a dependency from
includes instead of a redundant rule.

(cherry picked from commit 4d3827ac1b0e9e6447a132c57f3e2d74d3dfe8a9)

https://github.com/krb5/krb5/commit/106f45c07139956167d54aacf1674912d3ef3ced
Author: Greg Hudson <ghudson@mit.edu>
Committer: Tom Yu <tlyu@mit.edu>
Commit: 106f45c07139956167d54aacf1674912d3ef3ced
Branch: krb5-1.12
src/util/profile/Makefile.in | 8 +-------
1 files changed, 1 insertions(+), 7 deletions(-)