Created attachment 547864 [details] gcc-build-logs.tar.bz2 I believe this version of gcc has built successfully in the past but now on stable sparc I get the following build error: /usr/include/bits/unistd.h:229:8: error: two or more data types in declaration specifiers extern size_t __confstr_chk (int __name, char *__buf, size_t __len, ^~~~~~
# emerge --info Portage 2.3.49 (python 3.6.5-final-0, default/linux/sparc/17.0, gcc-6.4.0, glibc-2.26-r7, 3.14.14-gentoo sparc64) ================================================================= System uname: Linux-3.14.14-gentoo-sparc64-sun4v-with-gentoo-2.4.1 KiB Mem: 16591128 total, 8199712 free KiB Swap: 0 total, 0 free Timestamp of repository gentoo: Mon, 24 Sep 2018 00:45:01 +0000 Head commit of repository gentoo: d8432714945daf387328ee6a1666b9ea9bb4b7f4 sh bash 4.4_p12 ld GNU ld (Gentoo 2.30 p2) 2.30.0 app-shells/bash: 4.4_p12::gentoo dev-lang/perl: 5.24.3-r1::gentoo dev-lang/python: 2.7.15::gentoo, 3.5.4-r1::gentoo, 3.6.5::gentoo dev-util/pkgconfig: 0.29.2::gentoo sys-apps/baselayout: 2.4.1-r2::gentoo sys-apps/openrc: 0.34.11::gentoo sys-apps/sandbox: 2.13::gentoo sys-devel/autoconf: 2.69-r4::gentoo sys-devel/automake: 1.15.1-r2::gentoo sys-devel/binutils: 2.28.1::gentoo, 2.30-r2::gentoo sys-devel/gcc: 6.4.0-r1::gentoo sys-devel/gcc-config: 1.8-r1::gentoo sys-devel/libtool: 2.4.6-r3::gentoo sys-devel/make: 4.2.1-r4::gentoo sys-kernel/linux-headers: 4.13::gentoo (virtual/os-headers) sys-libs/glibc: 2.26-r7::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 sync-rsync-extra-opts: sync-rsync-verify-metamanifest: yes sync-rsync-verify-max-age: 24 sync-rsync-verify-jobs: 1 ACCEPT_KEYWORDS="sparc" ACCEPT_LICENSE="* -@EULA" CBUILD="sparc-unknown-linux-gnu" CFLAGS="-O2 -mcpu=niagara -pipe" CHOST="sparc-unknown-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/sandbox.d /etc/terminfo" CXXFLAGS="-O2 -mcpu=niagara -pipe" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="--autounmask=n -j2" ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR" FCFLAGS="" FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="" GENTOO_MIRRORS="http://distfiles.gentoo.org" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j32" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git" PORTAGE_TMPDIR="/var/tmp" USE="acl berkdb big-endian bzip2 cli crypt cxx dri fortran gdbm iconv ipv6 libtirpc modules ncurses nls nptl openmp pam pcre readline sparc ssl tcpd unicode xattr zlib" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon plan sheets stage words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-0" POSTGRES_TARGETS="postgres9_5 postgres10" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" RUBY_TARGETS="ruby23" USERLAND="GNU" VIDEO_CARDS="fbdev glint mga r128 radeon dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Given it complains at glibc's headers could it be it started after glibc bump? Can you also attach preprocessed file it fails to compile? You should change failing $ .../xgcc -o ..._gcov_ior_profile....o ... -c libgcov-profiler.c to $ .../xgcc -o gcov_ior_profile.C ... -E libgcov-profiler.c and attach gcov_ior_profile.C. I'll try to check what is different on a cross-compiled system to spot the problem. Perhaps some macro fails to expand nicely in glibc.
Not glibc dependent as far as I can tell. It failed for me with both glibc-2.25 and 2.27.
Also tried gcc-7.3.0-r6. Fails as well.
Got bender access. Trying to reproduce.
(In reply to Sergei Trofimovich from comment #5) > Got bender access. Trying to reproduce. Reproduced on 7.3.0-r3 and on 7.3.0-r6. 8.2.0-r4 seems to work. Trying to make sense of an error but it's very odd: its not reproducible on rerun even with MAKEOPTS=-j1. Looking further.
(In reply to Sergei Trofimovich from comment #6) > Trying to make sense of an error but it's very odd: its not reproducible on > rerun even with MAKEOPTS=-j1. Looking further. Managed to reproduce failure consistently within a few minutes using the following setup: 1. run gcc compilation in a loop 2. in parallel to [1.] run CPu-intensive load on all CPUs (i ran silly memmove() torture) When [2.] runs [1.] starts throwing errors. When [2.] stops errors go away. Trimming test down to package as a single shell script. Should be usable to bisect/probe kernel as a primary suspect.
Created attachment 555190 [details] trigger-bug-667032.tar.bz2 trigger-bug-667032.tar.bz2: stable reproducer. Runs gcc under the load and needs gcc-7 or later so far. I'll "port" it to older gcc as well. Takes 10 seconds to trigger failure: # time ./run-torture.bash Build memmove-torture Spin memmove-torture up Provoking trigger gcc-torture.c: In function 'atoi': gcc-torture.c:2406:44: error: both 'short' and 'void' in declaration specifiers return (int) strtol (__nptr, (char **) ((void *)0), 10); ^~~~ gcc-torture.c:2406: confused by earlier errors, bailing out Spin memmove-torture down BAD: pass=12 fail=1 real 0m10,846s user 4m3,380s sys 1m30,657s
Created attachment 555292 [details] trigger-bug-667032-v2.tar.gz trigger-bug-667032-v2.tar.gz is a more portable test. Requires more time to trigger failure: # ./run-torture.bash Build memmove-torture Spin memmove-torture up Provoking trigger gcc-torture.c:8:26: error: 'long long long' is too long for GCC __extension__ typedef long long int __quad_t; ^~~~ ... Spin memmove-torture down BAD: pass=245 fail=1 I was not able to make it crash on gcc-6.4.0. Fails only on gcc-7.3.0. Perhaps due to big enough difference in the binary.
(In reply to Sergei Trofimovich from comment #9) > Created attachment 555292 [details] > trigger-bug-667032-v2.tar.gz > > trigger-bug-667032-v2.tar.gz is a more portable test. > Requires more time to trigger failure: > > # ./run-torture.bash > Build memmove-torture > Spin memmove-torture up > Provoking trigger > gcc-torture.c:8:26: error: 'long long long' is too long for GCC > __extension__ typedef long long int __quad_t; > ^~~~ > ... > Spin memmove-torture down > BAD: pass=245 fail=1 > > I was not able to make it crash on gcc-6.4.0. Fails only on gcc-7.3.0. > Perhaps due to big enough difference in the binary. Another data point: gcc-8.2.0 also does not crash.
Another datapoint from Ben from chat on #gentoo-sparc: 21:28:30 <@slyfox> i wonder if others experience any problems with 7.3.0 or it's specifically tied to bender 21:42:27 < iamben> it's not just bender. first place i ever saw it was on my personal t2000. it's also reproducible on totoro, which was a fresh gentoo install just a couple of months ago. but they are all t2000's Which rules out possibility individual hardware (CPU or RAM) failure and points at gcc (or related) software bug. Given that system otherwise survives torture tests for days gcc is disproportionately more affected to failures. Chasing gcc bug side.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c5e1c67bc57c31b8b4ade5c76fef54b44001c0b8 commit c5e1c67bc57c31b8b4ade5c76fef54b44001c0b8 Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2018-12-30 10:21:07 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2018-12-30 10:21:07 +0000 sys-devel/gcc: stabilize 8.2.0-r6 eary on sparc, bug #667032 Currently gcc-7.3.0 and gcc-7.4.0 experience mysterious crashes on Niagara ships (see #667032 for details). The current workaround is not to use gcc-7.x on them. Let's stable 8.x early while debugging happens. Reported-by: Ben Kohler Bug: https://bugs.gentoo.org/667032 Package-Manager: Portage-2.3.53, Repoman-2.3.12 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> sys-devel/gcc/gcc-8.2.0-r6.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
The bug is very non-deterministic and I was not able to reproduce it on gcc-8. Bender is no more, let's declare it as obsolete and debug from start if it happens again.