Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 617518 - dev-lang/ruby-2.2.0-r1[jemalloc]: hangs during configure in sandbox for dev-libs/jemalloc[hardened]
Summary: dev-lang/ruby-2.2.0-r1[jemalloc]: hangs during configure in sandbox for dev-l...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 3 votes (vote)
Assignee: Gentoo Ruby Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-04 19:16 UTC by Maciej Piechotka
Modified: 2021-04-28 20:24 UTC (History)
21 users (show)

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


Attachments
Backtrace (logging.tmp,20.21 KB, text/plain)
2017-05-04 19:16 UTC, Maciej Piechotka
Details
offending source and backtrace (ruby_jemalloc-conftest.txt,15.62 KB, text/plain)
2018-06-17 22:34 UTC, Petr Cerny [:hrosik]
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Maciej Piechotka 2017-05-04 19:16:06 UTC
Created attachment 471682 [details]
Backtrace

checking for elf.h... yes
checking elf_abi.h usability... no
checking elf_abi.h presence... no
checking for elf_abi.h... no
checking whether OS depend dynamic link works... yes
checking for backtrace... yes
checking for broken backtrace...

Portage 2.3.5 (python 3.4.6-final-0, default/linux/amd64/13.0/desktop/gnome/systemd, gcc-5.4.0, glibc-2.24-r1, 4.9.21-hardened x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.9.21-hardened-x86_64-Intel-R-_Xeon-R-_CPU_E3-1505M_v5_@_2.80GHz-with-gentoo-2.3
KiB Mem:    65875224 total,  12007872 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Thu, 04 May 2017 04:00:01 +0000
sh bash 4.4_p12
ld GNU gold (Gentoo 2.27 p1.0 2.27) 1.12
distcc 3.2rc1 x86_64-pc-linux-gnu [disabled]
app-shells/bash:          4.4_p12::gentoo
dev-lang/perl:            5.24.1-r1::gentoo
dev-lang/python:          2.7.13::gentoo, 3.4.6::gentoo
dev-util/cmake:           3.8.1::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/openrc:          0.25::gentoo
sys-apps/sandbox:         2.10-r4::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r3::gentoo
sys-devel/automake:       1.11.6-r2::gentoo, 1.12.6-r1::gentoo, 1.13.4-r1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.27::gentoo
sys-devel/gcc:            5.4.0-r3::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r4::gentoo
sys-devel/make:           4.2.1-r1::gentoo
sys-kernel/linux-headers: 4.10::gentoo (virtual/os-headers)
sys-libs/glibc:           2.24-r1::gentoo
Repositories:

(...)

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe -ggdb"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/chromium/policies/managed/chrome-gnome-shell.json /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/opt/chrome/policies/managed/chrome-gnome-shell.json /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe -ggdb"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="-j8 --load-average=7"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs cgroup collision-protect compress-build-logs compressdebug config-protect-if-modified distlocks ebuild-locks fail-clean fixlafiles ipc-sandbox merge-sync network-sandbox news parallel-fetch preserve-libs protect-owned sandbox sfperms split-elog split-log splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_GB.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -march=native -O2 -pipe -ggdb"
MAKEOPTS="-j8 -l7"
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 aes alsa amd64 archive avx avx2 berkdb bluetooth branding bzip2 cairo cdda cdr cli colord cracklib crossdev crypt cryptsetup cups cxx dbus device-mapper downloads-monitor dri dri3 dts dvd dvdr eds egl elfutils emacs emboss encode evo exif f16c fam firefox flac fma3 fortran fprint fuse gdbm gdm gif glamor gles glib gmp gnome gnome-keyring gnome-online-accounts gnuefi gold google googledrive gpg gphoto2 gpm graphite gssapi gstreamer gtk gtk3 hardened hidpi highlight iconv icu introspection ipv6 jemalloc jit jpeg jpeg2k justify kerberos latex lcms ldap libkms libnotify libproxy libsecret lz4 lzma mad mmx mmxext mng modules mp3 mp4 mpeg mtp multilib multitarget nautilus ncurses networkmanager nfs nls nptl ntlm ogg opengl openmp pam pango pax_kernel pcre pdf pie plymouth png policykit popcnt postgres ppds pulseaudio qt3support qt4 readline samba sasl sdl seccomp session smartcard smp spell sqlite sse sse2 sse3 sse4_1 sse4_2 ssh ssl ssp ssse3 startup-notification svg systemd tcpd telepathy theora threads tiff tracker truetype udev udisks unicode upower urandom usb uxa v4l vaapi vala vim-syntax vimeo vorbis vulcan wayland webkit webp wifi wireshark-plugins wxwidgets x264 xattr xcb xml xtpax xv xvid zeitgeist zeroconf zlib" ABI_X86="32 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="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext 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" 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" LLVM_TARGETS="BPF NVPTX X86 AArch64 ARM" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby21 ruby22" USERLAND="GNU" VIDEO_CARDS="intel nvidia 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, USE_PYTHON

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

dev-lang/ruby-2.2.7::gentoo was built with the following:
USE="berkdb gdbm ipv6 jemalloc ncurses rdoc readline ssl -debug -doc -examples -libressl -rubytests -socks5 -tk -xemacs" ABI_X86="64"
CFLAGS="-march=native -O2 -pipe -ggdb -fno-strict-aliasing"
CXXFLAGS="-march=native -O2 -pipe -ggdb -fno-strict-aliasing"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
Comment 1 Nils Freydank 2017-05-04 20:28:01 UTC
I can confirm this. However, if I re-build jemalloc with USE="-hardened" and can configure and build ruby afterwards. Ergo ruby seems to need "--enable-syscall" in jemalloc, because jemalloc-hardening just disables it.

emerge --info:
Portage 2.3.5 (python 3.4.6-final-0, hardened/linux/amd64/no-multilib/selinux, gcc-5.4.0, glibc-2.23-r3, 4.11.0 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.11.0-x86_64-Intel-R-_Core-TM-_i5-4300U_CPU_@_1.90GHz-with-gentoo-2.3
KiB Mem:     8103328 total,    592384 free
KiB Swap:    8373568 total,   8373312 free
Timestamp of repository gentoo: Tue, 02 May 2017 18:04:04 +0000
sh bash 4.4_p12
ld GNU ld (Gentoo 2.27 p1.0) 2.27
distcc 3.2rc1 x86_64-pc-linux-gnu [disabled]
app-shells/bash:          4.4_p12::gentoo
dev-lang/perl:            5.24.1-r1::gentoo
dev-lang/python:          2.7.13::gentoo, 3.4.6::gentoo
dev-util/cmake:           3.8.0-r1::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/sandbox:         2.10-r4::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r3::gentoo
sys-devel/automake:       1.11.6-r2::gentoo, 1.13.4-r1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.27::gentoo
sys-devel/gcc:            5.4.0-r3::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r4::gentoo
sys-devel/make:           4.2.1-r1::gentoo
sys-kernel/linux-headers: 4.10::gentoo (virtual/os-headers)
sys-libs/glibc:           2.23-r3::gentoo
Repositories:

gentoo
    location: /var/portage/tree
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo.git
    priority: -1000
    sync-git-clone-extra-opts: --branch master

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

holgersson-overlay
    location: /var/layman/holgersson-overlay
    sync-type: laymansync
    sync-uri: https://git.holgersson.xyz/holgersson-overlay
    masters: gentoo
    priority: 50

imaging
    location: /var/layman/imaging
    sync-type: laymansync
    sync-uri: https://github.com/gerddie/gentoo-imaging.git
    masters: gentoo
    priority: 50

kde
    location: /var/layman/kde
    sync-type: laymansync
    sync-uri: git://anongit.gentoo.org/proj/kde.git
    masters: gentoo
    priority: 50

perl-experimental
    location: /var/layman/perl-experimental
    sync-type: laymansync
    sync-uri: git://anongit.gentoo.org/proj/perl-overlay.git
    masters: gentoo
    priority: 50

Installed sets: @custom_KDE, @games
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=haswell -mcx16 -msahf -mabm -mlzcnt -mfxsr -mxsave -mxsaveopt --param=l1-cache-size=32 --param=l1-cache-size=32 --param=l1-cache-line-size=64 --param=l2-cache-size=3072"
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/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe -march=haswell -mcx16 -msahf -mabm -mlzcnt -mfxsr -mxsave -mxsaveopt --param=l1-cache-size=32 --param=l1-cache-size=32 --param=l1-cache-line-size=64 --param=l2-cache-size=3072"
DISTDIR="/var/portage/distfiles"
EMERGE_DEFAULT_OPTS="--quiet-build --autounmask=n --binpkg-respect-use=y"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg cgroup config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync network-sandbox news nodoc noinfo parallel-fetch preserve-libs protect-owned sandbox selinux sesandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="https://mirror.netcologne.de/gentoo/ https://tux.rainside.sk/gentoo/ https://www.mirrorservice.org/sites/distfiles.gentoo.org/"
LANG="de_DE.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5 -l5"
PKGDIR="/var/portage/packages"
PORTAGE_COMPRESS="xz"
PORTAGE_COMPRESS_FLAGS="-6 -T4"
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 audit bash-completion berkdb bluetooth branding bzip2 c++11 c++14 caps cdda cli colord cracklib crypt cryptsetup cups cxx dbus djvu dri dts dvd dvdr encode exif fam firefox flac fontconfig gif git glamor gpg gpm graphicsmagick gstreamer hardened hunspell iconv icu int64 ipv6 jemalloc jit jpeg justify kipi lcms ldap libnotify lzma mng modules mp3 mp4 mpeg ncurses nftables nls nptl offensive ogg open_perms opengl openmp openmpi openmpi2 opus pam pax_kernel pcre pdf phonon pic pie pkcs11 plasma png policykit postscript pulseaudio qml qt5 quvi raw readline rtmp samba sasl sdl seccomp selinux semantic-desktop session smp sound spell ssh ssl ssp startup-notification svg systemd tcpd telepathy theora threads tiff truetype udev udisks unicode upower urandom usb v4l vaapi video vim-syntax vorbis vpx wavpack widgets wxwidgets x264 x265 xattr xcb xcomposite xkb xtpax xv xvid zlib zsh-completion" ABI_X86="64" ALSA_CARDS="hda-intel" 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" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" 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="evdev synaptics wacom" KERNEL="linux" L10N="de de_DE ru ru_RU" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="de de_DE ru ru_RU" LLVM_TARGETS="BPF X86" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby24" 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_RSYNC_EXTRA_OPTS, USE_PYTHON

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

dev-libs/jemalloc-4.4.0::gentoo was built with the following:
USE="-debug -hardened -static-libs -stats"


dev-lang/ruby-2.1.10::gentoo was built with the following:
USE="berkdb ipv6 ncurses rdoc readline ssl -debug -doc -examples -gdbm -rubytests -socks5 -tk -xemacs"
CFLAGS="-march=native -O2 -pipe -fno-strict-aliasing"
CXXFLAGS="-march=native -O2 -pipe -fno-strict-aliasing"


dev-lang/ruby-2.2.7::gentoo was built with the following:
USE="berkdb ipv6 jemalloc ncurses rdoc readline ssl -debug -doc -examples -gdbm -libressl -rubytests -socks5 -tk -xemacs"
CFLAGS="-O2 -pipe -march=haswell -mcx16 -msahf -mabm -mlzcnt -mfxsr -mxsave -mxsaveopt --param=l1-cache-size=32 --param=l1-cache-size=32 --param=l1-cache-line-size=64 --param=l2-cache-size=3072 -fno-strict-aliasing"
CXXFLAGS="-O2 -pipe -march=haswell -mcx16 -msahf -mabm -mlzcnt -mfxsr -mxsave -mxsaveopt --param=l1-cache-size=32 --param=l1-cache-size=32 --param=l1-cache-line-size=64 --param=l2-cache-size=3072 -fno-strict-aliasing"


dev-lang/ruby-2.4.1-r1::gentoo was built with the following:
USE="berkdb ipv6 jemalloc rdoc ssl -debug -doc -examples -gdbm -libressl -rubytests -socks5 -tk -xemacs"
CFLAGS="-O2 -pipe -march=haswell -mcx16 -msahf -mabm -mlzcnt -mfxsr -mxsave -mxsaveopt --param=l1-cache-size=32 --param=l1-cache-size=32 --param=l1-cache-line-size=64 --param=l2-cache-size=3072 -fno-strict-aliasing"
CXXFLAGS="-O2 -pipe -march=haswell -mcx16 -msahf -mabm -mlzcnt -mfxsr -mxsave -mxsaveopt --param=l1-cache-size=32 --param=l1-cache-size=32 --param=l1-cache-line-size=64 --param=l2-cache-size=3072 -fno-strict-aliasing"
Comment 2 Attila Tóth 2017-05-06 10:16:42 UTC
dev-lang/ruby-2.2.7-r1, dev-lang/ruby-2.3.4-r1 and dev-lang/ruby-2.4.1-r1 are all hang during configure at:
checking for broken backtrace...

This is happening since the ebuilds were recently modified from --enable-jemalloc to use --with-jemalloc instead.

Introduced by this commit:
dev-lang/ruby: fix building with USE=jemalloc
Hans de Graaff, Sun, 30 Apr 2017 10:37, commit 4816c5f5
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4816c5f5b99306a5698732ec9a0d959770672bad

So these changes supposed to fix jemalloc causing problems here and there.

If I kill configtest to skip the hanging detection, configure continues. However compile phase hangs again, the compiled miniruby binaries also seem to have problems. If I replace miniruby with a functioning copy, ebuilds compile ruby binaries that have problems as well.

So it seems to be a problem involving several versions of ruby.
I'm disabling jemalloc for ruby as a workaround.

BR: Dw.
Comment 3 Attila Tóth 2017-05-06 10:21:51 UTC
One more thing I had just noticed: the reporter of the bug is also using Hardened Gentoo. I'm currently running linux-4.9.24-hardened.
I cannot see any segfaults or denials in the logs, while configtest for backtrace or miniruby runs forever. The hanging binaries doesn't consume the resources of the system.
Also note, that pax-marking non-functional miniruby (-m or -Em) won't help.
Comment 4 Radoslaw Szkodzinski 2017-05-10 02:39:06 UTC
Confirming with dev-lang/ruby-2.4.5-r1, since previous versions built fine I suspect a bug in sandbox 2.10-r4.

Portage 2.3.5 (python 3.5.3-final-0, hardened/linux/amd64, gcc-5.4.0, glibc-2.23-r3, 4.8.12-ck8+ x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.8.12-ck8+-x86_64-Intel-R-_Xeon-R-_CPU_E31275_@_3.40GHz-with-gentoo-2.3
KiB Mem:    32701820 total,   3032604 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Mon, 08 May 2017 21:02:12 +0000
sh bash 4.4_p12
ld GNU ld (Gentoo 2.26.1 p1.0) 2.26.1
ccache version 3.3.4 [enabled]
app-shells/bash:          4.4_p12::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.24.1-r1::gentoo
dev-lang/python:          2.7.13::gentoo, 3.5.3::gentoo, 3.6.1-r1::gentoo
dev-util/ccache:          3.3.4::gentoo
dev-util/cmake:           3.8.0-r1::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/openrc:          0.25::gentoo
sys-apps/sandbox:         2.10-r4::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r3::gentoo
sys-devel/automake:       1.11.6-r2::gentoo, 1.12.6-r1::gentoo, 1.13.4-r1::gentoo, 1.14.1-r1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.25-r1::gentoo, 2.26.1::gentoo, 2.27::gentoo
sys-devel/gcc:            4.9.3::gentoo, 5.3.0::gentoo, 5.4.0-r3::gentoo, 6.3.0::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r4::gentoo
sys-devel/make:           4.2.1-r1::gentoo
sys-kernel/linux-headers: 4.10::gentoo (virtual/os-headers)
sys-libs/glibc:           2.23-r3::gentoo
Repositories:

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

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

gamerlay
    location: /var/lib/layman/gamerlay
    sync-type: laymansync
    sync-uri: git://anongit.gentoo.org/proj/gamerlay.git
    masters: gentoo
    priority: 50

mozilla
    location: /var/lib/layman/mozilla
    sync-type: laymansync
    sync-uri: git://anongit.gentoo.org/proj/mozilla.git
    masters: gentoo
    priority: 50

proaudio
    location: /var/lib/layman/proaudio
    sync-type: laymansync
    sync-uri: svn://svn.tuxfamily.org/svnroot/proaudio/proaudio/trunk/overlays/proaudio
    masters: gentoo
    priority: 50

sabayon
    location: /var/lib/layman/sabayon
    sync-type: laymansync
    sync-uri: git://github.com/Sabayon/for-gentoo.git
    masters: gentoo
    priority: 50

spike
    location: /var/lib/layman/spike
    sync-type: laymansync
    sync-uri: https://github.com/Spike-Pentesting/spike-overlay.git
    masters: gentoo
    priority: 50

vapoursynth
    location: /var/lib/layman/vapoursynth
    sync-type: laymansync
    sync-uri: https://github.com/4re/vapoursynth-portage.git
    masters: gentoo
    priority: 50

x11
    location: /var/lib/layman/x11
    sync-type: laymansync
    sync-uri: git://anongit.gentoo.org/proj/x11
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -fomit-frame-pointer -march=native -mfpmath=sse -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/conf.d /etc/init.d /usr/lib64/libreoffice/program/sofficerc /usr/share/config/kdm /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/skel /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -fomit-frame-pointer -march=native -mfpmath=sse -pipe"
DISTDIR="/var/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs ccache config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="ftp://gentoo.mirror.dkm.cz/pub/gentoo/ ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo http://ftp.uni-erlangen.de/pub/mirrors/gentoo rsync://gentoo.prz.rzeszow.pl/gentoo ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo"
LANG="pl_PL.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--sort-common -Wl,--hash-style=both"
MAKEOPTS="-j4 -l6"
PKGDIR="/var/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--exclude=/metadata/cache --exclude=/metadata/md5-cache"
PORTAGE_RSYNC_OPTS="--recursive  --links  --safe-links  --perms  --times --force  --whole-file  --delete  --stats  --timeout=120 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac aacplus aacs accessibility acl acpi adns adplug aiglx aim alsa amd64 amr amrenc apparmor artswrappersuid audiofile audit auth-dns avahi avx bash-completion berkdb bidi bluetooth bluray branding btrfs bzip2 c++0x cairo caps cdda cddb cdio cdr celt cilk cjk cli connman cpudetection cracklib crypt cryptsetup cscope cups curl cxx dbi dbus devil dga djvu dri dri3 drm dts dv dvb dvd dvdr dvdread dvi efi encode exif expat f2fs fam fame fat fdk ffmpeg fftw firefox fits flac fluidsynth fontconfig foomatic-db fortran freetype fuse gcj gdbm geoip gif gimpprint glade glamor gme gmp gnome-keyring gnutls gpg gphoto2 gpm graphite graphviz gsm gstreamer gtk gtk3 gtkstyle gudev hardened harfbuzz hdri hfs highlight iconv icq icu idn iec61883 ieee1394 imagemagick imap inotify introspection ipod iproute2 ipv6 irc irda iso jabber jack jbig jemalloc jfs jit joystick jpeg jpeg2k json justify kdeenablefinal kdehiddenvisibility kerberos ladspa lame lash lcd ldap libass libcanberra libnotify libproxy libsamplerate libsecret libsoxr live lm_sensors lto lua lzma lzo mac mad mail matroska mdadm mjpeg mms mmx mng modplug modules mozdevelop mp3 mp3rtp mpeg msn mtp mudflap multilib multimedia musepack musicbrainz ncurses netlink network nls nptl nsplugin ntfs ntlm odf ogg openal opencl openexr opengl openmp openssl openvpn opus orc pam pango pax_kernel pcmcia pcre pda perl pgo pie plymouth png podcast policykit portaudio postproc postscript ppds pulseaudio python qt3support qt4 qt5 quvi rados rar raw rdesktop readline real realtime reiser4 reiserfs rle rss rtmp samba sasl scanner schroedinger sdl sdlgfx seccomp session sid slp smp snappy sndfile snmp socks socks5 speex spell sqlite sse3 sse4_1 sse4_2 ssh ssl ssp ssse3 startup-notification stream svg sysfs systemd taglib tcmalloc tcpd telepathy theora threads tiff truetype twolame udev unicode unwind urandom usb v4l v4l2 vaapi vala vcd vim-syntax visualization vorbis vpx wavpack webp wifi win32codecs wmf x264 x265 xattr xcb xen xine xinerama xml xpm xprint xtpax xulrunner xv xvid xvmc yahoo zeitgeist zeroconf zlib" ABI_X86="64 32" ALSA_CARDS="emu10k1x darla20 darla24 emu10k1 gina20 gina24 hdsp hdspm ice1712 indigo indigoio layla20 layla24 mia mixart mona pcxhr rme32 rme96 sb16 sbawe sscape usbusx2y vx222 usb-usx2y" 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" APACHE2_MPMS="prefork" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="agfa_cl20 casio_qv dimagev dimera3500 kodak_dc120 kodak_dc210 kodak_dc240 kodak_dc3200 kodak_ez200 konica_qm150 panasonic_coolshot panasonic_dc1000 panasonic_dc1580 panasonic_l859 polaroid_pdc320 polaroid_pdc640 polaroid_pdc700 ricoh_g3 sipix_blink sipix_blink2 sipix_web2 sony_dscf1 sony_dscf55 toshiba_pdrm11 adc65 aox barbie canon clicksmart310 digigr8 digita directory enigma13 fuji gsmart300 hp215 iclick jamcam jd11 konica largan lg_gsm mars mustek pccam300 pccam600 ptp2 ricoh samsung sierra smal sonix soundvision spca50x sq905 stv0674 stv0680 sx330z template" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 ssse3 sse4_1 sse4_2 avx" 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 efi-64 xen qemu multiboot" INPUT_DEVICES="evdev void vmmouse keyboard" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_US pl" LIRC_DEVICES="audio audio_alsa serial pctv" LLVM_TARGETS="AMDGPU BPF AArch64 ARM Mips" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python3_5" PYTHON_TARGETS="python2_7 python3_5" QEMU_SOFTMMU_TARGETS="x86_64 arm armeb i386 mips mips64 mips64el mipsel mipsn32 aarch64" QEMU_USER_TARGETS="arm armeb i386 mips mipsel mips64 mips64el mipsn32 x86_64 aarch64" RUBY_TARGETS="ruby23 ruby24" USERLAND="GNU" VIDEO_CARDS="fbdev vesa radeon intel i965 i915 radeonsi amdgpu" 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"
USE_PYTHON="2.7 3.5"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS

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

dev-lang/ruby-2.2.5::gentoo was built with the following:
USE="berkdb gdbm ipv6 jemalloc ncurses rdoc readline socks5 ssl -debug -doc -examples -libressl -rubytests -tk -xemacs" ABI_X86="64"
CFLAGS="-O2 -march=native -mfpmath=sse -pipe -fno-strict-aliasing"
CXXFLAGS="-O2 -march=native -mfpmath=sse -pipe -fno-strict-aliasing"


dev-lang/ruby-2.3.3-r1::gentoo was built with the following:
USE="berkdb gdbm ipv6 jemalloc ncurses rdoc readline socks5 ssl -debug -doc -examples -libressl -rubytests -tk -xemacs" ABI_X86="64"
CFLAGS="-O2 -march=native -mfpmath=sse -pipe -fno-strict-aliasing"
CXXFLAGS="-O2 -march=native -mfpmath=sse -pipe -fno-strict-aliasing"


dev-lang/ruby-2.4.0::gentoo was built with the following:
USE="berkdb gdbm ipv6 jemalloc rdoc socks5 ssl -debug -doc -examples -libressl -rubytests -tk -xemacs" ABI_X86="64"
CFLAGS="-O2 -march=native -mfpmath=sse -pipe -fno-strict-aliasing"
CXXFLAGS="-O2 -march=native -mfpmath=sse -pipe -fno-strict-aliasing"
Comment 5 Radoslaw Szkodzinski 2017-05-10 05:05:12 UTC
Merging with FEATURE="-sandbox -usersandbox" is successful, so this is definitely a sandbox-related issue.
Comment 6 Hans de Graaff gentoo-dev 2017-05-10 05:18:00 UTC
(In reply to Attila Tóth from comment #2)

> This is happening since the ebuilds were recently modified from
> --enable-jemalloc to use --with-jemalloc instead.

Note that before this change USE=jemalloc did not actually use jemalloc (--enable-jemalloc is a no-op). So we are seeing this issues now because USE=jemalloc now actually works.
Comment 7 Hans de Graaff gentoo-dev 2017-05-10 05:19:06 UTC
(In reply to Radoslaw Szkodzinski from comment #5)
> Merging with FEATURE="-sandbox -usersandbox" is successful, so this is
> definitely a sandbox-related issue.

Adding sandbox maintainer to the bug.
Comment 8 Attila Tóth 2017-05-10 08:39:01 UTC
(In reply to Hans de Graaff from comment #6)
> (In reply to Attila Tóth from comment #2)
> 
> > This is happening since the ebuilds were recently modified from
> > --enable-jemalloc to use --with-jemalloc instead.
> 
> Note that before this change USE=jemalloc did not actually use jemalloc
> (--enable-jemalloc is a no-op). So we are seeing this issues now because
> USE=jemalloc now actually works.

Yeah, I got that. Please note, that all the reporters are using the hardened flavor so far. Other packages are using jemalloc without these symptoms. So I suspect there must be something wrong with the sandbox if using jemalloc on hardened systems the way ruby tries to do it. Unfortunately I cannot see any relevant log messages or denials. Consider adding hardened folks as well.
Comment 9 jy6x2b32pie9 2017-09-21 23:33:03 UTC
Having the same problem with non-hardened, without sandbox:

Portage 2.3.10 (python 3.5.4-final-0, default/linux/amd64/13.0/desktop, gcc-6.4.0, glibc-2.25-r5, 4.13.3-gentoo x86_64)
=================================================================
System uname: Linux-4.13.3-gentoo-x86_64-Intel-R-_Core-TM-_i3-4000M_CPU_@_2.40GHz-with-gentoo-2.4.1
KiB Mem:     8053304 total,   4624764 free
KiB Swap:   12582908 total,  12582908 free
Head commit of repository sk-overlay: 1181a39d7c3f56c3dbb21454767b3f0517d813f3

Timestamp of repository gentoo: Thu, 21 Sep 2017 19:30:01 +0000
Head commit of repository gentoo: 591de6c3bd0d7a69586256114fb276f080130b6e
sh bash 4.4_p12
ld GNU ld (Gentoo 2.29 p1.0) 2.29
app-shells/bash:          4.4_p12::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.26.0::gentoo
dev-lang/python:          2.7.14::gentoo, 3.5.4::gentoo, 3.6.1-r1::gentoo
dev-util/cmake:           3.9.3::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/openrc:          0.31.2::gentoo
sys-apps/sandbox:         2.10-r4::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.15.1-r1::gentoo
sys-devel/binutils:       2.29::gentoo
sys-devel/gcc:            6.4.0::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r4::gentoo
sys-devel/make:           4.2.1-r1::gentoo
sys-kernel/linux-headers: 4.13::gentoo (virtual/os-headers)
sys-libs/glibc:           2.25-r5::gentoo
Repositories:

sk-overlay
    location: /usr/local/overlay/sk-overlay
    sync-type: git
    sync-uri: https://c.darenet.org/scriptkitties/overlay.git
    masters: gentoo

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: 40
    sync-rsync-extra-opts: 

jorgicio
    location: /var/lib/layman/jorgicio
    sync-type: laymansync
    sync-uri: https://github.com/jorgicio/jorgicio-gentoo.git
    masters: gentoo
    priority: 50

libressl
    location: /var/lib/layman/libressl
    sync-type: laymansync
    sync-uri: https://github.com/gentoo/libressl.git
    masters: gentoo
    priority: 50

steam-overlay
    location: /var/lib/layman/steam-overlay
    sync-type: laymansync
    sync-uri: git://github.com/anyc/steam-overlay.git
    masters: gentoo
    priority: 50

Installed sets: @archiver, @fonts
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /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 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--ask-enter-invalid"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs cgroup config-protect-if-modified distlocks ebuild-locks fail-clean fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirror.yandex.ru/gentoo-distfiles/"
LANG="en_US.utf8"
LDFLAGS="-march=native -O2 -pipe -Wl,-O2 -Wl,--as-needed -Wl,--sort-common"
MAKEOPTS="-j4"
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 adns alsa amd64 archive bash-completion berkdb branding btrfs bzip2 cairo caps cdda clang cli consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr egl emboss encode exif fam ffmpeg firefox flac fortran gdbm gif glamor gtk gtk3 hardened harfbuzz iconv icu idn ipv6 jemalloc jpeg lcms libcxx libnotify libressl lzma mad mng modules mp3 mp4 mpeg multilib natspec ncurses networkmanager nfs nls nptl offensive ogg opengl openmp pam pango pcre pdf pie png policykit ppds pulseaudio qt3support qt5 readline samba sdl seccomp session spell ssl startup-notification svg tcpd tiff truetype udev udisks unicode upower usb vaapi vorbis wxwidgets x264 xattr xcb xinerama xml xv xvid zlib zsh-completion" 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="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" CURL_SSL="libressl" 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="efi-64" INPUT_DEVICES="evdev synaptics wacom" KERNEL="linux" L10N="en ru" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en ru" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_5" PYTHON_TARGETS="python3_5 python3_6" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby24" USERLAND="GNU" VIDEO_CARDS="intel i915 i965" XFCE_PLUGINS="battery brightness clock power" 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
Comment 10 jy6x2b32pie9 2017-09-21 23:38:57 UTC
Sorry for disinformation.
Sandbox was not explicitly enabled. But, apparently, profile-selected.
After explicitly disabling it, build completes.
Comment 11 Radoslaw Szkodzinski 2017-09-28 14:25:04 UTC
Still happening with ruby 2.4.2.
Comment 12 Radoslaw Szkodzinski 2017-09-28 14:34:11 UTC
Additionally, 2.4.2 w/ jemalloc segfaults during build in a miniruby call.
Comment 13 Steffen 'j0inty' Stollfuß 2017-12-04 08:23:51 UTC
Hi,

As I was switching to gcc-7.2.0 profile all my ruby:2.{2,3,4} slots won't compile any more with USE="jemalloc" flag.

I found a related article on github where I believe the problematic is discussed.

https://github.com/jemalloc/jemalloc/issues/1006


* As example ruby22 stops working with:

[snip]
[FATAL] Failed to create timer thread: Invalid argument
[/snap]

As temp fix you can remove USE flag "jemalloc".
Comment 14 Petr Cerny [:hrosik] 2018-06-17 22:34:09 UTC
Created attachment 536158 [details]
offending source and backtrace

Bitten by it several times (enough to look deeper): I'm attaching the hanging configure test (conftest.c) from ruby-2.5.1 and its backtrace when running with preloaded libsandbox (LD_PRELOAD=libsandbox.so) - it seems to be stuck on jemalloc's internal mutex.

My first guess is libsandbox calls libdl which is using malloc from glibc, but it clashes with the one provided by jemalloc.

For completeness my emerge --info, although I doubt it has anything to do with the problem:

Portage 2.3.28 (python 3.6.5-final-0, hardened/linux/amd64, gcc-7.3.0, glibc-2.26-r6, 4.12.3-gentoo x86_64)
=================================================================
System uname: Linux-4.12.3-gentoo-x86_64-QEMU_Virtual_CPU_version_2.5+-with-gentoo-2.4.1
KiB Mem:    28761524 total,  17491900 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Sun, 17 Jun 2018 10:30:01 +0000
Head commit of repository gentoo: 78525384b77fc4a3fd2515a3cbc95d3447f5c85a
sh bash 4.4_p19
ld GNU ld (Gentoo 2.29.1 p3) 2.29.1
app-shells/bash:          4.4_p19::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.26.1-r2::gentoo
dev-lang/python:          2.7.14-r1::gentoo, 3.5.4-r1::gentoo, 3.6.5::gentoo
dev-util/cmake:           3.10.3::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/openrc:          0.35.5::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.15.1-r1::gentoo, 1.16.1-r1::gentoo
sys-devel/binutils:       2.29.1-r1::gentoo, 2.30::gentoo
sys-devel/gcc:            5.4.0-r4::gentoo, 7.3.0-r1::gentoo
sys-devel/gcc-config:     1.9.1::gentoo
sys-devel/libtool:        2.4.6-r4::gentoo
sys-devel/make:           4.2.1-r3::gentoo
sys-kernel/linux-headers: 4.15::gentoo (virtual/os-headers)
sys-libs/glibc:           2.26-r6::gentoo
Repositories:

gentoo
    location: /portage/tree
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-max-age: 24
    sync-rsync-extra-opts: 

peterph
    location: /portage/overlays/peterph
    masters: gentoo
    priority: 0

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-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 /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe"
DISTDIR="/portage/distfiles"
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="-O2 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg candy cgroup config-protect-if-modified distlocks ebuild-locks fakeroot fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="rsync://gentoo.mirror.dkm.cz/gentoo/"
LANG="en_GB.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en_GB cs cs_CZ de de_DE fr fr_FR ro ro_RO"
MAKEOPTS="-j16"
PKGDIR="/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="/free"
USE="X a52 aac acl alsa amd64 amr amrenc apng berkdb bidi bzip2 c++11 cairo caps cdio celt cgroups cli crypt cryptsetup cups cxx dc1394 device-mapper directfb djvu dmraid dri dv dvb dvd dvi exif faac faad2 ffmpeg fftw fits flac fluidsynth fontconfig fontforge frei0r gcrypt gdal gdbm gif glut gme gmp gnutls gpg gpm graphviz gsm gstreamer gtk gtk3 hardened hdf5 hdri iconv icu id3tag iec61883 ieee1394 imagemagick introspection ipv6 jack jbig jemalloc jit jpeg jpeg2k kms ladspa lame lapack latex lcms libass libcaca libedit libilbc libnotify librtmp libsamplerate libsoxr libtirpc libv4l lua lzma mad matplotlib matroska midi mikmod modplug modules mp3 mpeg mpi multilib musepack ncurses nls nptl nsfw nss offensive ogg openal openexr opengl openh264 openmp openssl opus pango pcap pcre pdf pie plotutils png postproc postscript python qml qt readline rtmp rubberband schroedinger sdl sdl2 seccomp secure-delete smp snappy sndfile sox speex spell sqlite sse2 sse3 sse4_1 sse4_3 ssl ssp ssse3 svg taglib tcpd text theora threads tiff timidity tools truetype twolame udev unicode urandom utils v4l vaapi vdpau vim-syntax vorbis vpx wavpack webm webp x264 x265 xattr xcb xetex xinerama xkb xml xscreensaver xtpax xvid zeromq zimg 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 plan sheets stage words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 ssse3 sse4_1 sse4_2" 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="keyboard mouse evdev" KERNEL="linux" L10N="en-GB cs" 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="python3_6 python2_7" RUBY_TARGETS="ruby25" USERLAND="GNU" VIDEO_CARDS="intel i915 i965 nouveau radeon" 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, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 15 Alessandro Barbieri 2019-09-01 08:56:56 UTC
Version 2.6.4 have this problem too
Comment 16 Progenyx 2019-11-16 13:19:06 UTC
I'm unsure of the significance of this, but in my case, this just now started happening on my two setups, both hardened. So nothing like this before. It only started during the rebuilds following the update of jemalloc to v5.2.1. My solution was to temporarily disable jemalloc support in ruby.
Comment 17 Progenyx 2019-11-16 13:22:00 UTC
Please disregard my previous comment. I'm running stable builds, so that's probably the reason.
Comment 18 Felix Tiede 2019-11-16 15:04:39 UTC
Just seen this on stable hardened amd64, recompiling ruby-2.4.9 with USE="-jemalloc" solved it for me.
Comment 19 Progenyx 2020-04-19 11:31:18 UTC
Same with v2.4.10 and v2.5.8
Comment 20 Sven Schwyn (svoop) 2020-05-26 20:07:26 UTC
I'm compiling my Rubies from source (with ruby-install and chruby), but run into a similar problem when trying to compile Nginx with Passenger following this approach:

https://judsonlester.info/2016/01/15/nginx-passenger-on-gentoo/

During configuration of the Passenger nginx_module, Ruby is invoked and hangs if it uses hardened jemalloc. This happens across all current Ruby versions (tried 2.4.x thru 2.7.x). Workaround:

USE=-hardened emerge -av jemalloc

However, I'm not sure this is a good idea security-wise.
Comment 21 Attila Tóth 2021-02-06 18:40:26 UTC
(In reply to Sven Schwyn (svoop) from comment #20)
> I'm compiling my Rubies from source (with ruby-install and chruby), but run
> into a similar problem when trying to compile Nginx with Passenger following
> this approach:
> 
> https://judsonlester.info/2016/01/15/nginx-passenger-on-gentoo/
> 
> During configuration of the Passenger nginx_module, Ruby is invoked and
> hangs if it uses hardened jemalloc. This happens across all current Ruby
> versions (tried 2.4.x thru 2.7.x). Workaround:
> 
> USE=-hardened emerge -av jemalloc
> 
> However, I'm not sure this is a good idea security-wise.

I run into a problem, that recent versions (8.0.22 and 8.0.23) of dev-db/mysql hang during compile while trying to run a build-time generated binary, if USE=jemalloc is enabled. I use hardened jemalloc. I also had to disable jemalloc for ruby a long time before. Hardened jemalloc seems to be borked.
https://bugs.gentoo.org/667120
https://bugs.gentoo.org/759247
Comment 22 Andrew Udvare 2021-03-14 05:21:49 UTC
This is still happening in dev-lang/ruby-2.6.6-r3 for me.
Comment 23 Sergei Trofimovich gentoo-dev 2021-03-14 11:17:02 UTC
The sandbox locks up due to early entrance into malloc() from jemalloc's constructor:
    malloc_init()
     -> open("/proc/sys/vm/overcommit_memory")
      -> [sandbox takes over] open_DEFAULT()
       -> [sandbox initializes]
        -> init_env_entries ()
         -> _xmalloc()
          -> sb_mmap() [ try hard not to use olerloaded mmap() ]
           -> get_dlsym("mmap")
            -> calloc() [ sandbox loses control, overridden by jemalloc ]
             -> malloc_init() [ recursion, gets locked in attempt to lock again locked mutex ]

Backtrace for me:

(gdb) bt
#0  futex_wait (private=0, expected=2, futex_word=0x7fde3ffb0560 <init_lock+64>) at ../sysdeps/nptl/futex-internal.h:146
#1  __lll_lock_wait (futex=futex@entry=0x7fde3ffb0560 <init_lock+64>, private=0) at lowlevellock.c:52
#2  0x00007fde401c4f03 in __GI___pthread_mutex_lock (mutex=mutex@entry=0x7fde3ffb0560 <init_lock+64>)
    at ../nptl/pthread_mutex_lock.c:80
#3  0x00007fde3ff8e473 in malloc_mutex_lock_final (mutex=0x7fde3ffb0520 <init_lock>)
    at ../jemalloc-5.2.1/include/jemalloc/internal/mutex.h:155
#4  je_malloc_mutex_lock_slow (mutex=mutex@entry=0x7fde3ffb0520 <init_lock>) at ../jemalloc-5.2.1/src/mutex.c:67
#5  0x00007fde3ff6af09 in malloc_mutex_lock (tsdn=<optimized out>, mutex=0x7fde3ffb0520 <init_lock>)
    at ../jemalloc-5.2.1/include/jemalloc/internal/mutex.h:221
#6  malloc_mutex_lock (tsdn=0x0, mutex=0x7fde3ffb0520 <init_lock>) at ../jemalloc-5.2.1/include/jemalloc/internal/mutex.h:217
#7  malloc_init_hard () at ../jemalloc-5.2.1/src/jemalloc.c:1739
#8  0x00007fde3ff6e29d in malloc_init () at ../jemalloc-5.2.1/src/jemalloc.c:223
#9  imalloc_init_check (dopts=<synthetic pointer>, sopts=<synthetic pointer>) at ../jemalloc-5.2.1/src/jemalloc.c:2229
#10 imalloc (dopts=<synthetic pointer>, sopts=<synthetic pointer>) at ../jemalloc-5.2.1/src/jemalloc.c:2260
#11 calloc (num=num@entry=1, size=size@entry=32) at ../jemalloc-5.2.1/src/jemalloc.c:2494
#12 0x00007fde3fda3b08 in _dlerror_run (operate=operate@entry=0x7fde3fda33a0 <dlsym_doit>, args=args@entry=0x7ffd8f3f12e0)
    at dlerror.c:148
#13 0x00007fde3fda3420 in __dlsym (handle=<optimized out>, name=<optimized out>) at dlsym.c:70
#14 0x00007fde401e1d68 in get_dlsym () at wrappers.c:51
#15 0x00007fde401e0abe in sb_mmap () at memory.c:28
#16 malloc () at memory.c:50
#17 0x00007fde401e753b in __xmalloc () at sb_memory.c:34
#18 0x00007fde401df39e in init_env_entries () at libsandbox.c:555
#19 sb_process_env_settings () at libsandbox.c:627
#20 0x00007fde401de562 in libsb_init () at libsandbox.c:92
#21 libsb_init () at libsandbox.c:74
#22 0x00007fde401dfa75 in before_syscall () at libsandbox.c:1060
#23 0x00007fde401e4ec8 in open_DEFAULT () at wrapper-funcs/__wrapper_simple.c:52
#24 0x00007fde3ff8ede1 in open (__oflag=524288, __path=0x7fde3ff98370 "/proc/sys/vm/overcommit_memory")
    at /usr/include/bits/fcntl2.h:53
#25 os_overcommits_proc () at ../jemalloc-5.2.1/src/pages.c:496
#26 je_pages_boot () at ../jemalloc-5.2.1/src/pages.c:616
#27 0x00007fde3ff6a9b1 in malloc_init_hard_a0_locked () at ../jemalloc-5.2.1/src/jemalloc.c:1518
#28 0x00007fde3ff6acc4 in malloc_init_hard () at ../jemalloc-5.2.1/src/jemalloc.c:1750
#29 0x00007fde3ff6d16d in malloc_init () at ../jemalloc-5.2.1/src/jemalloc.c:223
#30 imalloc_init_check (dopts=<synthetic pointer>, sopts=<synthetic pointer>) at ../jemalloc-5.2.1/src/jemalloc.c:2229
#31 imalloc (dopts=<optimized out>, sopts=<optimized out>) at ../jemalloc-5.2.1/src/jemalloc.c:2260
#32 je_malloc_default (size=72704) at ../jemalloc-5.2.1/src/jemalloc.c:2289
#33 0x00007fde3fba78cc in (anonymous namespace)::pool::pool (this=0x7fde3fd9e940 <(anonymous namespace)::emergency_pool>)
    at /tmp/portage-tmpdir/portage/sys-devel/gcc-11.0.1_pre9999/work/gcc-11.0.1_pre9999/libstdc++-v3/libsupc++/eh_alloc.cc:123
#34 __static_initialization_and_destruction_0 (__priority=65535, __initialize_p=1)
    at /tmp/portage-tmpdir/portage/sys-devel/gcc-11.0.1_pre9999/work/gcc-11.0.1_pre9999/libstdc++-v3/libsupc++/eh_alloc.cc:262
#35 _GLOBAL__sub_I_eh_alloc.cc(void) ()
    at /tmp/portage-tmpdir/portage/sys-devel/gcc-11.0.1_pre9999/work/gcc-11.0.1_pre9999/libstdc++-v3/libsupc++/eh_alloc.cc:338
#36 0x00007fde4023ed9e in call_init (env=0x7ffd8f3f8238, argv=0x7ffd8f3f8228, argc=1, l=<optimized out>) at dl-init.c:74
--Type <RET> for more, q to quit, c to continue without paging--
#37 call_init (l=<optimized out>, argc=1, argv=0x7ffd8f3f8228, env=0x7ffd8f3f8238) at dl-init.c:30
#38 0x00007fde4023ee84 in _dl_init (main_map=0x7fde4025f1e0, argc=1, argv=0x7ffd8f3f8228, env=0x7ffd8f3f8238) at dl-init.c:121
#39 0x00007fde4023008a in _dl_start_user () at rtld.c:43
#40 0x0000000000000001 in ?? ()
#41 0x00007ffd8f3f9bcc in ?? ()
#42 0x0000000000000000 in ?? ()
Comment 24 Sergei Trofimovich gentoo-dev 2021-03-14 15:14:02 UTC
Fun fact: USE=hardened for dev-libs/jemalloc converts direct syscall calls in early init phase from direct syscalls to libc calls.

It's a very specific behaviour. I suggest not to hide it under more generic USE=hardened flag so users won't trip over similar loops on default hardened systemd.
Comment 25 Sergei Trofimovich gentoo-dev 2021-03-14 15:15:20 UTC
+mozilla@ as dev-libs/jemalloc maintainer.
Comment 26 Sergei Trofimovich gentoo-dev 2021-03-19 08:26:39 UTC
Specifically https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f7a3f918c785723f4c1b79355d2ff6b58fb79b19 added:

+       if use hardened ; then
+               myconf+=( --disable-syscall )
+       fi

I suggest reverting it. It should not be enabled on systems that can avoid it and I would argue it makes security hardening worse.
Comment 27 PaX Team 2021-03-19 09:12:11 UTC
my 2 cents: this syscall(2) thing is probably due to OpenBSD restricting syscall origins to their libc. AFAIK nothing like that exists in linux  (for a good reason as it's a useless 'security' feature) so i'd suggest reverting this ebuild hunk.
Comment 28 Larry the Git Cow gentoo-dev 2021-03-21 10:19:45 UTC
The bug has been closed via the following commit(s):

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

commit f9f1a8c80671b4b1944226c84a5197183384a2ba
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2021-03-21 10:19:30 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2021-03-21 10:19:30 +0000

    dev-libs/jemalloc: drop USE=hardened option
    
    The only effect of USE=hardened was to pass a --disable-syscall
    configure option. It's only effect is to use library wrappers
    to memory allocation instead of direct syscalls to kernel.
    
    As jemalloc overrides a bunch of library memory allocation
    library calls itself this introduces extra chances to interact
    badly with other tool that override library calls.
    
    In #617518 sandbox became incompatible with jemalloc users and
    produced deadlocks. Example from ruby[jemalloc]:
    
        malloc_init() [called by jemalloc]
         -> open("/proc/sys/vm/overcommit_memory")
          -> [sandbox takes over] open_DEFAULT()
           -> [sandbox initializes]
            -> init_env_entries ()
             -> _xmalloc()
              -> sb_mmap() [ try hard not to use olerloaded mmap() ]
               -> get_dlsym("mmap")
                -> calloc() [ sandbox loses control, overridden by jemalloc ]
                 -> malloc_init() [ recursion, gets locked in attempt to
                      lock again locked malloc_init mutex ]
    
    There should be no reason to use --disable-syscall on linux.
    And especially not under generic (and enabled by default on
    hardened profiles) USE=hardened.
    
    The change drops --disable-syscall passing (and USE=hardened)
    completely.
    
    Users still can do it via EXTRA_ECONF= but there should be no
    need for that. Upstream ./configure should do the right thing.
    
    Reported-by: Maciej Piechotka
    Closes: https://bugs.gentoo.org/617518
    Package-Manager: Portage-3.0.17, Repoman-3.0.2
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 dev-libs/jemalloc/jemalloc-5.2.1-r1.ebuild | 50 ++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)
Comment 29 Constantin Runge 2021-04-28 20:14:25 UTC
This problem still persists for me when installing ruby-2.6.7 (USE="berkdb gdbm ipv6 jemalloc rdoc ssl -debug -doc -examples -jit (-libressl) -rubytests -socks5 -static-libs -systemtap -tk -xemacs").

emerge --info jemalloc
Portage 3.0.18 (python 3.8.9-final-0, default/linux/amd64/17.0/desktop, gcc-10.3.0, glibc-2.33, 5.11.4-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.11.4-gentoo-x86_64-Intel-R-_Core-TM-_i7-4790K_CPU_@_4.00GHz-with-glibc2.2.5
KiB Mem:    32707020 total,  22309116 free
KiB Swap:    1048572 total,   1045500 free
Timestamp of repository gentoo: Wed, 28 Apr 2021 11:30:01 +0000
Head commit of repository gentoo: efdf2c82d43b749786c054699c16f38cae28f2a8
Timestamp of repository guru: Wed, 28 Apr 2021 08:20:02 +0000
Head commit of repository guru: a749327ed48599017445a1fe4438afac40cb7102

Timestamp of repository lto-overlay: Mon, 12 Apr 2021 13:20:05 +0000
Head commit of repository lto-overlay: 674e7b31a9a2efc31f0608d0474c3127fe9db604

Timestamp of repository mv: Tue, 27 Apr 2021 06:50:01 +0000
Head commit of repository mv: a7385e4bf49989539778890926ff17f5c8da7104

Timestamp of repository science: Tue, 27 Apr 2021 12:05:14 +0000
Head commit of repository science: da7c526bc927fdadee72842947b69e477660bce7

Timestamp of repository steam-overlay: Tue, 20 Apr 2021 22:35:10 +0000
Head commit of repository steam-overlay: 1189a84a704dfba7c3312ccfd6c22cceb35bddfd

sh bash 5.1_p4
ld GNU ld (Gentoo 2.35.2 p1) 2.35.2
ccache version 4.2.1 [disabled]
app-shells/bash:          5.1_p4::gentoo
dev-java/java-config:     2.3.1::gentoo
dev-lang/perl:            5.32.1::gentoo
dev-lang/python:          2.7.18_p8::gentoo, 3.8.9::gentoo, 3.9.4::gentoo
dev-lang/rust:            1.51.0-r2::gentoo
dev-util/ccache:          4.2.1::gentoo
dev-util/cmake:           3.20.1::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.7::gentoo
sys-apps/openrc:          0.42.1-r1::gentoo
sys-apps/sandbox:         2.23::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, 2.36.1-r1::gentoo
sys-devel/gcc:            9.3.0-r2::gentoo, 10.3.0::gentoo, 11.1.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.12::gentoo (virtual/os-headers)
sys-libs/glibc:           2.33::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-metamanifest: yes
    sync-rsync-extra-opts: 
    sync-rsync-verify-jobs: 1

guru
    location: /var/db/repos/guru
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/guru.git
    masters: gentoo

lto-overlay
    location: /var/db/repos/lto-overlay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/lto-overlay.git
    masters: gentoo mv

mv
    location: /var/db/repos/mv
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/mv.git
    masters: gentoo

science
    location: /var/db/repos/science
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/science.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

local
    location: /data/portage
    masters: gentoo
    priority: 100

Installed sets: @anaconda, @core, @devel, @devel_gentoo, @devel_xilinx, @electronics, @esteam, @extra, @keysight_ads, @latex, @matlab, @opencl
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O3 -pipe -fuse-linker-plugin -fgraphite-identity -floop-nest-optimize -fno-math-errno -fno-trapping-math -fno-signed-zeros -fassociative-math -freciprocal-math -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -flto=8"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /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 /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O3 -pipe -fuse-linker-plugin -fgraphite-identity -floop-nest-optimize -fno-math-errno -fno-trapping-math -fno-signed-zeros -fassociative-math -freciprocal-math -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -flto=8 -fvisibility-inlines-hidden"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="-j9 --load-average=9"
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="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance 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 strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirror.leaseweb.com/gentoo/ http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--sort-common,-z,now"
LINGUAS="en de"
MAKEOPTS="-j9 -l9.4"
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="/tmp"
USE="X a52 aac acl acpi alsa amd64 bash-completion berkdb bluetooth branding bzip2 cairo cdda cdr cli crypt cuda cups dbus dri dts dvd dvdr elogind emboss encode exif flac fortran gdbm gif gpm gtk gui iconv icu ipv6 jemalloc jpeg lcms libglvnd libnotify libtirpc lm-sensors lto mad mng mp3 mp4 mpeg multilib ncurses nls nptl nsplugin nvenc offensive ogg opengl openmp pam pango pcre pdf pie png policykit ppds pulseaudio qt5 readline sdl seccomp spell split-usr ssl ssp startup-notification svg tcpd tiff truetype udev udisks unicode upower usb vaapi vdpau vim-syntax vorbis wxwidgets x264 xattr xcb xml xv xvid xvmc zlib zsh-completion" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="hda-intel" 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="cpu cpufreq df disc exec gpu_nvidia hddtemp interface load memory rrdtool swap syslog wireless" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sse sse2 sse3 ssse3 sse4_1 sse4_2" 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" INPUT_DEVICES="evdev mouse keyboard" KERNEL="linux" L10N="en de" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" 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_8" PYTHON_TARGETS="python3_8" RUBY_TARGETS="ruby26" USERLAND="GNU" VIDEO_CARDS="intel nvidia amdgpu radeonsi i915 i965" 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, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RUSTFLAGS

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

dev-libs/jemalloc-5.2.1-r1::gentoo was built with the following:
USE="-debug -lazy-lock -prof -static-libs -stats -xmalloc" ABI_X86="(64) -32 (-x32)"
CFLAGS="-march=native -O3 -pipe -fuse-linker-plugin -fgraphite-identity -floop-nest-optimize -fno-math-errno -fno-trapping-math -fno-signed-zeros -fassociative-math -freciprocal-math -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -flto=8 -Wl,-O1 -Wl,--as-needed -Wl,--sort-common,-z,now"
CXXFLAGS="-march=native -O3 -pipe -fuse-linker-plugin -fgraphite-identity -floop-nest-optimize -fno-math-errno -fno-trapping-math -fno-signed-zeros -fassociative-math -freciprocal-math -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -flto=8 -fvisibility-inlines-hidden -Wl,-O1 -Wl,--as-needed -Wl,--sort-common,-z,now"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--sort-common,-z,now -march=native -O3 -pipe -fuse-linker-plugin -fgraphite-identity -floop-nest-optimize -fno-math-errno -fno-trapping-math -fno-signed-zeros -fassociative-math -freciprocal-math -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -flto=8 -fvisibility-inlines-hidden"
Comment 30 Sergei Trofimovich gentoo-dev 2021-04-28 20:24:29 UTC
Please file a separate bug. Chances are it's a different issue with a different fix.