NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

toolchain/53137: Non-deterministic gcc build (build fails sometimes)



>Number:         53137
>Category:       toolchain
>Synopsis:       Non-deterministic gcc build (build fails sometimes)
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Mar 27 23:15:00 +0000 2018
>Originator:     Robert Elz
>Release:        NetBSD 8.99.12 (and before, and after, up to current, today)
>Organization:
>Environment:
	
	
System: NetBSD jinx.noi.kre.to 8.99.12 NetBSD 8.99.12 (GENERIC) #1: Fri Feb 9 17:26:48 ICT 2018 kre%onyx.coe.psu.ac.th@localhost:/usr/obj/testing/amd64/sys/arch/amd64/compile/GENERIC amd64
Architecture: x86_64
Machine: amd64
>Description:
	The gcc build in current sometimes fails.   The problem can
	be observed in thes babylon5 test builds (and probably others):

		2018.02.20.12.49.40
		2018.02.23.19.39.27
		2018.03.02.14.45.23
		2018.03.06.11.21.31
		2018.03.07.20.43.53
		2018.03.17.18.22.23
		2018.03.27.07.29.44

	To look at the (end of) the build logs for those, use
  http://releng.netbsd.org/b5reports/i386/2018/<build-date>/build.log.tail
	where "<build-date>" is one of those above.

	For the last of those (2018.03.27.07.29.44), the "commits since
	the last successful build" were ...

    2018.03.27.06.16.34 roy src/external/bsd/dhcpcd/dist/src/dhcp.c,v 1.9
    2018.03.27.06.16.34 roy src/external/bsd/dhcpcd/dist/src/dhcpcd.c,v 1.9
    2018.03.27.06.18.40 roy src/external/bsd/dhcpcd/include/config.h,v 1.3
    2018.03.27.06.34.25 roy src/doc/3RDPARTY,v 1.1507
    2018.03.27.06.34.25 roy src/doc/CHANGES,v 1.2368
    2018.03.27.07.29.43 pgoyette src/sys/compat/common/Attic/compat_40_mod.c,v 1.1
    2018.03.27.07.29.44 pgoyette src/sys/compat/common/Attic/sysmon_power_40.c,v 1.1
    2018.03.27.07.29.44 pgoyette src/sys/modules/compat_40/Attic/Makefile,v 1.1

	And no, none of those should have any effect on gcc builds, and
	they are nothing like related to commits before the earlier
	failures, which also seem just as unrelated.

	I once thought that previous build failures may have contrinbuted in
	some way, but here (and one or two other cases) there was no
	recent previous build failure, so that seems to be unrelated.

	The most recent problem was "fixed" by:

    2018.03.27.11.59.49 martin src/lib/libm/src/s_scalbn.c,v 1.19

	Just as unlikely to be related.  As are the commits that
	"fixed" the previous cases.    This failure rarely occurs
	in successive builds.

	The build failures all seem to end up being because of apparently
	nonsense code in generated intermediate files.  E.g. from some of
	the above failures:

/tmp/bracket/build/2018.03.02.14.45.23-i386/src/external/gpl3/gcc/dist/gcc/config/i386/i386.md: In function 'int insn_default_latency_athlon(rtx_insn*)':
/tmp/bracket/build/2018.03.02.14.45.23-i386/src/external/gpl3/gcc/dist/gcc/config/i386/i386.md:24745:32: error: 'TY' was not declared in this scope
/tmp/bracket/build/2018.03.02.14.45.23-i386/src/external/gpl3/gcc/dist/gcc/config/i386/i386.md:24745:32: error: expected ')' at end of input
/tmp/bracket/build/2018.03.02.14.45.23-i386/src/external/gpl3/gcc/dist/gcc/config/i386/i386.md:24745:32: error: expected ')' at end of input
/tmp/bracket/build/2018.03.02.14.45.23-i386/src/external/gpl3/gcc/dist/gcc/config/i386/i386.md:24745:32: error: expected statement at end of input
/tmp/bracket/build/2018.03.02.14.45.23-i386/src/external/gpl3/gcc/dist/gcc/config/i386/i386.md:24745:32: error: expected '}' at end of input
/tmp/bracket/build/2018.03.02.14.45.23-i386/src/external/gpl3/gcc/dist/gcc/config/i386/i386.md:24745:32: error: expected '}' at end of input
/tmp/bracket/build/2018.03.02.14.45.23-i386/src/external/gpl3/gcc/dist/gcc/config/i386/i386.md:24745:32: error: control reaches end of non-void function [-Werror=return-type]

/tmp/bracket/build/2018.03.06.11.21.31-i386/src/external/gpl3/gcc/dist/gcc/config/i386/sse.md: In function 'int insn_default_latency_znver1(rtx_insn*)':
/tmp/bracket/build/2018.03.06.11.21.31-i386/src/external/gpl3/gcc/dist/gcc/config/i386/sse.md:24127:47: error: expected primary-expression at end of input
/tmp/bracket/build/2018.03.06.11.21.31-i386/src/external/gpl3/gcc/dist/gcc/config/i386/sse.md:24127:47: error: expected ')' at end of input
/tmp/bracket/build/2018.03.06.11.21.31-i386/src/external/gpl3/gcc/dist/gcc/config/i386/sse.md:24127:47: error: expected ')' at end of input
/tmp/bracket/build/2018.03.06.11.21.31-i386/src/external/gpl3/gcc/dist/gcc/config/i386/sse.md:24127:47: error: expected ')' at end of input
/tmp/bracket/build/2018.03.06.11.21.31-i386/src/external/gpl3/gcc/dist/gcc/config/i386/sse.md:24127:47: error: expected statement at end of input
/tmp/bracket/build/2018.03.06.11.21.31-i386/src/external/gpl3/gcc/dist/gcc/config/i386/sse.md:24127:47: error: expected '}' at end of input
/tmp/bracket/build/2018.03.06.11.21.31-i386/src/external/gpl3/gcc/dist/gcc/config/i386/sse.md:24127:47: error: expected '}' at end of input
/tmp/bracket/build/2018.03.06.11.21.31-i386/src/external/gpl3/gcc/dist/gcc/config/i386/sse.md:24127:47: error: control reaches end of non-void function [-Werror=return-type]

/tmp/bracket/build/2018.03.17.18.22.23-i386/src/external/gpl3/gcc/dist/gcc/config/i386/sse.md: In function 'int internal_dfa_insn_code_bdver4(rtx_insn*)':
/tmp/bracket/build/2018.03.17.18.22.23-i386/src/external/gpl3/gcc/dist/gcc/config/i386/sse.md:15010:112: error: 're' was not declared in this scope
   [(set (match_operand:V4SI 0 "register_operand" "=Yr,*v")
                                                                                                                ^ 
/tmp/bracket/build/2018.03.17.18.22.23-i386/src/external/gpl3/gcc/dist/gcc/config/i386/sse.md:15010:112: error: expected ')' at end of input
/tmp/bracket/build/2018.03.17.18.22.23-i386/src/external/gpl3/gcc/dist/gcc/config/i386/sse.md:15010:112: error: expected ')' at end of input
/tmp/bracket/build/2018.03.17.18.22.23-i386/src/external/gpl3/gcc/dist/gcc/config/i386/sse.md:15010:112: error: expected ')' at end of input
/tmp/bracket/build/2018.03.17.18.22.23-i386/src/external/gpl3/gcc/dist/gcc/config/i386/sse.md:15010:112: error: expected ')' at end of input
/tmp/bracket/build/2018.03.17.18.22.23-i386/src/external/gpl3/gcc/dist/gcc/config/i386/sse.md:15010:112: error: expected statement at end of input
/tmp/bracket/build/2018.03.17.18.22.23-i386/src/external/gpl3/gcc/dist/gcc/config/i386/sse.md:15010:112: error: expected '}' at end of input
/tmp/bracket/build/2018.03.17.18.22.23-i386/src/external/gpl3/gcc/dist/gcc/config/i386/sse.md:15010:112: error: expected '}' at end of input
/tmp/bracket/build/2018.03.17.18.22.23-i386/src/external/gpl3/gcc/dist/gcc/config/i386/sse.md:15010:112: error: control reaches end of non-void function [-Werror=return-type]
   [(set (match_operand:V4SI 0 "register_operand" "=Yr,*v")
                                                                                                                ^ 

/tmp/bracket/build/2018.03.27.07.29.44-i386/src/external/gpl3/gcc/dist/gcc/config/i386/sse.md:24543:80: error: expected '}' at end of input
/tmp/bracket/build/2018.03.27.07.29.44-i386/src/external/gpl3/gcc/dist/gcc/config/i386/sse.md:24543:80: error: expected '}' at end of input
/tmp/bracket/build/2018.03.27.07.29.44-i386/src/external/gpl3/gcc/dist/gcc/config/i386/sse.md:24543:80: error: control reaches end of non-void function [-Werror=return-type]

	Note that while sse.md seems over-represented as the file
	which fails to build, it is not always that one.   Also that
	the actual corruption is different in every case.  However
	"control reaches end of non-void function" seems to be common.
	(Or perhaps that is just because that was noticed, and is what
	the logs were searched for, meaning other similar failures which
	did not include this were missed - that is unknown.)

>How-To-Repeat:
	Unknown, it seems to be non-deterministic.

	I do mostly -j1 (more correctly, no -j option at all) builds
	for my setup, and have never seen this, so I would guess it
	is perhaps related.   So, starting with a large -j value and
	seeing what happens (after several clean builds) is probably
	where to start.

>Fix:
	?



Home | Main Index | Thread Index | Old Index