Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 650846

Summary: www-client/firefox-58.0.1 - In file included from .../work/firefox-58.0.1/ff/layout/base/Unified_cpp_layout_base1.cpp:128:0: .../work/firefox-58.0.1/layout/base/nsLayoutUtils.cpp:8729:1: internal compiler error: Segme
Product: Gentoo Linux Reporter: Walter <walter>
Component: Current packagesAssignee: Mozilla Gentoo Team <mozilla>
Status: RESOLVED INVALID    
Severity: normal CC: kaikaikai
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build.log.gz
emerge --info
builg.log.tar.xz
build.log.tar.xz for firefox-59.0.1

Description Walter 2018-03-19 07:09:41 UTC
* ERROR: www-client/firefox-58.0.1::gentoo failed (compile phase):
 *   (no error message)
 * 
 * Call stack:
 *     ebuild.sh, line 124:  Called src_compile
 *   environment, line 5004:  Called die
 * The specific snippet of code:
 *       MOZ_MAKE_FLAGS="${MAKEOPTS}" SHELL="${SHELL:-${EPREFIX}/bin/bash}" MOZ_NOSPAM=1 ./mach build -v || die


Now I have compiled it successfully in the past but it's not working now (I am recompiling the same version with pulseaudio disabled).

Other info:
# emerge -pqv '=www-client/firefox-58.0.1::gentoo'
[ebuild   R   ] www-client/firefox-58.0.1  USE="gmp-autoupdate screenshot -bindist -custom-cflags -custom-optimization -dbus -debug -eme-free -hardened -hwaccel -jack (-neon) -pulseaudio* (-selinux) -startup-notification -system-harfbuzz -system-icu -system-jpeg -system-libevent -system-libvpx -system-sqlite {-test} -wifi" L10N="-ach -af -an -ar -as -ast -az -bg -bn-BD -bn-IN -br -bs -ca -cak -cs -cy -da -de -dsb -el -en-GB -en-ZA -eo -es-AR -es-CL -es-ES -es-MX -et -eu -fa -ff -fi -fr -fy -ga -gd -gl -gn -gu -he -hi -hr -hsb -hu -hy -id -is -it -ja -ka -kab -kk -km -kn -ko -lij -lt -lv -mai -mk -ml -mr -ms -nb -nl -nn -or -pa -pl -pt-BR -pt-PT -rm -ro -ru -si -sk -sl -son -sq -sr -sv -ta -te -th -tr -uk -uz -vi -xh -zh-CN -zh-TW" 

Emerge --info:
Portage 2.3.24 (python 3.5.4-final-0, default/linux/amd64/17.0, gcc-6.4.0, glibc-2.25-r9, 4.15.9 x86_64)
=================================================================
System uname: Linux-4.15.9-x86_64-Intel-R-_Core-TM-_i7-7700HQ_CPU_@_2.80GHz-with-gentoo-2.4.1
KiB Mem:    15948560 total,   6319572 free
KiB Swap:    8388604 total,   8388604 free
Timestamp of repository gentoo: Sat, 17 Mar 2018 19:30:01 +0000
Head commit of repository gentoo: 99a2d2221b7a7207c2cf0dd07c2701e6c282c1a2
Head commit of repository arduino-overlay: 21fb53086dfe006e14f22ccd098b4d117faeea89

sh bash 4.4_p12
ld GNU ld (Gentoo 2.29.1 p3) 2.29.1
app-shells/bash:          4.4_p12::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.24.3::gentoo
dev-lang/python:          2.7.14-r1::gentoo, 3.5.4-r1::gentoo, 3.6.3-r1::gentoo
dev-util/cmake:           3.9.6::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/openrc:          0.34.11::gentoo
sys-apps/sandbox:         2.10-r4::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.11.6-r2::gentoo, 1.15.1-r1::gentoo
sys-devel/binutils:       2.29.1-r1::gentoo
sys-devel/gcc:            6.4.0::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.13::gentoo (virtual/os-headers)
sys-libs/glibc:           2.25-r9::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-metamanifest: no
    sync-rsync-extra-opts: 

crossdev
    location: /usr/local/portage-crossdev
    masters: gentoo
    priority: 10

arduino-overlay
    location: /var/lib/arduino-overlay
    sync-type: git
    sync-uri: https://github.com/mapmot/arduino-overlay.git
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="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/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/angband/gamedata/ /etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php7.1/ext-active/ /etc/php/cgi-php7.1/ext-active/ /etc/php/cli-php7.1/ext-active/ /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="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict 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="http://mirrors.163.com/gentoo/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en zh"
MAKEOPTS="-j9"
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 acl amd64 berkdb bzip2 cli crypt cxx dri fortran gdbm iconv infinality ipv6 libzfs modules multilib ncurses nls nptl openmp pam pcre pulseaudio readline seccomp ssl tcpd unicode vim-syntax xattr 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="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 wacom keyboard mouse libinput synaptics" KERNEL="linux" 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" PYTHON_SINGLE_TARGET="python3_5" PYTHON_TARGETS="python2_7 python3_5" RUBY_TARGETS="ruby22 ruby23" USERLAND="GNU" VIDEO_CARDS="intel i915 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, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Walter 2018-03-19 07:16:31 UTC
Created attachment 524356 [details]
build.log.gz
Comment 2 Walter 2018-03-19 07:17:37 UTC
Compiling with 24GB available memory.

# free -m 
              total        used        free      shared  buff/cache   available
Mem:          15574        8047        6020         806        1506        6857
Swap:          8191           0        8191
Comment 3 Alexey Korepanov 2018-03-19 21:24:10 UTC
I observe the same on arm64

# emerge -pv firefox

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N    *] www-client/firefox-58.0.1::gentoo  USE="dbus gmp-autoupdate pulseaudio screenshot wifi -bindist -custom-cflags -custom-optimization -debug -eme-free (-hardened) -hwaccel -jack -neon (-selinux) -startup-notification -system-harfbuzz -system-icu -system-jpeg -system-libevent -system-libvpx -system-sqlite {-test}" L10N="-ach -af -an -ar -as -ast -az -bg -bn-BD -bn-IN -br -bs -ca -cak -cs -cy -da -de -dsb -el -en-GB -en-ZA -eo -es-AR -es-CL -es-ES -es-MX -et -eu -fa -ff -fi -fr -fy -ga -gd -gl -gn -gu -he -hi -hr -hsb -hu -hy -id -is -it -ja -ka -kab -kk -km -kn -ko -lij -lt -lv -mai -mk -ml -mr -ms -nb -nl -nn -or -pa -pl -pt-BR -pt-PT -rm -ro -ru -si -sk -sl -son -sq -sr -sv -ta -te -th -tr -uk -uz -vi -xh -zh-CN -zh-TW" 0 KiB
Comment 4 Walter 2018-03-19 23:27:07 UTC
The problem was apparently a lack of memory.

I solved it by shutting down X11 and killing all daemons, then compiling on the console.
Comment 5 Alexey Korepanov 2018-03-19 23:30:58 UTC
I do not think that this is an out of memory issue. And if it is a memory issue, then it is something to take care in the ebuild (say, war that the compilation will fail if there is less than 24 GB RAM). But did you change anything else?

I have around 6GB of memory free and a large swap. Compilation repeatedly fails.
Comment 6 Walter 2018-03-19 23:53:08 UTC
I didn't think so either but the first time I had issues adding 8HB swap helped. The second time closing X11 and all daemons and compiling on console helped.

Evidence points towards memory.
Comment 7 Alexey Korepanov 2018-03-20 11:15:58 UTC
Created attachment 524490 [details]
emerge --info
Comment 8 Alexey Korepanov 2018-03-20 11:16:28 UTC
Created attachment 524492 [details]
builg.log.tar.xz
Comment 9 Alexey Korepanov 2018-03-22 17:21:03 UTC
Created attachment 524930 [details]
build.log.tar.xz for firefox-59.0.1

I was previously building in a qemu chroot. 

Now I tried firefox-59.0.1 on the real aarch64 hardware with -j1, 2GB of ram and 4GB of swap.

The compilation still fails, very similarly, but the error message is more detailed.

Can somebody reopen this bug? There certainly is a problem.

146:38.26    Compiling glob v0.2.11                                                                                                                                      
146:43.35 error: internal compiler error: unexpected panic                                                                                                               
146:43.35                                                                                         
146:43.37 note: the compiler unexpectedly panicked. this is a bug.                                       
146:43.37                                                                                                  
146:43.37 note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports                     
146:43.39                                                                                                       
146:43.39 note: rustc 1.23.0-dev running on aarch64-unknown-linux-gnu
146:43.40                                                
146:43.40 note: run with `RUST_BACKTRACE=1` for a backtrace
146:43.41                                                       
146:43.42 thread 'rustc' panicked at 'other was less than the current instant', src/libstd/sys/unix/time.rs:284:16
146:43.42 stack backtrace:                                                                 
146:43.42    0:       0x7f9e7de973 - rust_metadata_std_5958eddae63d6947e0733521fc5435ed
146:43.43    1:       0x7f9e7da9d7 - rust_metadata_std_5958eddae63d6947e0733521fc5435ed
146:43.43    2:       0x7f9e7e9f3f - rust_metadata_std_5958eddae63d6947e0733521fc5435ed
146:43.43    3:       0x7f9e7e9c4f - rust_metadata_std_5958eddae63d6947e0733521fc5435ed
146:43.44    4:       0x7f9e7ea443 - std::panicking::rust_panic_with_hook::h22b280fc4fc0de87
146:43.44    5:       0x7f9e7ea303 - rust_metadata_std_5958eddae63d6947e0733521fc5435ed
146:43.44    6:       0x7f9e7d9eb7 - std::time::Instant::elapsed::hf802fe319eded9b8
146:43.45    7:       0x7f9da24283 - <unknown>
146:43.45    8:       0x7f9da4965b - <unknown>                      
146:43.45    9:       0x7f9cd3199b - rust_metadata_rustc_3ea30897d9dddf7b5fa3a6c2523637e7
146:43.46   10:       0x7f9cf028f7 - rust_metadata_rustc_3ea30897d9dddf7b5fa3a6c2523637e7                                                                                
146:43.46   11:       0x7f9cc1cd2b - rust_metadata_rustc_3ea30897d9dddf7b5fa3a6c2523637e7
...
Comment 10 Alexey Korepanov 2018-03-22 17:22:28 UTC
Also, I was watching the memory consumption. There always were at least 500MB of physical memory free.
Comment 11 Alexey Korepanov 2018-03-23 07:39:40 UTC
I submitted a bugreport with rust:
https://github.com/rust-lang/rust/issues/49281
Comment 12 Jeroen Roovers (RETIRED) gentoo-dev 2018-03-23 07:50:48 UTC
817:29.24 In file included from /var/tmp/portage/www-client/firefox-58.0.1/work/firefox-58.0.1/ff/layout/base/Unified_cpp_layout_base1.cpp:128:0:
817:29.24 /var/tmp/portage/www-client/firefox-58.0.1/work/firefox-58.0.1/layout/base/nsLayoutUtils.cpp: In static member function 'static nsSize nsLayoutUtils::CalculateCompositionSizeForFrame(nsIFrame*, bool)':
817:29.24 /var/tmp/portage/www-client/firefox-58.0.1/work/firefox-58.0.1/layout/base/nsLayoutUtils.cpp:8729:1: internal compiler error: Segmentation fault
817:29.24  nsLayoutUtils::CalculateCompositionSizeForFrame(nsIFrame* aFrame, bool aSubtractScrollbars)
817:29.24  ^~~~~~~~~~~~~
817:29.25 Please submit a full bug report,
817:29.25 with preprocessed source if appropriate.
817:29.26 See <https://bugs.gentoo.org/> for instructions.
Comment 13 Jeroen Roovers (RETIRED) gentoo-dev 2018-03-23 07:53:03 UTC
Comment on attachment 524490 [details]
emerge --info

You have MAKEOPTS="-j8 -l7" and you have 8 gigabytes of memory. Each g++ is therefore limited to 1 gigabyte of memory usage in the best of circumstances. GCC assumes in many places that you have "plenty" of RAM to work with, in other words it does not check everywhere whether it is allocated the memory it requests.

Could you try with fewer make jobs to see if that "fixes" the issue?
Comment 14 Alexey Korepanov 2018-03-23 08:26:08 UTC
I tried with -j1, got the same error
Comment 15 Jory A. Pratt gentoo-dev 2019-03-31 20:06:27 UTC
Please feel free to reopen and update any bug report that can be duplicated with current esr builds, 60.x. If you feel your feature needs to be re looked at in any of these bugs reopen and update, please attach patches when appropriate. Thank you Mozilla Team