This mostly happens when gcc is invoked through nvcc, i.e. https://github.com/NVIDIA/nccl/issues/494 It looks like a regression in recently stabilized 10.3.0 over 10.2.0. Typical errors look like: /usr/lib/gcc/x86_64-pc-linux-gnu/10.3.0/include/g++-v10/chrono:428:27: internal compiler error: Segmentation fault 428 | _S_gcd(intmax_t __m, intmax_t __n) noexcept | ^~~~~~ 0xc531cf crash_signal /var/tmp/portage/sys-devel/gcc-10.3.0/work/gcc-10.3.0/gcc/toplev.c:328 0x7f973932478f ??? /var/tmp/portage/sys-libs/glibc-2.33/work/glibc-2.33/signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0 0x72bba3 tsubst(tree_node*, tree_node*, int, tree_node*) /var/tmp/portage/sys-devel/gcc-10.3.0/work/gcc-10.3.0/gcc/cp/pt.c:15310 The upstream issue at $URL contains a fix that reportedly works. I'm going to test it locally too. Reproducible: Always Steps to Reproduce: 1. Follow https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100102#c0 Portage 3.0.18 (python 3.9.4-final-0, default/linux/amd64/17.1/desktop/plasma/systemd, gcc-10.3.0, glibc-2.33, 5.10.27-gentoo x86_64) ================================================================= System uname: Linux-5.10.27-gentoo-x86_64-Intel-R-_Core-TM-_i7-8550U_CPU_@_1.80GHz-with-glibc2.33 KiB Mem: 24373928 total, 3054148 free KiB Swap: 6291452 total, 2722288 free Timestamp of repository gentoo: Mon, 07 Jun 2021 09:20:15 +0000 Head commit of repository gentoo: 9d7b2aaa433f7009ceb4b38f6bad2b85fcff19fa Timestamp of repository guru: Sun, 06 Jun 2021 13:05:11 +0000 Head commit of repository guru: a97838263891d01dcea81a8679090375a5fff534 Timestamp of repository kde: Fri, 04 Jun 2021 01:20:50 +0000 Head commit of repository kde: 3b068aef6a6a40a734fe9e20b57e666eaad8c963 Timestamp of repository steam-overlay: Fri, 04 Jun 2021 01:20:43 +0000 Head commit of repository steam-overlay: 85bd4fd8659af314241b957fe19733d7f8c5fba1 sh bash 5.1_p8 ld GNU ld (Gentoo 2.35.2 p1) 2.35.2 app-shells/bash: 5.1_p8::gentoo dev-lang/perl: 5.32.1::gentoo dev-lang/python: 2.7.18_p9::gentoo, 3.8.9_p2::gentoo, 3.9.4_p1::gentoo dev-lang/rust: 1.52.1::gentoo dev-lang/rust-bin: 1.52.1::gentoo dev-util/cmake: 3.18.5::gentoo sys-apps/baselayout: 2.7::gentoo sys-apps/sandbox: 2.24::gentoo sys-devel/autoconf: 2.13-r1::gentoo, 2.69-r5::gentoo sys-devel/automake: 1.16.3-r1::gentoo sys-devel/binutils: 2.35.2::gentoo sys-devel/gcc: 10.3.0::gentoo sys-devel/gcc-config: 2.4::gentoo sys-devel/libtool: 2.4.6-r6::gentoo sys-devel/make: 4.3::gentoo sys-kernel/linux-headers: 5.10::gentoo (virtual/os-headers) sys-libs/glibc: 2.33::gentoo Repositories: gentoo location: /usr/portage sync-type: git sync-uri: https://github.com/gentoo-mirror/gentoo.git priority: -1000 guru location: /var/db/repos/guru sync-type: git sync-uri: https://github.com/gentoo-mirror/guru.git masters: gentoo kde location: /var/db/repos/kde sync-type: git sync-uri: https://github.com/gentoo-mirror/kde.git masters: gentoo steam-overlay location: /var/db/repos/steam-overlay sync-type: git sync-uri: https://github.com/gentoo-mirror/steam-overlay.git masters: gentoo strohel location: /home/strohel/projekty/strohel-overlay masters: gentoo Installed sets: @japanese-fonts, @locations-rs, @media-sync-lite-deps, @ninastoire, @strohel.github.io, @tonari ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="*" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=native -ggdb -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-march=native -ggdb -O2 -pipe" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="--quiet-build=y" ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH 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="-march=native -ggdb -O2 -pipe" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs compressdebug config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-march=native -ggdb -O2 -pipe" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="en_US.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j8" PKGDIR="/var/cache/binpkgs" 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="X a52 aac acl acpi alsa amd64 ayatana berkdb bluetooth branding btrfs bzip2 cairo cargo cdr cgroup-hybrid cjk cli clippy crypt cups dbus declarative dri dri3 dts dvdr egl emboss emoji encode exif fingerprints flac fortran gdbm gif git gles gpm grub gtk gtk3 gui highlight hostonly http2 iconv icu ipv6 jpeg jumbo-build kde kipi kwallet lastfm lcms libglvnd libnotify libtirpc lm-sensors lm_sensors lspclient mad mariadb markdown mng mp3 mp4 mpeg mpris multilib ncurses networkmanager nightly nls nptl ofa ogg opengl openmp pam pango pch pcre pdf pdfimport phonon plasma png policykit ppds projectm pulseaudio python qml qt5 raw readline rls rustfmt scd-shared-access sdl seccomp semantic-desktop spell split-usr sqlite ssl startup-notification steamfonts svg symlink system-llvm systemd taglib tcpd theora threads thumbnail thunderbolt tiff touchpad trayicon truetype udev udisks unicode upower usb user-session v4l vaapi vdpau vorbis vulkan wasm wayland webengine webp widgets x264 xattr xcb xml xv xvid xvmc zlib zstd" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core authz_host dir mime socache_shmcb rewrite proxy proxy_http headers unixd" APACHE2_MPMS="event" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="evdev libinput synaptics" KERNEL="linux" L10N="cs en en-GB fr" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="ARM BPF WebAssembly X86" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-3 php7-4" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_9" PYTHON_TARGETS="python3_9" RUBY_TARGETS="ruby26" USERLAND="GNU" VIDEO_CARDS="intel i965 iris" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RUSTFLAGS
@slyfox, once Patrick Palka has backported these fixes, could we cherry-pick them?
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=410694b37724fd4afce934a8eb8aae7e8d4b4084 commit 410694b37724fd4afce934a8eb8aae7e8d4b4084 Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2021-06-08 07:09:44 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2021-06-08 07:09:44 +0000 10.3.0: pull upstream c++/PR1100102 (fix tsubst ICE) Reported-by: Matěj Laitl Bug: https://bugs.gentoo.org/794775 Bug: https://gcc.gnu.org/PR100102 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> 10.3.0/gentoo/34_all_ICE-tsubst-PR100102.patch | 133 +++++++++++++++++++++++++ 10.3.0/gentoo/README.history | 1 + 2 files changed, 134 insertions(+) https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=e5964165059455bd9c45b559c11c470b6c8eb995 commit e5964165059455bd9c45b559c11c470b6c8eb995 Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2021-06-08 07:05:23 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2021-06-08 07:07:32 +0000 11.1.0: pull upstream c++/PR1100102 (fix tsubst ICE) Reported-by: Matěj Laitl Bug: https://bugs.gentoo.org/794775 Bug: https://gcc.gnu.org/PR100102 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> 11.1.0/gentoo/31_all_ICE-tsubst-PR100102.patch | 128 +++++++++++++++++++++++++ 11.1.0/gentoo/README.history | 1 + 2 files changed, 129 insertions(+)
New patchset should be released into ::gentoo in a few weeks. Until then you can drop the patch https://gitweb.gentoo.org/proj/gcc-patches.git/plain/10.3.0/gentoo/34_all_ICE-tsubst-PR100102.patch to /etc/portage/patches/sys-devel/gcc:10 and check if it fixes failures for you.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=9d40799e2ef69d8650dd59325c0e84b902258b00 commit 9d40799e2ef69d8650dd59325c0e84b902258b00 Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2021-06-10 07:28:54 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2021-06-10 07:28:54 +0000 11.1.0: cut 2 patchset Five new patches: + 27_all_msp430-f2c.patch: fix build on 16-bit targets + 28_all_ctor-union-PR100489.patch: fix ICE on some c++ initializers + 29_all_perfect-implicit-PR100644.patch: fix move deletion (fireofx build) + 30_all_arm-lto-ICE-march-mix.patch: fix LTO ICE on arm -march=/-mtune mix + 31_all_ICE-tsubst-PR100102.patch: Bug: https://gcc.gnu.org/PR100361 Bug: https://bugs.gentoo.org/788829 Bug: https://gcc.gnu.org/PR100489 Bug: https://gcc.gnu.org/PR100644 Bug: https://bugs.gentoo.org/792705 Bug: https://gcc.gnu.org/PR100767 Bug: https://bugs.gentoo.org/792291 Bug: https://bugs.gentoo.org/794775 Bug: https://gcc.gnu.org/PR100102 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> 11.1.0/gentoo/README.history | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=4fdc5533816df36a81b6c57dcf7c2233a87f2d46 commit 4fdc5533816df36a81b6c57dcf7c2233a87f2d46 Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2021-06-10 07:40:21 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2021-06-10 07:40:21 +0000 10.3.0: cut 2 patchset Five new patches: + 33_all_ctor-union-PR100489.patch: fix ICE on some c++ initializers + 34_all_ICE-tsubst-PR100102.patch: fix ICE in c++ tempate substitution Bug: https://bugs.gentoo.org/788829 Bug: https://gcc.gnu.org/PR100489 Bug: https://bugs.gentoo.org/794775 Bug: https://gcc.gnu.org/PR100102 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> 10.3.0/gentoo/README.history | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=187f062a6f1a768d0e33e0f10c63feb2e74d0b49 commit 187f062a6f1a768d0e33e0f10c63feb2e74d0b49 Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2021-06-10 07:49:15 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2021-06-10 07:50:32 +0000 sys-devel/gcc: 10.3.0: cut 2 patchset Two new patches: + 33_all_ctor-union-PR100489.patch: fix ICE on some c++ initializers + 34_all_ICE-tsubst-PR100102.patch: fix ICE in c++ tempate substitution Bug: https://bugs.gentoo.org/788829 Bug: https://gcc.gnu.org/PR100489 Bug: https://bugs.gentoo.org/794775 Bug: https://gcc.gnu.org/PR100102 Package-Manager: Portage-3.0.19, Repoman-3.0.3 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> sys-devel/gcc/Manifest | 1 + sys-devel/gcc/gcc-10.3.0-r1.ebuild | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b250f4243abd49acdd459751ae1e55c995bf9818 commit b250f4243abd49acdd459751ae1e55c995bf9818 Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2021-06-10 07:39:30 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2021-06-10 07:50:31 +0000 sys-devel/gcc: 11.1.0: cut 2 patchset Five new patches: + 27_all_msp430-f2c.patch: fix build on 16-bit targets + 28_all_ctor-union-PR100489.patch: fix ICE on some c++ initializers + 29_all_perfect-implicit-PR100644.patch: fix move deletion (fireofx build) + 30_all_arm-lto-ICE-march-mix.patch: fix LTO ICE on arm -march=/-mtune mix + 31_all_ICE-tsubst-PR100102.patch: fix ICE in c++ tempate substitution Bug: https://gcc.gnu.org/PR100361 Bug: https://bugs.gentoo.org/788829 Bug: https://gcc.gnu.org/PR100489 Bug: https://gcc.gnu.org/PR100644 Bug: https://bugs.gentoo.org/792705 Bug: https://gcc.gnu.org/PR100767 Bug: https://bugs.gentoo.org/792291 Bug: https://bugs.gentoo.org/794775 Bug: https://gcc.gnu.org/PR100102 Package-Manager: Portage-3.0.19, Repoman-3.0.3 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> sys-devel/gcc/Manifest | 1 + sys-devel/gcc/gcc-11.1.0-r1.ebuild | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+)
Should be fixed in gcc-11.1.0-r1 and gcc-10.3.0-r1.
Thanks! Somewhat late, but I can confirm dropping the patch to /etc/portage/patches fixed the problem for me.