Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: compile libukfs/ukfs.ln fails on amd64



Antti Kantee writes:
> On Tue Jul 29 2008 at 15:43:54 -0600, Greg Oster wrote:
> > I think we have a race in here... 
> > 
> > --- rumpvnode_if.h ---
> > sed -n '/#define        O_[A-Z]*        *0x/s/O_/RUMP_O_/gp'     < /u1/buil
> ds/bu
> > ild238/src/lib/librump/../../sys/rump/../sys/fcntl.h >> rumpdefs.h
> > printf "#ifndef __VTYPE_DEFINED\n#define __VTYPE_DEFINED\n"      >> rumpdef
> s.h
> > --- rumpdefs.h ---
> > sed -n '/#define NAMEI_/s/NAMEI_/RUMP_NAMEI_/gp'                 < /u1/buil
> ds/bu
> > ild238/src/lib/librump/../../sys/rump/../sys/namei.h > rumpdefs.h
> > --- rumpvnode_if.h ---
> > sed -n '/enum vtype.*{/p'                                        < /u1/buil
> ds/bu
> > ild238/src/lib/librump/../../sys/rump/../sys/vnode.h >> rumpdefs.h
> > 
> > Unless those rumpdefs.h are different, things are gonna be 
> > scrambled...
> > 
> > I've now done one i386 and one amd64 build where it built fine, and 
> > one each where I got "weirdness" in rumpdefs.h....  (both -j 16 
> > builds..)
> 
> Looks like it.  Hmm, wonder why I've never seen this.  I didn't know
> that make could even was allowed to do that.  And indeed if I run
> make -j16 dependall, it does it split up the steps like in what you quoted.
> 
> Anyway, how do we tell make that it should just execute everything
> sequentially?  .WAITs?  I can't test as I can't repeat the problem.

I think in src/sys/rump/librump/rumpkern/Makefile.rumpkern you'd need 
to split this:

rumpdefs.h rumpvnode_if.h rumpvnode_if.c: vnode_if.c \
  ...

into:
rumpdefs.h: vnode_if.c \
  ...
rumpvnode_if.h: vnode_if.c \
  ...
rumpvnode_if.c: vnode_if.c \
  ...

I suspect the issue here is that one branch of the build is trying to
build rumpdefs.h, and one rumpvnode_if.h, and one rumpvnode_if.c, but 
that results in the same Makefile bits being executed for all 3.

> Also, bonus question: why hasn't this been seen before?  That portion
> of the Makefile didn't change.

All it takes is for something to change the timing of something 
earlier in the build, and that will change what bits are running in 
parallel at any given moment...  e.g. even running w/ -j 15 or -j 17 
might or might not show the same problem...  (www... races in 
build.sh..)

Later...

Greg Oster




Home | Main Index | Thread Index | Old Index