NetBSD Problem Report #43360
From dholland@eecs.harvard.edu Wed May 26 04:05:37 2010
Return-Path: <dholland@eecs.harvard.edu>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by www.NetBSD.org (Postfix) with ESMTP id 9315863B8BA
for <gnats-bugs@gnats.NetBSD.org>; Wed, 26 May 2010 04:05:37 +0000 (UTC)
Message-Id: <20100526040427.60A9FFADB@tanaqui.eecs.harvard.edu>
Date: Wed, 26 May 2010 00:04:27 -0400 (EDT)
From: dholland@eecs.harvard.edu
Reply-To: dholland@eecs.harvard.edu
To: gnats-bugs@gnats.NetBSD.org
Subject: i386/stand & libkern makefile race
X-Send-Pr-Version: 3.95
>Number: 43360
>Category: kern
>Synopsis: i386/stand & libkern makefile race
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: kern-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed May 26 04:10:00 +0000 2010
>Closed-Date: Thu May 27 07:01:15 +0000 2010
>Last-Modified: Thu May 27 07:01:15 +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:/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
>Release-Note:
>Audit-Trail:
From: "David A. Holland" <dholland@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/43360 CVS commit: src/sys/arch
Date: Thu, 27 May 2010 06:58:16 +0000
Module Name: src
Committed By: dholland
Date: Thu May 27 06:58:15 UTC 2010
Modified Files:
src/sys/arch/arc/stand/boot: Makefile
src/sys/arch/atari/stand/libsa: Makefile
src/sys/arch/bebox/stand/common: Makefile
src/sys/arch/cobalt/stand/boot: Makefile
src/sys/arch/evbarm/stand/gzboot: Makefile.gzboot
src/sys/arch/ews4800mips/stand: Makefile.bootxx
src/sys/arch/ews4800mips/stand/boot: Makefile
src/sys/arch/i386/stand: Makefile.booters
src/sys/arch/i386/stand/boot: Makefile Makefile.boot
src/sys/arch/i386/stand/bootxx: Makefile Makefile.bootxx
src/sys/arch/i386/stand/netboot: Makefile
src/sys/arch/ia64/stand/ia64: Makefile.booters
src/sys/arch/landisk/stand: Makefile.bootprogs
src/sys/arch/landisk/stand/boot: Makefile
src/sys/arch/landisk/stand/bootxx: Makefile
src/sys/arch/macppc/stand/ofwboot: Makefile
src/sys/arch/mipsco/stand: Makefile.booters
src/sys/arch/news68k/stand/common: Makefile
src/sys/arch/pmax/stand: Makefile.booters
src/sys/arch/prep/stand/common: Makefile
src/sys/arch/rs6000/stand/common: Makefile
src/sys/arch/sandpoint/stand/netboot: Makefile
src/sys/arch/sgimips/stand/boot: Makefile
src/sys/arch/sgimips/stand/boot64: Makefile
src/sys/arch/sparc/stand: Makefile.buildboot
src/sys/arch/sparc/stand/ofwboot: Makefile
src/sys/arch/sun68k/stand/libsa: Makefile
src/sys/arch/zaurus/stand/zboot: Makefile
Log Message:
Introduce .WAIT into the cleandir rule for blasting the libsa/libkern/etc.
trees, because it can race with the libsa/libkern/etc. makefiles' own
cleandir rules. I think I've found all of the uses of the offending idiom...
Closes PR 43360.
To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arc/stand/boot/Makefile
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/atari/stand/libsa/Makefile
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/bebox/stand/common/Makefile
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/cobalt/stand/boot/Makefile
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/evbarm/stand/gzboot/Makefile.gzboot
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/ews4800mips/stand/Makefile.bootxx
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/ews4800mips/stand/boot/Makefile
cvs rdiff -u -r1.78 -r1.79 src/sys/arch/i386/stand/Makefile.booters
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/i386/stand/boot/Makefile
cvs rdiff -u -r1.43 -r1.44 src/sys/arch/i386/stand/boot/Makefile.boot
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/i386/stand/bootxx/Makefile
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/i386/stand/bootxx/Makefile.bootxx
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/i386/stand/netboot/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/ia64/stand/ia64/Makefile.booters
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/landisk/stand/Makefile.bootprogs
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/landisk/stand/boot/Makefile
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/landisk/stand/bootxx/Makefile
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/macppc/stand/ofwboot/Makefile
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/mipsco/stand/Makefile.booters
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/news68k/stand/common/Makefile
cvs rdiff -u -r1.51 -r1.52 src/sys/arch/pmax/stand/Makefile.booters
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/prep/stand/common/Makefile
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/rs6000/stand/common/Makefile
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/sandpoint/stand/netboot/Makefile
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/sgimips/stand/boot/Makefile
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/sgimips/stand/boot64/Makefile
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/sparc/stand/Makefile.buildboot
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/sparc/stand/ofwboot/Makefile
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/sun68k/stand/libsa/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/zaurus/stand/zboot/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Thu, 27 May 2010 07:01:15 +0000
State-Changed-Why:
Fixed.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.