Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 630958 - sys-libs/compiler-rt-sanitizers-5.0.0 fails test GotsanRuntimeCheck
Summary: sys-libs/compiler-rt-sanitizers-5.0.0 fails test GotsanRuntimeCheck
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: LLVM support project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-14 08:02 UTC by Paolo Pedroni
Modified: 2018-01-09 20:45 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
compiler-rt-sanitizers-5.0.0:20170914-072305.log.gz (compiler-rt-sanitizers-5.0.020170914-072305.log.gz,41.47 KB, application/gzip)
2017-09-14 08:02 UTC, Paolo Pedroni
Details
0001-remove-SILENT-from-gotsan-test.patch (0001-remove-SILENT-from-gotsan-test.patch,950 bytes, patch)
2017-09-19 12:13 UTC, Michał Górny
Details | Diff
compiler-rt-sanitizers-5.0.0:20170921-071333.log.gz (compiler-rt-sanitizers-5.0.0:20170921-071333.log.gz,43.98 KB, application/gzip)
2017-09-21 07:20 UTC, Paolo Pedroni
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paolo Pedroni 2017-09-14 08:02:10 UTC
Created attachment 494478 [details]
compiler-rt-sanitizers-5.0.0:20170914-072305.log.gz

[130/162] cd /var/tmp/portage_ondisk/portage/sys-libs/compiler-rt-sanitizers-5.0.0/work/compiler-rt-sanitizers-5.0.0_build/lib/asan/
tests && /var/tmp/portage_ondisk/portage/sys-libs/compiler-rt-sanitizers-5.0.0/work/compiler-rt-sanitizers-5.0.0_build/lib/llvm/5/bi
n/clang -O2 -pipe -march=sandybridge -ftree-vectorize -Wall -std=c++11 -Wno-unused-parameter -Wno-unknown-warning-option -DGTEST_NO_
LLVM_RAW_OSTREAM=1 -DGTEST_HAS_RTTI=0 -I/var/tmp/portage_ondisk/portage/sys-libs/compiler-rt-sanitizers-5.0.0/work/llvm/utils/unitte
st/googletest/include -I/var/tmp/portage_ondisk/portage/sys-libs/compiler-rt-sanitizers-5.0.0/work/llvm/utils/unittest/googletest -I
/var/tmp/portage_ondisk/portage/sys-libs/compiler-rt-sanitizers-5.0.0/work/compiler-rt-5.0.0.src/include -I/var/tmp/portage_ondisk/p
ortage/sys-libs/compiler-rt-sanitizers-5.0.0/work/compiler-rt-5.0.0.src/lib -I/var/tmp/portage_ondisk/portage/sys-libs/compiler-rt-s
anitizers-5.0.0/work/compiler-rt-5.0.0.src/lib/asan -I/var/tmp/portage_ondisk/portage/sys-libs/compiler-rt-sanitizers-5.0.0/work/com
piler-rt-5.0.0.src/lib/sanitizer_common/tests -fno-rtti -O2 -Wno-format -Werror=sign-compare -Wno-non-virtual-dtor -Wno-variadic-mac
ros -gline-tables-only -DASAN_HAS_BLACKLIST=1 -DASAN_HAS_EXCEPTIONS=1 -DASAN_UAR=0 -m64 -c -o ASAN_NOINST_TEST_OBJECTS.gtest-all.cc.
x86_64-inline.o /var/tmp/portage_ondisk/portage/sys-libs/compiler-rt-sanitizers-5.0.0/work/llvm/utils/unittest/googletest/src/gtest-
all.cc
[131/162] cd /var/tmp/portage_ondisk/portage/sys-libs/compiler-rt-sanitizers-5.0.0/work/compiler-rt-sanitizers-5.0.0_build/lib/asan/
tests && /var/tmp/portage_ondisk/portage/sys-libs/compiler-rt-sanitizers-5.0.0/work/compiler-rt-sanitizers-5.0.0_build/lib/llvm/5/bi
n/clang -O2 -pipe -march=sandybridge -ftree-vectorize -Wall -std=c++11 -Wno-unused-parameter -Wno-unknown-warning-option -DGTEST_NO_
LLVM_RAW_OSTREAM=1 -DGTEST_HAS_RTTI=0 -I/var/tmp/portage_ondisk/portage/sys-libs/compiler-rt-sanitizers-5.0.0/work/llvm/utils/unitte
st/googletest/include -I/var/tmp/portage_ondisk/portage/sys-libs/compiler-rt-sanitizers-5.0.0/work/llvm/utils/unittest/googletest -I
/var/tmp/portage_ondisk/portage/sys-libs/compiler-rt-sanitizers-5.0.0/work/compiler-rt-5.0.0.src/include -I/var/tmp/portage_ondisk/p
ortage/sys-libs/compiler-rt-sanitizers-5.0.0/work/compiler-rt-5.0.0.src/lib -I/var/tmp/portage_ondisk/portage/sys-libs/compiler-rt-s
anitizers-5.0.0/work/compiler-rt-5.0.0.src/lib/asan -I/var/tmp/portage_ondisk/portage/sys-libs/compiler-rt-sanitizers-5.0.0/work/com
piler-rt-5.0.0.src/lib/sanitizer_common/tests -fno-rtti -O2 -Wno-format -Werror=sign-compare -Wno-non-virtual-dtor -Wno-variadic-mac
ros -gline-tables-only -DASAN_HAS_BLACKLIST=1 -DASAN_HAS_EXCEPTIONS=1 -DASAN_UAR=0 -fsanitize=address -fsanitize-blacklist=/var/tmp/
portage_ondisk/portage/sys-libs/compiler-rt-sanitizers-5.0.0/work/compiler-rt-5.0.0.src/lib/asan/tests/asan_test.ignore -mllvm -asan
-instrument-assembly -m32 -c -o ASAN_INST_TEST_OBJECTS.asan_test.cc.i386-inline.o /var/tmp/portage_ondisk/portage/sys-libs/compiler-
rt-sanitizers-5.0.0/work/compiler-rt-5.0.0.src/lib/asan/tests/asan_test.cc
[132/162] cd /var/tmp/portage_ondisk/portage/sys-libs/compiler-rt-sanitizers-5.0.0/work/compiler-rt-5.0.0.src/lib/tsan/go && env "CC
=/usr/lib64/distcc/bin/x86_64-pc-linux-gnu-gcc " IN_TMPDIR=1 SILENT=1 /var/tmp/portage_ondisk/portage/sys-libs/compiler-rt-sanitizer
s-5.0.0/work/compiler-rt-5.0.0.src/lib/tsan/go/buildgo.sh
FAILED: lib/tsan/CMakeFiles/GotsanRuntimeCheck
^^^^^^
cd /var/tmp/portage_ondisk/portage/sys-libs/compiler-rt-sanitizers-5.0.0/work/compiler-rt-5.0.0.src/lib/tsan/go && env "CC=/usr/lib6
4/distcc/bin/x86_64-pc-linux-gnu-gcc " IN_TMPDIR=1 SILENT=1 /var/tmp/portage_ondisk/portage/sys-libs/compiler-rt-sanitizers-5.0.0/wo
rk/compiler-rt-5.0.0.src/lib/tsan/go/buildgo.sh

#  emerge --info =sys-libs/compiler-rt-sanitizers-5.0.0
Portage 2.3.6 (python 3.5.3-final-0, default/linux/amd64/13.0/desktop/plasma/systemd, gcc-6.4.0, glibc-2.23-r4, 4.12.9-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.12.9-gentoo-x86_64-Intel-R-_Core-TM-_i7-2600_CPU_@_3.40GHz-with-gentoo-2.3
KiB Mem:    15864960 total,   6798692 free
KiB Swap:    8171516 total,   8171516 free
Timestamp of repository gentoo: Wed, 13 Sep 2017 06:45:01 +0000
sh dash 0.5.8.2
ld GNU gold (Gentoo 2.28.1 p1.0 2.28.1) 1.14
distcc 3.2rc1 x86_64-pc-linux-gnu [enabled]
ccache version 3.3.4 [disabled]
app-shells/bash:          4.3_p48-r1::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.24.1-r2::gentoo
dev-lang/python:          2.7.13::gentoo, 3.5.3::gentoo
dev-util/ccache:          3.3.4-r1::gentoo
dev-util/cmake:           3.7.2::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/sandbox:         2.10-r3::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.11.6-r1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.28.1::gentoo
sys-devel/gcc:            6.4.0::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.10::gentoo (virtual/os-headers)
sys-libs/glibc:           2.23-r4::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.europe.gentoo.org/gentoo-portage
    priority: -1000

x-portage
    location: /usr/local/portage
    masters: gentoo
    priority: 0

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=sandybridge -msahf --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=8192 -flto=8 -fuse-linker-plugin -floop-nest-optimize -ftree-loop-distribution -fgraphite-identity -ftree-vectorize"
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/php/apache2-php7.0/ext-active/ /etc/php/cgi-php7.0/ext-active/ /etc/php/cli-php7.0/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=sandybridge -msahf --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=8192 -flto=8 -fuse-linker-plugin -floop-nest-optimize -ftree-loop-distribution -fgraphite-identity -ftree-vectorize"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--keep-going y --with-bdeps y"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs cgroup compress-build-logs config-protect-if-modified distcc distlocks ebuild-locks ipc-sandbox merge-sync news parallel-fetch protect-owned sandbox sfperms split-elog split-log strict test unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://tux.rainside.sk/gentoo/ http://mirror.leaseweb.com/gentoo/ http://ftp.uni-erlangen.de/pub/mirrors/gentoo http://ftp.spline.inf.fu-berlin.de/mirrors/gentoo/"
LANG="it_IT.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -Wl,--sort-common -flto=8 -fuse-linker-plugin -floop-nest-optimize -ftree-loop-distribution -fgraphite-identity -ftree-vectorize"
MAKEOPTS="-j11 -l8"
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="X a52 aac aalib acl acpi activities adns alsa amd64 ao audiofile bash-completion bluetooth branding bzip2 cairo caps cdda cddb cdparanoia cdr cli cracklib crypt css cups curl cxx dbus declarative dga djvu dri dts dvd dvdr emboss encode exif expat fbcon ffmpeg fftw firefox flac fontconfig foomaticdb fortran ftp gd gdbm geoip gif gimp glamor gmp gnutls gphoto2 gpm graphviz gtk handbook iconv icu idn imagemagick imlib ipv6 java javascript jbig jpeg jpeg2k kde kipi kwallet lame lcms libass libcaca libnotify libsamplerate lm_sensors lua lzma lzo mad mmap mng modules mp3 mp4 mpeg mplayer multilib musicbrainz ncurses nls nptl nsplugin offensive ogg openal openexr opengl openmp pam pango pcre pdf phonon plasma png policykit postscript ppds pulseaudio qml qt3support qt4 qt5 rdesktop readline recode samba sctp sdl seccomp session sndfile sockets speex spell sqlite ssl startup-notification subversion svg symlink syslog systemd sysvipc taglib theora threads tidy tiff truetype udev udisks unicode upower usb vaapi vcd vim-syntax vnc vorbis wayland widgets win32codecs wmf wxwidgets x264 xattr xcb xcomposite xine xinerama xml xpm xscreensaver xv xvid yahoo zlib" ABI_X86="64" ALSA_CARDS="hda-intel virmidi" 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="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="kodak ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" CURL_SSL="gnutls" 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" GRUB_PLATFORMS="pc" INPUT_DEVICES="libinput" KERNEL="linux" L10N="it en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="nlpsolver" LINGUAS="it it_IT" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" POSTGRES_TARGETS="postgres9_5" PYTHON_TARGETS="python2_7 python3_5 pypy pypy3" RUBY_TARGETS="ruby22" USERLAND="GNU" VIDEO_CARDS="intel i965" 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, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

# emerge -1pqv =sys-libs/compiler-rt-sanitizers-5.0.0
[ebuild  N    ] sys-libs/compiler-rt-sanitizers-5.0.0  USE="{test}"
Comment 1 Toralf Förster gentoo-dev 2017-09-15 08:06:07 UTC
At my tinderbox I had to kill the test suite after 8 hours of inactivity, and yes, there're multiple issues with the test suite.
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2017-09-19 12:06:15 UTC
Hmm, do you have dev-lang/go installed?
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2017-09-19 12:13:18 UTC
Created attachment 495426 [details, diff]
0001-remove-SILENT-from-gotsan-test.patch

Could you apply this patch to the package's sources (e.g. via user patches) and attach the build log afterwards? It should get verbose results from the failing list.
Comment 4 Paolo Pedroni 2017-09-19 17:29:01 UTC
(In reply to Michał Górny from comment #2)
> Hmm, do you have dev-lang/go installed?

Yes.
Comment 5 Paolo Pedroni 2017-09-19 17:30:13 UTC
(In reply to Michał Górny from comment #3)
> Created attachment 495426 [details, diff] [details, diff]
> 0001-remove-SILENT-from-gotsan-test.patch
> 
> Could you apply this patch to the package's sources (e.g. via user patches)
> and attach the build log afterwards? It should get verbose results from the
> failing list.

I will try, but no sooner than thursday, when I'm back at work.
Comment 6 Paolo Pedroni 2017-09-21 07:19:05 UTC
(In reply to Michał Górny from comment #3)
> Created attachment 495426 [details, diff] [details, diff]
> 0001-remove-SILENT-from-gotsan-test.patch
> 
> Could you apply this patch to the package's sources (e.g. via user patches)
> and attach the build log afterwards? It should get verbose results from the
> failing list.

[146/162] cd /var/tmp/portage_ondisk/portage/sys-libs/compiler-rt-sanitizers-5.0.0/work/compiler-rt-5.0.0.src/lib/tsan/go && env "CC=/usr/lib64/distcc/bin/x86_64-pc-linux-gnu-gcc " IN_TMPDIR=1 /var/tmp/portage_ondisk/portage/sys-libs/compiler-rt-sanitizers-5.0.0/work/compiler-rt-5.0.0.src/lib/tsan/go/buildgo.sh
FAILED: lib/tsan/CMakeFiles/GotsanRuntimeCheck 
cd /var/tmp/portage_ondisk/portage/sys-libs/compiler-rt-sanitizers-5.0.0/work/compiler-rt-5.0.0.src/lib/tsan/go && env "CC=/usr/lib64/distcc/bin/x86_64-pc-linux-gnu-gcc " IN_TMPDIR=1 /var/tmp/portage_ondisk/portage/sys-libs/compiler-rt-sanitizers-5.0.0/work/compiler-rt-5.0.0.src/lib/tsan/go/buildgo.sh
/usr/lib64/distcc/bin/x86_64-pc-linux-gnu-gcc gotsan.cc -c -o /tmp/gotsan.eUouLVSGII/race_linux_amd64.syso -I../rtl -I../.. -I../../sanitizer_common -I../../../include -std=c++11 -m64 -Wall -fno-exceptions -fno-rtti -DSANITIZER_GO=1 -DSANITIZER_DEADLOCK_DETECTOR_VERSION=2 -fPIC -ffreestanding -Wno-maybe-uninitialized -Wno-unused-const-variable -Werror -Wno-unknown-warning-option -DSANITIZER_DEBUG=0 -O3 -msse3 -fomit-frame-pointer -O2 -pipe -march=sandybridge -ftree-vectorize
==3575==ERROR: ThreadSanitizer failed to allocate 0x4000 (16384) bytes at address 1756dd9d00000 (errno: 12)
Segmentation fault (core dumped)
Comment 7 Paolo Pedroni 2017-09-21 07:20:57 UTC
Created attachment 495724 [details]
compiler-rt-sanitizers-5.0.0:20170921-071333.log.gz

Build log with verbose results.
Comment 8 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2017-09-21 08:22:51 UTC
Ok, I suspect -march might be the culprit.

Could you try to run it manually like this:

cd /var/tmp/portage_ondisk/portage/sys-libs/compiler-rt-sanitizers-5.0.0/work/compiler-rt-5.0.0.src/lib/tsan/go

env "CC=x86_64-pc-linux-gnu-gcc" CFLAGS="-O2 -pipe -march=sandybridge -ftree-vectorize" buildgo.sh

If that fails, could you try removing -march from CFLAGS and trying again? Possibly downgrading it to -march=x86-64.
Comment 9 Paolo Pedroni 2017-09-21 08:41:26 UTC
(In reply to Michał Górny from comment #8)
> Ok, I suspect -march might be the culprit.
> 
> Could you try to run it manually like this:
> 
> cd
> /var/tmp/portage_ondisk/portage/sys-libs/compiler-rt-sanitizers-5.0.0/work/
> compiler-rt-5.0.0.src/lib/tsan/go
> 
> env "CC=x86_64-pc-linux-gnu-gcc" CFLAGS="-O2 -pipe -march=sandybridge
> -ftree-vectorize" buildgo.sh
> 
> If that fails, could you try removing -march from CFLAGS and trying again?
> Possibly downgrading it to -march=x86-64.

Same result :(

# env "CC=x86_64-pc-linux-gnu-gcc" CFLAGS="-O2 -pipe -march=sandybridge -ftree-vectorize" ./buildgo.sh
x86_64-pc-linux-gnu-gcc gotsan.cc -c -o ./race_linux_amd64.syso -I../rtl -I../.. -I../../sanitizer_common -I../../../include -std=c++11 -m64 -Wall -fno-exceptions -fno-rtti -DSANITIZER_GO=1 -DSANITIZER_DEADLOCK_DETECTOR_VERSION=2 -fPIC -ffreestanding -Wno-maybe-uninitialized -Wno-unused-const-variable -Werror -Wno-unknown-warning-option -DSANITIZER_DEBUG=0 -O3 -msse3 -fomit-frame-pointer -O2 -pipe -march=sandybridge -ftree-vectorize
==16229==ERROR: ThreadSanitizer failed to allocate 0x4000 (16384) bytes at address 1759ff5080000 (errno: 12)
Segmentation fault (core dumped)
#  env "CC=x86_64-pc-linux-gnu-gcc" CFLAGS="-O2 -pipe -ftree-vectorize" sudo ./buildgo.sh
Password: 
x86_64-pc-linux-gnu-gcc gotsan.cc -c -o ./race_linux_amd64.syso -I../rtl -I../.. -I../../sanitizer_common -I../../../include -std=c++11 -m64 -Wall -fno-exceptions -fno-rtti -DSANITIZER_GO=1 -DSANITIZER_DEADLOCK_DETECTOR_VERSION=2 -fPIC -ffreestanding -Wno-maybe-uninitialized -Wno-unused-const-variable -Werror -Wno-unknown-warning-option -DSANITIZER_DEBUG=0 -O3 -msse3 -fomit-frame-pointer -O2 -pipe -ftree-vectorize
==17862==ERROR: ThreadSanitizer failed to allocate 0x4000 (16384) bytes at address 1785c41580000 (errno: 12)
Segmentation fault (core dumped)
# env "CC=x86_64-pc-linux-gnu-gcc" CFLAGS="-O2 -pipe -march=x86-64 -ftree-vectorize" ./buildgo.sh
x86_64-pc-linux-gnu-gcc gotsan.cc -c -o ./race_linux_amd64.syso -I../rtl -I../.. -I../../sanitizer_common -I../../../include -std=c++11 -m64 -Wall -fno-exceptions -fno-rtti -DSANITIZER_GO=1 -DSANITIZER_DEADLOCK_DETECTOR_VERSION=2 -fPIC -ffreestanding -Wno-maybe-uninitialized -Wno-unused-const-variable -Werror -Wno-unknown-warning-option -DSANITIZER_DEBUG=0 -O3 -msse3 -fomit-frame-pointer -O2 -pipe -march=x86-64 -ftree-vectorize
==18276==ERROR: ThreadSanitizer failed to allocate 0x4000 (16384) bytes at address 176b0e7380000 (errno: 12)
Segmentation fault (core dumped)
Comment 10 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2017-09-21 14:56:48 UTC
Do you happen to have gcc5 or 7 installed? I have both but not 6, so maybe it's an issue specific to gcc6. If so, you could try with CC substituted appropriately.

Another idea would be chown-ing the directory to your user and trying as your regular user. Though I don't think that would be the case.

Do you have any idea what could be 'special' about your configuration that could trigger this?
Comment 11 Paolo Pedroni 2017-09-22 13:53:59 UTC
(In reply to Michał Górny from comment #10)
> Do you happen to have gcc5 or 7 installed?

Sorry, no.

> I have both but not 6, so maybe
> it's an issue specific to gcc6. If so, you could try with CC substituted
> appropriately.

I'll see if I have the time to install another gcc next week. As a further data point, if I use clang instead of gcc, I get:
# env "CC=/usr/lib/llvm/5/bin/clang" CFLAGS="-O2 -pipe -march=sandybridge -ftree-vectorize" sudo ./buildgo.sh
Password: 
/usr/lib/llvm/5/bin/clang gotsan.cc -c -o ./race_linux_amd64.syso -I../rtl -I../.. -I../../sanitizer_common -I../../../include -std=c++11 -m64 -Wall -fno-exceptions -fno-rtti -DSANITIZER_GO=1 -DSANITIZER_DEADLOCK_DETECTOR_VERSION=2 -fPIC -ffreestanding -Wno-maybe-uninitialized -Wno-unused-const-variable -Werror -Wno-unknown-warning-option -DSANITIZER_DEBUG=0 -O3 -msse3 -fomit-frame-pointer -O2 -pipe -march=sandybridge -ftree-vectorize
==================
WARNING: DATA RACE
Read at 0x000000de0000 by goroutine 2:
  <null>()
      <null>:0 +0x0

Previous write at 0x000000de0000 by main goroutine:
  <null>()
      <null>:0 +0x0
  <null>()
      <null>:0 +0x0

Goroutine 2 (running) created at:
  <null>()
      <null>:0 +0x0
==================
Found 1 data race(s)

> 
> Another idea would be chown-ing the directory to your user and trying as
> your regular user. Though I don't think that would be the case.
> 
> Do you have any idea what could be 'special' about your configuration that
> could trigger this?

Most of my system is built with LTO enabled and graphite loop transformations (not GCC, of course, those options are filtered, AFAIK).

Shall I try to uninstall dev-lang/go?
Comment 12 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2017-09-22 15:16:26 UTC
(In reply to Paolo Pedroni from comment #11)
> (In reply to Michał Górny from comment #10)
> > Do you happen to have gcc5 or 7 installed?
> 
> Sorry, no.
> 
> > I have both but not 6, so maybe
> > it's an issue specific to gcc6. If so, you could try with CC substituted
> > appropriately.
> 
> I'll see if I have the time to install another gcc next week. As a further
> data point, if I use clang instead of gcc, I get:
> # env "CC=/usr/lib/llvm/5/bin/clang" CFLAGS="-O2 -pipe -march=sandybridge
> -ftree-vectorize" sudo ./buildgo.sh
> Password: 
> /usr/lib/llvm/5/bin/clang gotsan.cc -c -o ./race_linux_amd64.syso -I../rtl
> -I../.. -I../../sanitizer_common -I../../../include -std=c++11 -m64 -Wall
> -fno-exceptions -fno-rtti -DSANITIZER_GO=1
> -DSANITIZER_DEADLOCK_DETECTOR_VERSION=2 -fPIC -ffreestanding
> -Wno-maybe-uninitialized -Wno-unused-const-variable -Werror
> -Wno-unknown-warning-option -DSANITIZER_DEBUG=0 -O3 -msse3
> -fomit-frame-pointer -O2 -pipe -march=sandybridge -ftree-vectorize
> ==================
> WARNING: DATA RACE
> Read at 0x000000de0000 by goroutine 2:
>   <null>()
>       <null>:0 +0x0
> 
> Previous write at 0x000000de0000 by main goroutine:
>   <null>()
>       <null>:0 +0x0
>   <null>()
>       <null>:0 +0x0
> 
> Goroutine 2 (running) created at:
>   <null>()
>       <null>:0 +0x0
> ==================
> Found 1 data race(s)

Well, that's the expected result. So at least we know it's specific to gcc in your system.

> > Another idea would be chown-ing the directory to your user and trying as
> > your regular user. Though I don't think that would be the case.
> > 
> > Do you have any idea what could be 'special' about your configuration that
> > could trigger this?
> 
> Most of my system is built with LTO enabled and graphite loop
> transformations (not GCC, of course, those options are filtered, AFAIK).

Hmm, but then it would have to be something that's used by gcc but not by clang. No clue what that could be.

> Shall I try to uninstall dev-lang/go?

I don't think that's relevant. That was a bad guess.
Comment 13 Paolo Pedroni 2017-09-27 10:06:48 UTC
I tried with gcc-7.2.0 and got the same error...
Comment 14 Paolo Pedroni 2017-11-07 14:17:12 UTC
I rebuilt my whole system without graphite loop trasformations and I still get this same error.
Comment 15 eroen 2017-11-20 16:54:38 UTC
I also see a segfault in the GotsanRuntimeCheck test with both gcc 6.4 and 7.2. Fwiw, the rest of the system is ~amd64 built with gcc 6.4 and -Og.
Comment 16 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2017-12-14 20:12:33 UTC
Good or bad news. I've just started hitting this on my LLVM testing chroot.
Comment 17 Larry the Git Cow gentoo-dev 2018-01-09 20:45:34 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=69f0549cf61cd3a3f1293565ad46698c81cd8802

commit 69f0549cf61cd3a3f1293565ad46698c81cd8802
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2018-01-09 20:38:34 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2018-01-09 20:45:21 +0000

    sys-libs/compiler-rt-sanitizers: Default to building using clang
    
    Default to building using clang rather than gcc since the latter
    is starting to cause more issues, most notably GotsanRuntimeCheck
    segfaulting more commonly than it used to.
    
    Closes: https://bugs.gentoo.org/630958

 .../compiler-rt-sanitizers-6.0.9999.ebuild                    | 11 +++++++++--
 .../compiler-rt-sanitizers/compiler-rt-sanitizers-9999.ebuild | 11 +++++++++--
 sys-libs/compiler-rt-sanitizers/metadata.xml                  |  4 ++++
 3 files changed, 22 insertions(+), 4 deletions(-)