NetBSD Problem Report #45226
From campbell@mumble.net Mon Aug 8 16:34:43 2011
Return-Path: <campbell@mumble.net>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by www.NetBSD.org (Postfix) with ESMTP id 83A0363CA5F
for <gnats-bugs@gnats.NetBSD.org>; Mon, 8 Aug 2011 16:34:43 +0000 (UTC)
Message-Id: <20110808163442.1D3F2E4056@pluto.mumble.net>
Date: Mon, 8 Aug 2011 16:34:42 +0000 (UTC)
From: Taylor R Campbell <campbell+netbsd@mumble.net>
Reply-To: Taylor R Campbell <campbell+netbsd@mumble.net>
To: gnats-bugs@gnats.NetBSD.org
Subject: add option to make(1) to reverse/randomize sequences between .WAIT
X-Send-Pr-Version: 3.95
>Number: 45226
>Category: bin
>Synopsis: add make(1) option to reverse/randomize sequences between .WAIT
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: rillig
>State: closed
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Mon Aug 08 16:35:00 +0000 2011
>Closed-Date: Sat May 07 18:13:18 +0000 2022
>Last-Modified: Sat May 07 18:13:18 +0000 2022
>Originator: Taylor R Campbell <campbell+netbsd@mumble.net>
>Release: NetBSD 5.99.55
>Organization:
>Environment:
System: NetBSD oberon.local 5.99.55 NetBSD 5.99.55 (RIAMONODEBUG) #1: Thu Aug 4 03:23:52 UTC 2011 root@oberon.local:/home/riastradh/netbsd/current/obj/sys/arch/i386/compile/RIAMONODEBUG i386
Architecture: i386
Machine: i386
>Description:
Large source trees such as NetBSD have complex dependency
structures which are often not correctly reflected in the
makefiles, but in which mistakes do not manifest themselves
except during unlucky builds with large numbers of parallel
jobs. I suspect that many obscure mistakes are simply omitted
dependencies that happen to be implied by sequencing such as
foo: bar baz
where baz actually depends on bar too but someone forgot to say
so. Reversing, or perhaps randomly permuting, the implied
sequences, might help to weed out some of these bugs.
>How-To-Repeat:
Trawl the lists for instances of obscure parallel build
failures.
>Fix:
Yes, please!
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: bin-bug-people->rillig
Responsible-Changed-By: rillig@NetBSD.org
Responsible-Changed-When: Sat, 12 Feb 2022 00:42:06 +0000
Responsible-Changed-Why:
I'll take this one.
From: "Roland Illig" <rillig@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/45226 CVS commit: src/usr.bin/make
Date: Sat, 7 May 2022 17:49:47 +0000
Module Name: src
Committed By: rillig
Date: Sat May 7 17:49:47 UTC 2022
Modified Files:
src/usr.bin/make: compat.c main.c make.1 make.c make.h
src/usr.bin/make/unit-tests: Makefile depsrc-wait.exp depsrc-wait.mk
varname-dot-make-mode.exp varname-dot-make-mode.mk
Log Message:
make: allow to randomize build order of targets
In complex dependency structures, when a build fails, a probable cause
is a missing dependency declaration between some files. In compat mode,
the build order is deterministic, in jobs mode, it is somewhat
deterministic. To explore more edge cases, add the line ".MAKE.MODE +=
randomize-targets" somewhere in the makefile.
Fixes PR bin/45226 by riastradh. Reviewed by christos.
To generate a diff of this commit:
cvs rdiff -u -r1.239 -r1.240 src/usr.bin/make/compat.c
cvs rdiff -u -r1.581 -r1.582 src/usr.bin/make/main.c
cvs rdiff -u -r1.308 -r1.309 src/usr.bin/make/make.1
cvs rdiff -u -r1.254 -r1.255 src/usr.bin/make/make.c
cvs rdiff -u -r1.301 -r1.302 src/usr.bin/make/make.h
cvs rdiff -u -r1.312 -r1.313 src/usr.bin/make/unit-tests/Makefile
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/unit-tests/depsrc-wait.exp \
src/usr.bin/make/unit-tests/varname-dot-make-mode.mk
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/make/unit-tests/depsrc-wait.mk
cvs rdiff -u -r1.1 -r1.2 \
src/usr.bin/make/unit-tests/varname-dot-make-mode.exp
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: rillig@NetBSD.org
State-Changed-When: Sat, 07 May 2022 18:13:18 +0000
State-Changed-Why:
Fixed for NetBSD 10. Thanks for the PR.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.