From owner-freebsd-ia64@FreeBSD.ORG Tue Apr 22 03:09:46 2014 Return-Path: Delivered-To: freebsd-ia64@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 593445DE; Tue, 22 Apr 2014 03:09:46 +0000 (UTC) Received: from mho-02-ewr.mailhop.org (mho-02-ewr.mailhop.org [204.13.248.72]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 10FE6189A; Tue, 22 Apr 2014 03:09:45 +0000 (UTC) Received: from c-24-8-230-52.hsd1.co.comcast.net ([24.8.230.52] helo=damnhippie.dyndns.org) by mho-02-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1WcR5c-000BWL-Fl; Tue, 22 Apr 2014 03:09:44 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id s3M39gp0007889; Mon, 21 Apr 2014 21:09:42 -0600 (MDT) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 24.8.230.52 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX18XplFVa7uc729kTzxN9msk Subject: Re: Build failures with high parallel make(1) jobs with GCC From: Ian Lepore To: Glen Barber In-Reply-To: <20140422025435.GL49791@glenbarber.us> References: <20140422025435.GL49791@glenbarber.us> Content-Type: multipart/mixed; boundary="=-/f9e1SmI0wN69NuW1Rk7" Date: Mon, 21 Apr 2014 21:09:42 -0600 Message-ID: <1398136182.1124.394.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Cc: freebsd-ia64@FreeBSD.org, freebsd-current@FreeBSD.org, freebsd-ppc@FreeBSD.org X-BeenThere: freebsd-ia64@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Porting FreeBSD to the IA-64 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Apr 2014 03:09:46 -0000 --=-/f9e1SmI0wN69NuW1Rk7 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Mon, 2014-04-21 at 22:54 -0400, Glen Barber wrote: > I have been pounding my head against the desk for longer than I care to > admit with this failure. > > I see this with powerpc, powerpc64, and now ia64. I initially thought > it was specific to powerpc{,64}, but now realize ia64 is also affected. > > This build was running with -j48 on a 48-core machine, when the > following caused build failure: > > ======================================================================= > > /usr/obj/ia64.ia64/usr/src/tmp/usr/bin/ld: cannot find -lm > --- libstdc++.so.6 --- > *** [libstdc++.so.6] Error code 1 > > make[4]: stopped in /usr/src/gnu/lib/libstdc++ > A failure has been detected in another branch of the parallel make > > ======================================================================= > > It is unclear to me when exactly this started happening, but it seems at > least two weeks is a reasonable estimate. > > I realize this is not an entirely large chunk of useful information > regarding the build failure, but I have determined it is entirely > reproducible. I have determined that the failure case seems to > disappear with make(1) jobs <= 10, at least for powerpc. > > The last successful build for powerpc on head/ was April 8. But I am > having trouble tracking down what commits may (or may not) have > contributed to recent high-parallel build failures. > > Glen > A couple weeks corresponds somewhat with the parallel subdir build changes (it's about 3 weeks now). Try this patch I cooked up today for $work, and in src/lib/Makefile add .WAIT (as if it were a directory name) between ${SUBDIR_ORDERED} and the rest of the directories. -- Ian --=-/f9e1SmI0wN69NuW1Rk7 Content-Disposition: inline; filename="parallel_make_wait.diff" Content-Type: text/x-patch; name="parallel_make_wait.diff"; charset="us-ascii" Content-Transfer-Encoding: 7bit diff -r 67802e319fc6 share/mk/bsd.subdir.mk --- a/share/mk/bsd.subdir.mk Sun Apr 20 21:01:07 2014 -0600 +++ b/share/mk/bsd.subdir.mk Mon Apr 21 06:59:37 2014 -0600 @@ -4,10 +4,10 @@ # The include file contains the default targets # for building subdirectories. # -# For all of the directories listed in the variable SUBDIRS, the +# For all of the directories listed in the variable SUBDIR, the # specified directory will be visited and the target made. There is # also a default target which allows the command "make subdir" where -# subdir is any directory listed in the variable SUBDIRS. +# subdir is any directory listed in the variable SUBDIR. # # # +++ variables +++ @@ -42,7 +42,7 @@ distribute: _SUBDIR: .USE .if defined(SUBDIR) && !empty(SUBDIR) && !defined(NO_SUBDIR) - @${_+_}for entry in ${SUBDIR}; do \ + @${_+_}for entry in ${SUBDIR:N.WAIT}; do \ if test -d ${.CURDIR}/$${entry}.${MACHINE_ARCH}; then \ ${ECHODIR} "===> ${DIRPRFX}$${entry}.${MACHINE_ARCH} (${.TARGET:realinstall=install})"; \ edir=$${entry}.${MACHINE_ARCH}; \ @@ -57,7 +57,7 @@ distribute: done .endif -${SUBDIR}: .PHONY +${SUBDIR:N.WAIT}: .PHONY ${_+_}@if test -d ${.TARGET}.${MACHINE_ARCH}; then \ cd ${.CURDIR}/${.TARGET}.${MACHINE_ARCH}; \ else \ @@ -65,13 +65,18 @@ distribute: fi; \ ${MAKE} all +__wait=.WAIT .for __target in all all-man checkdpadd clean cleandepend cleandir \ depend distribute lint maninstall manlint \ obj objlink realinstall regress tags \ ${SUBDIR_TARGETS} .ifdef SUBDIR_PARALLEL +__subdir_targets= .for __dir in ${SUBDIR} -${__target}: ${__target}_subdir_${__dir} +.if ${__wait} == ${__dir} +__subdir_targets+= .WAIT +.else +__subdir_targets+= ${__target}_subdir_${__dir} ${__target}_subdir_${__dir}: .MAKE @${_+_}set -e; \ if test -d ${.CURDIR}/${__dir}.${MACHINE_ARCH}; then \ @@ -85,7 +90,9 @@ distribute: fi; \ ${MAKE} ${__target:realinstall=install} \ DIRPRFX=${DIRPRFX}$$edir/ +.endif .endfor +${__target}: ${__subdir_targets} .else ${__target}: _SUBDIR .endif --=-/f9e1SmI0wN69NuW1Rk7--