NetBSD-Bugs archive

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

kern/43360: i386/stand & libkern makefile race



>Number:         43360
>Category:       kern
>Synopsis:       i386/stand & libkern makefile race
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed May 26 04:10:00 +0000 2010
>Originator:     David A. Holland
>Release:        NetBSD 5.1_RC2
>Organization:
>Environment:
System: NetBSD macaran.eecs.harvard.edu 5.1_RC2 NetBSD 5.1_RC2 (GENERIC) #0: 
Fri May 21 00:29:51 UTC 2010 
builds%b7.netbsd.org@localhost:/home/builds/ab/netbsd-5-1-RC2/amd64/201005210534Z-obj/home/builds/ab/netbsd-5-1-RC2/src/sys/arch/amd64/compile/GENERIC
 amd64
Architecture: x86_64
Machine: amd64
>Description:

The libkern Makefile.inc has the following rule:

clean:                  .NOTMAIN cleankernlib
cleankernlib:           .NOTMAIN
        @echo cleaning the kern library objects
        @if [ -d "${KERNDST}" ]; then ${KERNMAKE} clean; fi

Meanwhile, sys/arch/i386/stand/bootxx/Makefile has this rule:

cleandir distclean: cleanlibdir
cleanlibdir:
        -rm -rf lib

${KERNDST} is lib/kern, and there doesn't appear to be any .WAITs in
between, so these can race.

(netboot/Makefile has a similar rule and probably there are more about
the tree.)

I was running -j72 builds as burn-in and got a failure with this
message:

--- cleankernlib ---
   nbmake: .../sys/arch/i386/stand/bootxx/obj/lib/kern: No such file or 
directory

>How-To-Repeat:

build.sh -j72 release

You may need additional load to get the race to actually happen. I
can't get it to fail just creating obj/lib/kern and running make -j72
cleandir in the bootxx directory.

>Fix:

Maybe this:

-cleandir distclean: cleanlibdir
+cleandir distclean: .WAIT cleanlibdir



Home | Main Index | Thread Index | Old Index