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
System: NetBSD 5.1_RC2 NetBSD 5.1_RC2 (GENERIC) #0: 
Fri May 21 00:29:51 UTC 2010
Architecture: x86_64
Machine: amd64

The libkern 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
        -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

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

>How-To-Repeat: -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.


Maybe this:

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

Home | Main Index | Thread Index | Old Index