bin/159730: make(1) in parallel mode fails report failure of
@-prefixed recipe using "set +e"
Stefano Lattarini
stefano.lattarini at gmail.com
Fri Aug 12 21:20:10 UTC 2011
>Number: 159730
>Category: bin
>Synopsis: make(1) in parallel mode fails report failure of @-prefixed recipe using "set +e"
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Fri Aug 12 21:20:10 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: Stefano Lattarini
>Release: 8.2-RELEASE
>Organization:
>Environment:
FreeBSD bigio.localdomain 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Fri Feb 18 02:24:46 UTC 2011 root at almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386
>Description:
When used in parallel mode ("make -jN ..."), FreeBSD make sometimes
report successful exit status from recipes that should fail, in case
such recipes are prefixed with `@' and unset the `errexit' shell flag.
Example:
$ echo 'all: ; @set +e; false' | make -j2 -f-; echo status: $?
status: 0
I found this problem while testing Automake; see automake bug#9245:
<http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9245>
This issue causes automake-generated Makefiles using the newer parallel-tests harness to always report success if run with "make -jN check"; a really nasty case of spurious success IMHO, which caused me to label this bug as "serious".
>How-To-Repeat:
Here is how to reproduce the issue:
$ echo 'all: ; @set +e; false' | make -j2 -f-; echo status: $?
status: 0
Notice that all of `-j', `@' and `set +e' seems to be required to trigger the bug:
$ echo 'all: ; set +e; false' | make -j2 -f-
set +e; false
*** Error code 1
1 error
$ echo 'all: ; @false' | make -j2 -f-
*** Error code 1
1 error
$ echo 'all: ; @set +e; false' | make -f-
*** Error code 1
Stop in /tmp.
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list