Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 906548 - =www-client/chromium-113.0.5672.63:0/stable::gentoo emerging fails due to ld.lld gets killed by kernel oom
Summary: =www-client/chromium-113.0.5672.63:0/stable::gentoo emerging fails due to ld....
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Chromium Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-16 14:14 UTC by Steffen Hau
Modified: 2024-02-18 19:11 UTC (History)
2 users (show)

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


Attachments
excerpt from systemd journald (journal.log,16.62 KB, text/x-log)
2023-05-16 14:19 UTC, Steffen Hau
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steffen Hau 2023-05-16 14:14:10 UTC
Portage 3.0.47 (python 3.11.3-final-0, default/linux/amd64/23.0/systemd, gcc-13, glibc-2.37-r3, 6.3.0-HAUIHAU x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-6.3.0-HAUIHAU-x86_64-Intel-R-_Core-TM-_i5-10210U_CPU_@_1.60GHz-with-glibc2.37
KiB Mem:    32600300 total,  17651460 free
KiB Swap:   16777212 total,  12808784 free
Timestamp of repository gentoo: Tue, 16 May 2023 12:19:01 +0000
Head commit of repository gentoo: c8c88177142933aa7ded7e8cc90a6c4334c2da24

sh bash 5.2_p15-r2
ld GNU ld (Gentoo 2.40 p5) 2.40.0
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.2_p15-r2::gentoo
dev-java/java-config:      2.3.1::gentoo
dev-lang/perl:             5.36.1-r1::gentoo
dev-lang/python:           3.11.3::gentoo
dev-lang/rust:             1.69.0-r1::gentoo
dev-util/cmake:            3.26.3::gentoo
dev-util/meson:            1.1.0::gentoo
sys-apps/baselayout:       2.13-r1::gentoo
sys-apps/sandbox:          2.30-r1::gentoo
sys-apps/systemd:          253.4::gentoo
sys-devel/autoconf:        2.13-r8::gentoo, 2.71-r6::gentoo
sys-devel/automake:        1.16.5-r1::gentoo
sys-devel/binutils:        2.40-r5::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           15.0.7-r1::gentoo, 16.0.3::gentoo
sys-devel/gcc:             13.1.0-r1::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/libtool:         2.4.7-r1::gentoo
sys-devel/lld:             16.0.3::gentoo
sys-devel/llvm:            15.0.7::gentoo, 16.0.3::gentoo
sys-devel/make:            4.4.1::gentoo
sys-kernel/linux-headers:  6.3::gentoo (virtual/os-headers)
sys-libs/glibc:            2.37-r3::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo.git
    priority: -1000
    volatile: False

hauihau
    location: /var/db/repos/hauihau
    masters: gentoo
    priority: 0
    volatile: False

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O3 -pipe -flto=auto"
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"
CXXFLAGS="-march=native -O3 -pipe -flto=auto"
DISTDIR="/home/gentoo/distfiles/"
EMERGE_DEFAULT_OPTS="--autounmask=n --keep-going=y --quiet-build=y --quiet-fail=y --with-bdeps=y --changed-deps-report=n"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE 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 XDG_STATE_HOME"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg-live config-protect-if-modified distlocks ebuild-locks fakeroot fixlafiles ipc-sandbox merge-sync metadata-transfer multilib-strict network-sandbox news parallel-fetch parallel-install 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="https://ftp.fau.de/gentoo/ https://ftp.halifax.rwth-aachen.de/gentoo/ https://ftp.gwdg.de/pub/linux/gentoo/"
LANG="de_DE.UTF-8"
LC_ALL="de_DE.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,--gc-sections"
LEX="flex"
LINGUAS="de"
MAKEOPTS="-j9"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/home/gentoo/tmp/"
SHELL="/bin/bash"
USE="X a52 aac aalib acl alsa amd64 avx avx2 bash-completion bluetooth bluray branding bzip2 cairo caps cdda cddb cdparanoia cdr crypt cups curl cxx dbus dga dri dts dv dvd egl encode exif ffmpeg flac fontconfig ftp gd gdbm gif gmp gstreamer iconv icu imagemagick imlib ipv6 jpeg jpeg2k kde kerberos lame libcaca libglvnd libnotify libsamplerate libtirpc lzma lzo mad matroska mmx mmxext mng mp3 mpeg mtp multilib musepack ncurses networkmanager nls nptl nsplugin ogg openal opengl openmp opus pam pcre pdf pipewire png policykit pulseaudio qt5 quicktime readline screencast seccomp sndfile spell sse sse2 sse3 sse4 sse4_1 sse4_2 ssl ssse3 svg syslog systemd test-rust theora threads tiff truetype udev unicode upower usb v4l vaapi vcd vim-syntax vorbis wavpack wayland webkit x264 xattr xcb xcomposite xinerama xml xmp xorg xosd xpm xv xvid zlib zstd" ABI_X86="64" ADA_TARGET="gnat_2021" 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="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="libinput" KERNEL="linux" L10N="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-4 php8-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby30" USERLAND="GNU" VIDEO_CARDS="intel" 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:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LD, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS

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

www-client/chromium-112.0.5615.165::gentoo was built with the following:
USE="X cups kerberos libcxx lto official (pic) proprietary-codecs pulseaudio qt5 screencast suid system-av1 system-harfbuzz system-icu system-png vaapi wayland widevine (-component-build) -custom-cflags -debug -gtk4 -hangouts (-headless) -pax-kernel (-pgo) (-selinux) (-system-ffmpeg)" ABI_X86="(64)" L10N="de -af -am -ar -bg -bn -ca -cs -da -el -en-GB -es -es-419 -et -fa -fi -fil -fr -gu -he -hi -hr -hu -id -it -ja -kn -ko -lt -lv -ml -mr -ms -nb -nl -pl -pt-BR -pt-PT -ro -ru -sk -sl -sr -sv -sw -ta -te -th -tr -uk -ur -vi -zh-CN -zh-TW"
CFLAGS="-march=native -pipe -O2 -Wno-unknown-warning-option"
CXXFLAGS="-march=native -pipe -O2 -Wno-unknown-warning-option"


Reproducible: Always
Comment 1 Steffen Hau 2023-05-16 14:19:50 UTC
Created attachment 861806 [details]
excerpt from systemd journald
Comment 2 Steffen Hau 2023-05-16 14:20:37 UTC
Due to space constraints, I had to delete the build folder. I will upload the complete build.log once I start a new merge.


wohnzimmernuc ~ #  free -m
               total        used        free      shared  buff/cache   available
Mem:           31836        3794       16969        1882       11071       25601
Swap:          16383        3875       12508
Comment 3 Yuki N. 2023-05-16 22:32:30 UTC
Chromium build is very memory hungry, especially the linking. 32 gigabytes + 16 swap should be enough if other memory-hungry applications (such as a browsers) are not running. Personally, i build Chromium in a tty with the graphic session turned off to be 100% sure that there is enough memory.
Comment 4 Steffen Hau 2023-05-19 19:38:45 UTC
One of three systems (the one is 32GB memory) was successful, while the other two (with 8GB memory and 16GB swap) failed with ld.lld getting killed by OOM. I made sure, that plasma desktop was stopped and only base services like sshd are running.

The ebuild checks for 9GB of memory. I have created an additional 16 GB swapfile and hope this is sufficient.

Is there a specific need to link with ld.lld when lto is enabled? Shouldn't ld.bfd not beeing able to deal with LTO with the LLVMgold.so plugin?
Comment 5 Steffen Hau 2023-06-16 13:44:54 UTC
The situation gets even worse with every new chromium release. The amount of memory ld.lld consumes when getting killed by oom increases. I can't use chromium anymore. The last version which I was able to compile 112.0.5615.165 is not usable as it segfaults immediately after start and any newer version cannot be compiled because of not enough memory.

No one here who has the same issues? I will try to temporarily switch off the lto use flag.
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-06-16 13:55:08 UTC
I'd expect lld to always be more efficient memory-wise than bfd for lto. J
Comment 7 Stephan Hartmann (RETIRED) gentoo-dev 2023-06-22 16:42:14 UTC
Maybe because thin-lto uses all CPU threads:

https://chromium.googlesource.com/chromium/src.git/+/refs/heads/main/build/config/compiler/BUILD.gn#734
Comment 8 Steffen Hau 2024-02-18 19:11:08 UTC
I successfully merged www-client/chromium-122.0.6261.18 with use lto enabled.

I have set -flto=auto in my CFLAGS/CXXFLAGS in make.conf, this lead to compiler invocations like "clang++ ... -flto=thin .... -flo=auto". I checked what the final options are by using -### and it came out that the last -flto wins. -flto=auto in clang will be set to -flto=full and that lead to several issues like this and bug923840.