Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 683856 - dev-lang/rust-bin-1.34.0-r1 : rustc segfaults (signal: 11, SIGSEGV: invalid memory reference)
Summary: dev-lang/rust-bin-1.34.0-r1 : rustc segfaults (signal: 11, SIGSEGV: invalid m...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Rust Project
URL: https://github.com/rust-lang/rust/iss...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-19 19:42 UTC by Michal Jakubowski
Modified: 2019-04-24 18:47 UTC (History)
2 users (show)

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


Attachments
build.log (build.log,6.94 KB, text/plain)
2019-04-19 19:42 UTC, Michal Jakubowski
Details
rustc.trace (rustc.trace,245.18 KB, text/plain)
2019-04-24 16:55 UTC, Michal Jakubowski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michal Jakubowski 2019-04-19 19:42:51 UTC
Created attachment 573460 [details]
build.log

>>> Source unpacked in /var/tmp/portage/sys-apps/ripgrep-11.0.1/work
>>> Preparing source in /var/tmp/portage/sys-apps/ripgrep-11.0.1/work/ripgrep-11.0.1 ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/sys-apps/ripgrep-11.0.1/work/ripgrep-11.0.1 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/sys-apps/ripgrep-11.0.1/work/ripgrep-11.0.1 ...
error: process didn't exit successfully: `rustc -vV` (signal: 11, SIGSEGV: invalid memory reference)
 * ERROR: sys-apps/ripgrep-11.0.1::gentoo failed (compile phase):
 *   cargo build failed
 * 
 * Call stack:
 *     ebuild.sh, line  124:  Called src_compile
 *   environment, line 1381:  Called cargo_src_compile '--features' 'pcre2'
 *   environment, line  581:  Called die
 * The specific snippet of code:
 *       cargo build -j $(makeopts_jobs) $(usex debug "" --release) "$@" || die "cargo build failed"
 *
Comment 1 Michal Jakubowski 2019-04-19 19:44:15 UTC
Portage 2.3.63 (python 3.6.8-final-0, default/linux/amd64/17.0/desktop/plasma, gcc-8.3.0, glibc-2.29-r2, 5.0.7-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.0.7-gentoo-x86_64-Intel-R-_Core-TM-_i7-4900MQ_CPU_@_2.80GHz-with-gentoo-2.6
KiB Mem:    16100144 total,   9851424 free
KiB Swap:    8388604 total,   8388604 free
Head commit of repository 4nykey: c6898884a005a8fc7adf334aa0056534be09941f

Head commit of repository ROKO__: d48163dcca16a91750f1ccfa832e8fe5751fc868

Head commit of repository bliss-overlay: 150f6a676bb8abd52255cfe22ca5d158dae3bbca

Timestamp of repository earshark: Thu, 18 Apr 2019 14:45:26 +0000
Head commit of repository earshark: 38b1615a7d3746f0676f6133573556d51047fc8a

Timestamp of repository roslin: Thu, 21 Mar 2019 18:52:51 +0000
Head commit of repository roslin: 99c78cda9afa63d6bd77329bf05bb5baed2b5ce7

Head commit of repository steam-overlay: eb6b5b1008950ac54d897f5426e1553d3a41ba69

Head commit of repository stuff: c98dbd2b5149163105cc99af5ce08e790e16265d

Timestamp of repository gentoo: Fri, 19 Apr 2019 19:05:06 +0000
Head commit of repository gentoo: 8dcbf404883acba04036786ef282fd77f3e398e6

sh bash 5.0_p3-r1
ld GNU ld (Gentoo 2.32 p2) 2.32.0
ccache version 3.6 [enabled]
app-shells/bash:          5.0_p3-r1::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.28.2::gentoo
dev-lang/python:          2.7.16::gentoo, 3.5.7::gentoo, 3.6.8::gentoo, 3.7.3::gentoo
dev-util/ccache:          3.6::gentoo
dev-util/cmake:           3.14.2::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.41.2::gentoo
sys-apps/sandbox:         2.17::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.11.6-r3::gentoo, 1.13.4-r2::gentoo, 1.16.1-r1::gentoo
sys-devel/binutils:       2.32-r1::gentoo
sys-devel/gcc:            8.3.0-r1::gentoo
sys-devel/gcc-config:     2.0::gentoo
sys-devel/libtool:        2.4.6-r5::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 5.0-r1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.29-r2::gentoo
Repositories:

4nykey
    location: /var/lib/overlays/4nykey
    sync-type: git
    sync-uri: https://github.com/4nykey/4nykey.git
    masters: gentoo

ROKO__
    location: /var/lib/overlays/ROKO__
    sync-type: git
    sync-uri: https://github.com/sandikata/ROKO__
    masters: gentoo

bliss-overlay
    location: /var/lib/overlays/bliss-overlay
    sync-type: git
    sync-uri: https://github.com/fearedbliss/bliss-overlay.git
    masters: gentoo

earshark
    location: /var/lib/overlays/earshark
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/earshark.git
    masters: gentoo

roslin
    location: /var/lib/overlays/roslin
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/roslin.git
    masters: gentoo

steam-overlay
    location: /var/lib/overlays/steam-overlay
    sync-type: git
    sync-uri: https://github.com/anyc/steam-overlay.git
    masters: gentoo

stuff
    location: /var/lib/overlays/stuff
    sync-type: git
    sync-uri: https://github.com/istitov/stuff.git
    masters: gentoo

gentoo
    location: /usr/portage
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo.git
    priority: 1000

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /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.3/ext-active/ /etc/php/cgi-php7.3/ext-active/ /etc/php/cli-php7.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=native"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps=y --keep-going=y --quiet-build"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN 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="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg ccache collision-protect 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 sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://ftp.vectranet.pl/gentoo/"
LANG="en_US.utf8"
LDFLAGS="-Wl,--hash-style=gnu"
LINGUAS="en pl"
MAKEOPTS="-j8"
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 acl acpi activities alsa amd64 berkdb bluetooth bzip2 cairo cdda cdr cli consolekit crypt cups cxx dbus declarative dri dts dvd dvdr emboss encode exif fam flac fortran gallium gdbm gif glamor gpm gtk iconv ipv6 jpeg kde kipi kwallet laptop lcms ldap libnotify libtirpc libzfs mad mng mp3 mp4 mpeg multilib ncurses nls nptl ogg opengl openmp pam pango pcre pdf phonon plasma png policykit ppds pulseaudio qml qt5 readline sdl seccomp semantic-desktop spell ssl startup-notification svg tcpd tiff truetype udev udisks unicode upower usb vaapi vorbis widgets wxwidgets x264 xattr xcb xcomposite xml xv xvid zfs zlib" ABI_X86="64" 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 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 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 isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="pc emu efi-64" INPUT_DEVICES="libinput synaptics mouse keyboard evdev" KERNEL="linux" L10N="en en_US pl pl_PL" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-1" POSTGRES_TARGETS="postgres9_5 postgres10" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" RUBY_TARGETS="ruby24" USERLAND="GNU" VIDEO_CARDS="intel i965 nvidia" 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_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 2 Georgy Yakovlev archtester gentoo-dev 2019-04-19 20:06:54 UTC
can you please provide output of 

emerge --info <rust>

where <rust> is the rust compiler you used, dev-lang/rust or dev-lang/rust-bin
?
Comment 3 Georgy Yakovlev archtester gentoo-dev 2019-04-20 05:07:37 UTC
my gut feeling tells me it's system-llvm again, if someone encountered this bug please let me know if your rust is built with system-llvm.
Comment 4 Michal Jakubowski 2019-04-23 21:08:58 UTC
(In reply to Georgy Yakovlev from comment #2)
> can you please provide output of 
> 
> emerge --info <rust>
> 
> where <rust> is the rust compiler you used, dev-lang/rust or
> dev-lang/rust-bin
> ?

=================================================================
                        Package Settings
=================================================================

dev-lang/rust-bin-1.34.0-r1::gentoo was built with the following:
USE="(-clippy) -doc -libressl -rustfmt" ABI_X86="(64) -32 (-x32)" CPU_FLAGS_X86="sse2"

┌─[root@T440p] - [~] - [2019-04-23 11:08:45]
└─[0] rustc       
[1]    7534 segmentation fault  rustc
┌─[root@T440p] - [~] - [2019-04-23 11:08:47]
└─[139]
Comment 5 Georgy Yakovlev archtester gentoo-dev 2019-04-24 00:02:50 UTC
Looks like binpkg is broken on your system.

please run this:


strace -k -f -s 1024 -o rustc.trace rustc


and send the resultin rustc.trace

for this to work you have to have dev-util/strace installed with elfutils or unwind useflag enabled. I recommend USE=elfutils for it.


also will be helpful if you run rustc with gdb

gdb rustc
(gdb) run
(gdb) thread apply all bt full
(gdb) where

and send output.



can't reproduce on different CPUs and systems.
I'm on the same kernel/glibc as you.
Comment 6 Michal Jakubowski 2019-04-24 16:55:47 UTC
Created attachment 573972 [details]
rustc.trace
Comment 7 Michal Jakubowski 2019-04-24 17:03:13 UTC
┌─[root@T440p] - [~] - [2019-04-24 07:01:39]
└─[0] gdb rustc
GNU gdb (Gentoo 8.3.50.20190312 p1) 8.3.50.20190312-git
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://bugs.gentoo.org/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from rustc...
(No debugging symbols found in rustc)
(gdb) run
Starting program: /usr/bin/rustc 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) thread apply all bt full

Thread 1 (Thread 0x7ffff1217400 (LWP 5538)):
#0  0x0000000000000000 in ?? ()
No symbol table info available.
#1  0x00007ffff7e3d57c in ?? () from /usr/lib64/libesets_pac.so
No symbol table info available.
#2  0x00007ffff7e3d6a0 in fcntl () from /usr/lib64/libesets_pac.so
No symbol table info available.
#3  0x0000555555585736 in ?? ()
No symbol table info available.
#4  0x0000555555561971 in ?? ()
No symbol table info available.
#5  0x000055555555c288 in calloc ()
No symbol table info available.
#6  0x00007ffff768abc9 in ?? () from /lib64/libdl.so.2
No symbol table info available.
#7  0x00007ffff768a4ff in dlsym () from /lib64/libdl.so.2
No symbol table info available.
#8  0x00007ffff7e3a7c9 in ?? () from /usr/lib64/libesets_pac.so
No symbol table info available.
#9  0x00007ffff7e3baa7 in ?? () from /usr/lib64/libesets_pac.so
No symbol table info available.
#10 0x00007ffff7e67256 in ?? () from /usr/lib64/libesets_pac.so
No symbol table info available.
#11 0x0000000000000001 in ?? ()
No symbol table info available.
#12 0x00007ffff7f8d000 in ?? ()
No symbol table info available.
#13 0x0000000000000001 in ?? ()
No symbol table info available.
#14 0x00007ffff7e3989b in ?? () from /usr/lib64/libesets_pac.so
No symbol table info available.
#15 0x0000000000000001 in ?? ()
No symbol table info available.
#16 0x00007ffff7fe30da in ?? () from /lib64/ld-linux-x86-64.so.2
No symbol table info available.
#17 0x00007ffff7fe3214 in ?? () from /lib64/ld-linux-x86-64.so.2
No symbol table info available.
#18 0x00007ffff7fd50ca in ?? () from /lib64/ld-linux-x86-64.so.2
No symbol table info available.
#19 0x0000000000000001 in ?? ()
No symbol table info available.
#20 0x00007fffffffe2c6 in ?? ()
No symbol table info available.
#21 0x0000000000000000 in ?? ()
No symbol table info available.
(gdb) where
#0  0x0000000000000000 in ?? ()
#1  0x00007ffff7e3d57c in ?? () from /usr/lib64/libesets_pac.so
#2  0x00007ffff7e3d6a0 in fcntl () from /usr/lib64/libesets_pac.so
#3  0x0000555555585736 in ?? ()
#4  0x0000555555561971 in ?? ()
#5  0x000055555555c288 in calloc ()
#6  0x00007ffff768abc9 in ?? () from /lib64/libdl.so.2
#7  0x00007ffff768a4ff in dlsym () from /lib64/libdl.so.2
#8  0x00007ffff7e3a7c9 in ?? () from /usr/lib64/libesets_pac.so
#9  0x00007ffff7e3baa7 in ?? () from /usr/lib64/libesets_pac.so
#10 0x00007ffff7e67256 in ?? () from /usr/lib64/libesets_pac.so
#11 0x0000000000000001 in ?? ()
#12 0x00007ffff7f8d000 in ?? ()
#13 0x0000000000000001 in ?? ()
#14 0x00007ffff7e3989b in ?? () from /usr/lib64/libesets_pac.so
#15 0x0000000000000001 in ?? ()
#16 0x00007ffff7fe30da in ?? () from /lib64/ld-linux-x86-64.so.2
#17 0x00007ffff7fe3214 in ?? () from /lib64/ld-linux-x86-64.so.2
#18 0x00007ffff7fd50ca in ?? () from /lib64/ld-linux-x86-64.so.2
#19 0x0000000000000001 in ?? ()
#20 0x00007fffffffe2c6 in ?? ()
#21 0x0000000000000000 in ?? ()
Comment 8 Georgy Yakovlev archtester gentoo-dev 2019-04-24 18:09:32 UTC
quick google search shows that /usr/lib64/libesets_pac.so belongs to eset antivirus.

probably it LD_PRELOADs some libraries and creates overrides some memory functions.

Can't help with that on rust or gentoo side, sorry.

take a look at 
https://github.com/rust-lang/rust/issues/56736

this is a bit different problem with ESET + rust's jemalloc, but there seems to be a fix in eset 4.5.14.0
try upgrading it, maybe it'll fix your issue as well.

if it does not help contact eset support and ask them for help with their product.
Comment 9 Michal Jakubowski 2019-04-24 18:47:23 UTC
Thank you for your time.