Buildworld /rescue failures in 5.1
Garance A Drosihn
drosih at rpi.edu
Thu Jul 24 13:33:09 PDT 2003
At 12:12 PM -0700 7/24/03, Tim Kientzle wrote:
>Garance A Drosihn wrote:
>>So indeed, that 'make depend' had not finished before the
>>'make' for the object had started.
>
>There's another possibility here: suppose two copies
>of make are running simultaneously and both get to
>this sequence at about the same time:
>
> tar_make:
> (cd $(tar_SRCDIR) && \
> $(MAKE) $(BUILDOPTS) $(tar_OPTS) depend &&\
> $(MAKE) $(BUILDOPTS) $(tar_OPTS) $(tar_OBJS))
>
>
>The first make to run this will start building dependencies.
>The second copy will see that ".depend" already exists (note
>that bsd.dep.mk builds .depend incrementally) and then go on
>to the next step.
I am still not exactly sure what is going on here, but it
looks like Gordon has committed a change which has solved
the problem which I kept running into. It's a little
tricky to figure out exactly what is going on, since the
problem so dependent upon the exact timing of the events.
However, I would note that in at least some of my testing,
the .depend file did *not* exist -- not at all -- in the
directory that it needed to be in.
Still, it does sound like a good idea to make the creation
of .depend to be an atomic operation. I might prefer to use
the 'mktemp' command, instead of adding a PID. Something
along the lines of:
DEPENDTMP=`mktemp ${DEPENDFILE}.XXXXX`
--
Garance Alistair Drosehn = gad at gilead.netel.rpi.edu
Senior Systems Programmer or gad at freebsd.org
Rensselaer Polytechnic Institute or drosih at rpi.edu
More information about the freebsd-current
mailing list