Bug 178978

Summary: [build] [patch] Race in make release when make system/bootonly target with -j > 1
Product: Base System Reporter: Enji Cooper <ngie>
Component: confAssignee: freebsd-bugs mailing list <bugs>
Status: Open ---    
Severity: Affects Only Me CC: emaste
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.txt
none
0001-Fix-a-race-condition-between-make-distribution-and-i.patch.txt none

Description Enji Cooper freebsd_committer 2013-05-25 19:20:01 UTC
make distribution can fail with -j > 1 if installworld/make hierarchy hasn't completed because multiple targets are being executed in parallel with -j > 1. The error I ran into was the following:

install: target directory `/rel//etc' does not exist
usage: install [-bCcpSsUv] [-f flags] [-g group] [-m mode] [-o owner]
               [-M log] [-D dest] [-h hash] [-T tags]
               [-B suffix] [-l linkflags] [-N dbdir]
               file1 file2
       install [-bCcpSsUv] [-f flags] [-g group] [-m mode] [-o owner]
               [-M log] [-D dest] [-h hash] [-T tags]
               [-B suffix] [-l linkflags] [-N dbdir]
               file1 ... fileN directory
       install -dU [-vU] [-g group] [-m mode] [-N dbdir] [-o owner]
               [-M log] [-D dest] [-h hash] [-T tags]
               directory ...
cap_mkdb: /rel//etc/login.conf.db: No such file or directory
install: target directory `/rel//etc' does not exist
usage: install [-bCcpSsUv] [-f flags] [-g group] [-m mode] [-o owner]
               [-M log] [-D dest] [-h hash] [-T tags]
               [-B suffix] [-l linkflags] [-N dbdir]
               file1 file2
       install [-bCcpSsUv] [-f flags] [-g group] [-m mode] [-o owner]
               [-M log] [-D dest] [-h hash] [-T tags]
               [-B suffix] [-l linkflags] [-N dbdir]
               file1 ... fileN directory
       install -dU [-vU] [-g group] [-m mode] [-N dbdir] [-o owner]
               [-M log] [-D dest] [-h hash] [-T tags]
               directory ...
install: target directory `/rel//etc' does not exist
usage: install [-bCcpSsUv] [-f flags] [-g group] [-m mode] [-o owner]
               [-M log] [-D dest] [-h hash] [-T tags]
               [-B suffix] [-l linkflags] [-N dbdir]
               file1 file2
       install [-bCcpSsUv] [-f flags] [-g group] [-m mode] [-o owner]
               [-M log] [-D dest] [-h hash] [-T tags]
               [-B suffix] [-l linkflags] [-N dbdir]
               file1 ... fileN directory
       install -dU [-vU] [-g group] [-m mode] [-N dbdir] [-o owner]
               [-M log] [-D dest] [-h hash] [-T tags]
               directory ...
*** [distribution] Error code 64

make: stopped in /rel/usr/src/etc
1 error

make: stopped in /rel/usr/src/etc
*** [distribution] Error code 2

make: stopped in /rel/usr/src
1 error

make: stopped in /rel/usr/src
*** [distribution] Error code 2

make: stopped in /rel/usr/src
--- installworld ---

Fix: Patch attached with submission follows:
How-To-Repeat: cd /usr/src/release; env MAKE_FLAGS=-j16 sh generate-release.sh head /rel/
Comment 1 Glen Barber freebsd_committer 2013-05-25 19:34:31 UTC
Responsible Changed
From-To: freebsd-bugs->gjb

I will look at it.
Comment 2 Enji Cooper freebsd_committer 2013-05-25 20:50:24 UTC
	Missed a spot in generate-release.sh ; this patch is complete and works.
Thanks!
-Garrett
Comment 3 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 07:59:48 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped
Comment 4 Ed Maste freebsd_committer 2019-07-25 17:46:48 UTC
Is this still an issue?