Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Jul 2003 16:33:02 -0400
From:      Garance A Drosihn <drosih@rpi.edu>
To:        kientzle@acm.org
Cc:        current@FreeBSD.org
Subject:   Re: Buildworld /rescue failures in 5.1
Message-ID:  <p0521068ebb45e857a454@[128.113.24.47]>
In-Reply-To: <3F202FB7.8010609@acm.org>
References:  <20030716181354.GA44980@dan.emsphone.com> <20030717074756.B17029@gamplex.bde.org> <20030717123524.T24327@schnell.net> <20030718154832.K21942@gamplex.bde.org> <20030718095946.H29869@schnell.net> <3F183EF9.7020506@acm.org> <20030721084750.GH12996@roark.gnf.org> <3F1C1695.30409@acm.org> <p05210687bb44ba2cd1d7@[128.113.24.47]> <p05210688bb44c9d17c89@[128.113.24.47]> <20030723234415.GE12996@roark.gnf.org> <p0521068abb44d439ecfa@[128.113.24.47]> <3F202FB7.8010609@acm.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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@gilead.netel.rpi.edu
Senior Systems Programmer           or  gad@freebsd.org
Rensselaer Polytechnic Institute    or  drosih@rpi.edu



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?p0521068ebb45e857a454>