Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 680940 - www-client/firefox-66.0[lto] - segmentation fault in on startup in libxul at ?
Summary: www-client/firefox-66.0[lto] - segmentation fault in on startup in libxul at ?
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 3 votes (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-19 17:13 UTC by Jan Vesely
Modified: 2020-11-10 15:07 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Vesely 2019-03-19 17:13:54 UTC
Segfault on startup, the last 71 calls on the stack are within libxul

$ emerge --info firefox
Portage 2.3.62 (python 3.6.5-final-0, default/linux/amd64/17.0, gcc-8.2.0, glibc-2.27-r6, 5.0.2-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.0.2-gentoo-x86_64-AMD_Ryzen_5_2500U_with_Radeon_Vega_Mobile_Gfx-with-gentoo-2.6
KiB Mem:    16035820 total,   5706944 free
KiB Swap:    8388604 total,   8125816 free
Timestamp of repository gentoo: Tue, 19 Mar 2019 16:24:38 +0000
Head commit of repository gentoo: b59ba70d0f12831ead7d197ca9a96d467c5329a9

sh bash 4.4_p23-r1
ld GNU ld (Gentoo 2.30 p5) 2.30.0
app-shells/bash:          4.4_p23-r1::gentoo
dev-lang/perl:            5.26.2::gentoo
dev-lang/python:          2.7.15::gentoo, 3.6.5::gentoo
dev-util/cmake:           3.9.6::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.11.6-r3::gentoo, 1.16.1-r1::gentoo
sys-devel/binutils:       2.30-r4::gentoo
sys-devel/gcc:            8.2.0-r6::gentoo
sys-devel/gcc-config:     2.0::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 5.0-r1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.27-r6::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: git
    sync-uri: https://anongit.gentoo.org/git/repo/sync/gentoo.git
    sync-user: portage:portage
    priority: -1000

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA PUEL Intel-SDP AMD-GPU-PRO-EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -mtune=native -fomit-frame-pointer -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 /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -march=native -mtune=native -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en_GB en_US en"
MAKEOPTS="-j8"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl aio amd64 apng aura avx bash-completion berkdb bluetooth branding bzip2 cairo caps chroot cilk clang cli cloudprint clutter colord colordiff connection-sharing crypt cryptsetup css ctype cups curl custom-optimization cxx d3d9 dbus dga dnssec dri dri3 drm dts dv dvi dvipdfm eds egl eglfs enca evdev exif expat faac faad fdt ffmpeg filter flac fontconfig fortran fpm fpx gbm gd gdbm gdm gif gimp git glamor gles gles1 glib gmp gnome gnome-keyring gnome-online-accounts gnutls go google googledrive gpg gphoto2 gpm graphics graphite gstreamer gtk gtk3 gtkstyle gudev hardened hddtemp hdri highlight hpn http2 hwaccel hwdb hybrid iconv icu id3tag idle imagemagick inspector introspection ipv6 irc ithreads jemalloc jit jpeg jpeg2k json justify keymap kms lapack lcms ldns libinput libkms libnotify libsecret libtirpc llvm lm_sensors logrotate lto mad mbox mikmod minizip mktemp mng modern-top mount mozilla mp3 mp4 mpeg mpx mtp multicall multilib multitarget musepack mysqli mysqlnd nat nautilus ncurses networkmanager nls nptl oauth ocl-icd ocl20 office ogg oom openal opencl opengl openmp openpgp openrc optimization opus osmesa pam pcap pch pcmcia pcre pcre16 pdf pdfimport pkcs11 playlist png policykit postproc postscript publishers pulseaudio pwquality quicktime raw readline reencrypt rtc s3tc samba science sdl2 seccomp secure-delete security sha512 smp sockets speex spell split-usr sqlite srv ssl staging strong-optimization svc svg syslog system-cairo system-ffmpeg system-harfbuzz system-icu system-jpeg system-jsoncpp system-libevent system-libs system-libvpx system-sqlite systemd sysvipc t1lib tci telepathy templates terminal theora threads threadsafe thunar tiff timezone tokenizer tor-hardening tordns truetype udev unicode upower usb user-session v4l vaapi vdpau vhosts vim-syntax virgl vorbis vulkan wavpack wayland wayland-compositor webgl webp widevine wmf x264 x265 xanim xattr xcb xcomposite xfs xkb xml xmp xmpp xpm xrandr xv xvid xwayland zip zlib" ABI_X86="64" ALSA_CARDS="hda-intel" APACHE2_MODULES="alias auth_digest authn_anon authn_default authn_file authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd dir env expires ext_filter file_cache filter headers ident imagemap include info log_config mem_cache mime mime_magic negotiation proxy rewrite setenvif so status unique_id userdir vhost_alias" APACHE2_MPMS="worker" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3" CURL_SSL="openssl" 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 multiboot" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en-GB en-US en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer pdfimport" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-1" POSTGRES_TARGETS="postgres9_5 postgres10" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python3_6" QEMU_SOFTMMU_TARGETS="i386 x86_64 arm ppc aarch64" RUBY_TARGETS="ruby24" USERLAND="GNU" VIDEO_CARDS="amdgpu radeonsi" 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

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

www-client/firefox-66.0::gentoo was built with the following:
USE="custom-optimization dbus gmp-autoupdate hardened hwaccel lto pulseaudio screenshot system-harfbuzz system-icu system-jpeg system-libevent system-libvpx system-sqlite system-webp wayland -bindist -clang -custom-cflags -debug -eme-free -geckodriver -jack (-neon) -pgo (-selinux) -startup-notification -test -wifi" ABI_X86="(64)" CPU_FLAGS_X86="avx2" L10N="en-GB -ach -af -an -ar -as -ast -az -bg -bn-BD -bn-IN -br -bs -ca -cak -cs -cy -da -de -dsb -el -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"
CFLAGS="-march=native -mtune=native -pipe"
CXXFLAGS="-march=native -mtune=native -pipe -fno-delete-null-pointer-checks -fno-lifetime-dse -fno-schedule-insns -fno-schedule-insns2"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-rpath=/usr/lib64/firefox,--enable-new-dtags -Wl,-z,relro,-z,now -Wl,--compress-debug-sections=zlib"
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2019-03-19 17:18:19 UTC
No backtrace?
Comment 2 Thomas Deutschmann (RETIRED) gentoo-dev 2019-03-19 18:59:13 UTC
Sorry, but we cannot do anything without the actual error message (backtrace).
Comment 3 Jory A. Pratt gentoo-dev 2019-03-19 20:12:54 UTC
this is most likely being caused by hwaccel, please run `firefox -safe-mode` and report back if you can duplicate the segfault.
Comment 4 Jan Vesely 2019-03-20 00:22:01 UTC
firefox --safe-mode still results in segfault, albeit the stack trace is a bit shorter (37 calls in libxul).

I did not include the backtrace because it's pretty useless without debugging info:
Thread 27 "DOM Worker" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffd81ff700 (LWP 4552)]
0x00007fffe72b5856 in ?? () from /usr/lib64/firefox/libxul.so
(gdb) bt
#0  0x00007fffe72b5856 in ?? () from /usr/lib64/firefox/libxul.so
#1  0x00007fffe730f675 in ?? () from /usr/lib64/firefox/libxul.so
#2  0x00007fffe730f7ce in ?? () from /usr/lib64/firefox/libxul.so
#3  0x00007fffe73be3fd in ?? () from /usr/lib64/firefox/libxul.so
#4  0x00007fffe757f0b0 in ?? () from /usr/lib64/firefox/libxul.so
#5  0x00007fffe757f4b8 in ?? () from /usr/lib64/firefox/libxul.so
#6  0x00007fffe757f53a in ?? () from /usr/lib64/firefox/libxul.so
#7  0x00007fffe75801ba in ?? () from /usr/lib64/firefox/libxul.so
#8  0x00007fffe7476eba in ?? () from /usr/lib64/firefox/libxul.so
#9  0x00007fffe74777ae in ?? () from /usr/lib64/firefox/libxul.so
#10 0x00007fffe7477af5 in ?? () from /usr/lib64/firefox/libxul.so
#11 0x00007fffe747781b in ?? () from /usr/lib64/firefox/libxul.so
#12 0x00007fffe75200ef in ?? () from /usr/lib64/firefox/libxul.so
#13 0x00007fffe7520279 in ?? () from /usr/lib64/firefox/libxul.so
#14 0x00007fffe7558fe2 in ?? () from /usr/lib64/firefox/libxul.so
#15 0x00007fffe767de97 in ?? () from /usr/lib64/firefox/libxul.so
#16 0x00007fffe7694f7b in ?? () from /usr/lib64/firefox/libxul.so
#17 0x00007fffe76a3383 in ?? () from /usr/lib64/firefox/libxul.so
#18 0x00007fffe76b0866 in ?? () from /usr/lib64/firefox/libxul.so
#19 0x00007fffe76b0c69 in ?? () from /usr/lib64/firefox/libxul.so
#20 0x00007fffe76b41b2 in ?? () from /usr/lib64/firefox/libxul.so
#21 0x00007fffe6e915aa in ?? () from /usr/lib64/firefox/libxul.so
#22 0x00007fffe75dd348 in ?? () from /usr/lib64/firefox/libxul.so
#23 0x00007fffe86201d2 in ?? () from /usr/lib64/firefox/libxul.so
#24 0x00007fffe863e767 in ?? () from /usr/lib64/firefox/libxul.so
#25 0x00007fffea0a9349 in ?? () from /usr/lib64/firefox/libxul.so
#26 0x00007fffe9ea8ba8 in ?? () from /usr/lib64/firefox/libxul.so
#27 0x00007fffe85bc445 in ?? () from /usr/lib64/firefox/libxul.so
#28 0x00007fffe864159a in ?? () from /usr/lib64/firefox/libxul.so
#29 0x00007fffe8641d64 in ?? () from /usr/lib64/firefox/libxul.so
#30 0x00007fffe90115f6 in ?? () from /usr/lib64/firefox/libxul.so
#31 0x00007fffe8c2d0a7 in ?? () from /usr/lib64/firefox/libxul.so
#32 0x00007fffe7694f7b in ?? () from /usr/lib64/firefox/libxul.so
#33 0x00007fffe76a3383 in ?? () from /usr/lib64/firefox/libxul.so
#34 0x00007fffe76b0866 in ?? () from /usr/lib64/firefox/libxul.so
#35 0x00007fffe76b0c69 in ?? () from /usr/lib64/firefox/libxul.so
#36 0x00007fffe76b41b2 in ?? () from /usr/lib64/firefox/libxul.so
#37 0x00007fffe6e915aa in ?? () from /usr/lib64/firefox/libxul.so
#38 0x00007fffe75dd348 in ?? () from /usr/lib64/firefox/libxul.so
#39 0x00007fffe86201d2 in ?? () from /usr/lib64/firefox/libxul.so
#40 0x00007fffe863e767 in ?? () from /usr/lib64/firefox/libxul.so
#41 0x00007fffea0a9349 in ?? () from /usr/lib64/firefox/libxul.so
#42 0x00007fffe9ea8ba8 in ?? () from /usr/lib64/firefox/libxul.so
#43 0x00007fffe85bc445 in ?? () from /usr/lib64/firefox/libxul.so
#44 0x00007fffe864159a in ?? () from /usr/lib64/firefox/libxul.so
#45 0x00007fffe8641d64 in ?? () from /usr/lib64/firefox/libxul.so
#46 0x00007fffe90115f6 in ?? () from /usr/lib64/firefox/libxul.so
#47 0x00007fffe8c2d0a7 in ?? () from /usr/lib64/firefox/libxul.so
#48 0x00007fffe7694f7b in ?? () from /usr/lib64/firefox/libxul.so
#49 0x00007fffe76a3383 in ?? () from /usr/lib64/firefox/libxul.so
#50 0x00007fffe76b0866 in ?? () from /usr/lib64/firefox/libxul.so
#51 0x00007fffe76b0c69 in ?? () from /usr/lib64/firefox/libxul.so
#52 0x00007fffe76b41b2 in ?? () from /usr/lib64/firefox/libxul.so
#53 0x00007fffe6e915aa in ?? () from /usr/lib64/firefox/libxul.so
#54 0x00007fffe75dd348 in ?? () from /usr/lib64/firefox/libxul.so
#55 0x00007fffe86201d2 in ?? () from /usr/lib64/firefox/libxul.so
#56 0x00007fffe863e767 in ?? () from /usr/lib64/firefox/libxul.so
#57 0x00007fffea0a9349 in ?? () from /usr/lib64/firefox/libxul.so
---Type <return> to continue, or q <return> to quit---
#58 0x00007fffe9ea8ba8 in ?? () from /usr/lib64/firefox/libxul.so
#59 0x00007fffe85bc445 in ?? () from /usr/lib64/firefox/libxul.so
#60 0x00007fffe864159a in ?? () from /usr/lib64/firefox/libxul.so
#61 0x00007fffe8641f80 in ?? () from /usr/lib64/firefox/libxul.so
#62 0x00007fffe8644052 in ?? () from /usr/lib64/firefox/libxul.so
#63 0x00007fffe863e767 in ?? () from /usr/lib64/firefox/libxul.so
#64 0x00007fffea0a9349 in ?? () from /usr/lib64/firefox/libxul.so
#65 0x00007fffe9ea8ba8 in ?? () from /usr/lib64/firefox/libxul.so
#66 0x00007fffe864604e in ?? () from /usr/lib64/firefox/libxul.so
#67 0x00007fffea0a9349 in ?? () from /usr/lib64/firefox/libxul.so
#68 0x00007fffe9ea8ba8 in ?? () from /usr/lib64/firefox/libxul.so
#69 0x00007fffe9cbcaba in ?? () from /usr/lib64/firefox/libxul.so
#70 0x00007fffe9d0ba34 in ?? () from /usr/lib64/firefox/libxul.so
#71 0x00007fffea08ded7 in ?? () from /usr/lib64/firefox/libxul.so
#72 0x00007ffff67ea7d4 in ?? () from /usr/lib64/libnspr4.so
#73 0x00007ffff7bbda33 in start_thread (arg=<optimized out>) at pthread_create.c:463
#74 0x00007ffff70c9bdf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

debug version takes some time to build.
Comment 5 Jory A. Pratt gentoo-dev 2019-03-20 00:25:07 UTC
actually strace -f firefox would  be more helpful then gdb.
Comment 6 Jan Vesely 2019-03-20 05:42:27 UTC
firefox built with USE=-lto works OK.
Comment 7 Thomas Deutschmann (RETIRED) gentoo-dev 2019-03-20 15:27:55 UTC
*** Bug 680990 has been marked as a duplicate of this bug. ***
Comment 8 Jan Vesely 2019-03-24 04:23:46 UTC
The issue persists in 66.0.1.
I'll try to get the debug build soon for a complete stack trace.
Comment 9 Jan Vesely 2019-03-24 13:23:53 UTC
Rebuild with USE=+lto,+debug did not help much.
Here's a gdb session:

Reading symbols from firefox...(no debugging symbols found)...done.
(gdb) r
Starting program: /usr/bin/firefox 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7fffdefb8700 (LWP 17761)]
[Thread 0x7fffdefb8700 (LWP 17761) exited]
[New Thread 0x7fffdefb8700 (LWP 17764)]
[New Thread 0x7fffdd18e700 (LWP 17765)]
[New Thread 0x7fffde5b0700 (LWP 17766)]
[New Thread 0x7ffff7fc5700 (LWP 17767)]
[New Thread 0x7fffd87ff700 (LWP 17768)]
[New Thread 0x7fffd8600700 (LWP 17769)]
[New Thread 0x7fffd8401700 (LWP 17770)]
[New Thread 0x7fffd8202700 (LWP 17771)]
[New Thread 0x7fffd8003700 (LWP 17772)]
[New Thread 0x7fffd7e04700 (LWP 17773)]
[New Thread 0x7fffd7c05700 (LWP 17774)]
[New Thread 0x7fffd7a06700 (LWP 17775)]
Assertion failure: !locale.IsEmpty(), at /var/tmp/portage-big/portage/www-client/firefox-66.0.1/work/firefox-66.0.1/intl/locale/LocaleService.cpp:529
#01: ???[/usr/lib64/firefox/libxul.so +0x50cf642]
#02: ???[/usr/lib64/firefox/libxul.so +0x50cf6ec]
#03: ???[/usr/lib64/firefox/libxul.so +0x4ab0a41]
#04: ???[/usr/lib64/firefox/libxul.so +0x51ab96a]
#05: ???[/usr/lib64/firefox/libxul.so +0x51b4d70]
#06: ???[/usr/lib64/firefox/libxul.so +0x1f7bbae]
#07: ???[/usr/lib64/firefox/libxul.so +0x20b9b62]
#08: ???[/usr/bin/firefox +0x267bc]
#09: ???[/usr/bin/firefox +0xaad4]
#10: __libc_start_main[/lib64/libc.so.6 +0x233cb]
#11: _start[/usr/bin/firefox +0xabba]
#12: ??? (???:???)

Thread 1 "firefox" received signal SIGSEGV, Segmentation fault.
0x00007fffe575020b in ?? () from /usr/lib64/firefox/libxul.so
(gdb) bt
#0  0x00007fffe575020b in ?? () from /usr/lib64/firefox/libxul.so
#1  0x00007fffe93ff642 in ?? () from /usr/lib64/firefox/libxul.so
#2  0x00007fffe93ff6ec in ?? () from /usr/lib64/firefox/libxul.so
#3  0x00007fffe8de0a41 in ?? () from /usr/lib64/firefox/libxul.so
#4  0x00007fffe94db96a in ?? () from /usr/lib64/firefox/libxul.so
#5  0x00007fffe94e4d70 in ?? () from /usr/lib64/firefox/libxul.so
#6  0x00007fffe62abbae in ?? () from /usr/lib64/firefox/libxul.so
#7  0x00007fffe63e9b62 in ?? () from /usr/lib64/firefox/libxul.so
#8  0x000055555557a7bc in ?? ()
#9  0x000055555555ead4 in ?? ()
#10 0x00007ffff6fec3cb in __libc_start_main (main=0x55555555ea50, argc=1, argv=0x7fffffffdc38, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffdc28) at ../csu/libc-start.c:308
#11 0x000055555555ebba in _start ()
(gdb)

I'm not sure if the first assertion is relevant. The build also produces QA warning (debug or not):
 * QA Notice: Package triggers severe warnings which indicate that it
 *            may exhibit random runtime failures.
 5:10.75 [lmdb-sys 0.8.0] cargo:warning=/var/tmp/portage-big/portage/www-client/firefox-66.0.1/work/firefox-66.0.1/third_party/rust/lmdb-sys/lmdb/libraries/liblmdb/mdb.c:9303:18: warning: implicit declaration of function 'memalign' [-Wimplicit-function-declaration]
 5:13.39 warning: /var/tmp/portage-big/portage/www-client/firefox-66.0.1/work/firefox-66.0.1/third_party/rust/lmdb-sys/lmdb/libraries/liblmdb/mdb.c:9303:18: warning: implicit declaration of function 'memalign' [-Wimplicit-function-declaration]
Comment 10 Thomas Deutschmann (RETIRED) gentoo-dev 2019-03-24 13:32:55 UTC
(In reply to Jan Vesely from comment #9)
> Rebuild with USE=+lto,+debug did not help much.
> Here's a gdb session:
> 
> Reading symbols from firefox...(no debugging symbols found)...done.

...so you did something wrong :)

https://wiki.gentoo.org/wiki/Debugging
Comment 11 Jan Vesely 2019-03-27 00:17:35 UTC
(In reply to Thomas Deutschmann from comment #10)
> (In reply to Jan Vesely from comment #9)
> > Rebuild with USE=+lto,+debug did not help much.
> > Here's a gdb session:
> > 
> > Reading symbols from firefox...(no debugging symbols found)...done.
> 
> ...so you did something wrong :)
> 
> https://wiki.gentoo.org/wiki/Debugging

yeah, I hoped USE+debug would take care of things, but it needed FEATURE=nostrip.

at any rate, adding debugging symbols does not help much.
The backtrace produced by firefox still does not include symbol infomration.

Running firefox in gdb or connecting to a crashed instance (firefox sleeps for 5 mins waiting for a gdb connection), gdb either crashes (Assertion failure on source language), or eats up all system memory (including swap) and dies slow swapping death after producing a single line of trace.
The single line is usleep.
Comment 12 tt_1 2019-03-27 06:48:38 UTC
try to set this via env: 

FEATUES="splitdebug"

CFLAGS="-ggdb"
CXXFLAGS="-ggdb"

the firefox ebuild does some really adavanced kungfu to detect funnny/broken cflags, and it might be that it strips the debug cflags. Last time I tried with CFLAGS="${CFLAGS} -ggdb" it appended -ggdb six or seven times in a row, which can't be correct. 

Also, if you're having memory problems at compile or debugin time, go for CFLAGS="-g" first, -ggdb is really verbose and hardware demanding. libxul.so.debug was something around 600mb last time I tried.

Basically, you should end up with a package that installs all of the normal package files, plus the stripped debug files in /usr/lib/debug/

Also you might want to try to set the appropiate -march CFLAG instead of -march=native, as this has caused trouble on some systems with gcc-8
Comment 13 Joakim Tjernlund 2019-03-29 00:02:43 UTC
I got the same but rebuilding cbinder and firefox with -lto 
fixed it.
USE=dbus gmp-autoupdate hwaccel pulseaudio screenshot startup-notification system-av1 system-harfbuzz system-icu system-jpeg system-libevent system-libvpx system-sqlite system-webp
Comment 14 Jan Vesely 2019-03-31 03:41:37 UTC
(In reply to tt_1 from comment #12)
> try to set this via env: 
> 
> FEATUES="splitdebug"
> 
> CFLAGS="-ggdb"
> CXXFLAGS="-ggdb"
> 
> the firefox ebuild does some really adavanced kungfu to detect funnny/broken
> cflags, and it might be that it strips the debug cflags. Last time I tried
> with CFLAGS="${CFLAGS} -ggdb" it appended -ggdb six or seven times in a row,
> which can't be correct. 
> 
> Also, if you're having memory problems at compile or debugin time, go for
> CFLAGS="-g" first, -ggdb is really verbose and hardware demanding.
> libxul.so.debug was something around 600mb last time I tried.
> 
> Basically, you should end up with a package that installs all of the normal
> package files, plus the stripped debug files in /usr/lib/debug/
> 
> Also you might want to try to set the appropiate -march CFLAG instead of
> -march=native, as this has caused trouble on some systems with gcc-8

firefox build system uses -march=x86-64 -mtune=generic.

I tried rebuilding using cbindgen[+debug], the build took longer and needed more disk space (~24 GB).
The results are mostly the same. firefox bt does not print symbols.
running within gdb-8.1-r1 results in:

[New Thread 0x7fffd7506700 (LWP 5542)]
Assertion failure: !locale.IsEmpty(), at /home/portage/portage/www-client/firefox-66.0.2/work/firefox-66.0.2/intl/locale/LocaleService.cpp:529
#01: ???[/usr/lib64/firefox/libxul.so +0x51307c2]
#02: ???[/usr/lib64/firefox/libxul.so +0x513086c]
#03: ???[/usr/lib64/firefox/libxul.so +0x4b13e21]
#04: ???[/usr/lib64/firefox/libxul.so +0x520ce1e]
#05: ???[/usr/lib64/firefox/libxul.so +0x5216577]
#06: ???[/usr/lib64/firefox/libxul.so +0x1f85d1e]
#07: ???[/usr/lib64/firefox/libxul.so +0x20c4002]
#08: ???[/usr/bin/firefox +0x269bc]
#09: ???[/usr/bin/firefox +0xadd4]
#10: __libc_start_main[/lib64/libc.so.6 +0x2375b]
#11: _start[/usr/bin/firefox +0xaeba]
#12: ??? (???:???)
dictionary.c:690: internal-error: void insert_symbol_hashed(dictionary*, symbol*): Assertion `SYMBOL_LANGUAGE (sym) == DICT_LANGUAGE (dict)->la_language' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.

I'm not sure the first assertion is the root cause.

Connecting to firefox after:
Sleeping for 300 seconds.
Type 'gdb firefox 5336' to attach your debugger to this thread.

allows me to inspect call stack in sleep and nanosleep (presumably sigsegv signal handler stack)
Comment 15 Jan Vesely 2019-03-31 16:34:27 UTC
I took few hours of swapping and a new gdb but here's a debugging session. I guess it is locale related after all.

$ gdb firefox
GNU gdb (Gentoo 8.3.50.20190312 p1) 8.3.50.20190312-git
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://bugs.gentoo.org/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from firefox...
Reading symbols from /usr/lib64/debug//usr/lib64/firefox/firefox.debug...
(gdb) r
Starting program: /usr/bin/firefox 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[Detaching after fork from child process 11065]
[New Thread 0x7fffdef5d700 (LWP 11069)]
[Thread 0x7fffdef5d700 (LWP 11069) exited]
[Detaching after fork from child process 11070]
[New Thread 0x7fffdef5d700 (LWP 11072)]
[New Thread 0x7fffdcc8e700 (LWP 11073)]
[New Thread 0x7ffff7faa700 (LWP 11074)]
[New Thread 0x7ffff7fc5700 (LWP 11075)]
[New Thread 0x7fffd82ff700 (LWP 11076)]
[New Thread 0x7fffd8100700 (LWP 11077)]
[New Thread 0x7fffd7f01700 (LWP 11078)]
[New Thread 0x7fffd7d02700 (LWP 11079)]
[New Thread 0x7fffd7b03700 (LWP 11080)]
[New Thread 0x7fffd7904700 (LWP 11081)]
[New Thread 0x7fffd7705700 (LWP 11082)]
[New Thread 0x7fffd7506700 (LWP 11083)]
Assertion failure: !locale.IsEmpty(), at /home/portage/portage/www-client/firefox-66.0.2/work/firefox-66.0.2/intl/locale/LocaleService.cpp:529
#01: ???[/usr/lib64/firefox/libxul.so +0x51307c2]
#02: ???[/usr/lib64/firefox/libxul.so +0x513086c]
#03: ???[/usr/lib64/firefox/libxul.so +0x4b13e21]
#04: ???[/usr/lib64/firefox/libxul.so +0x520ce1e]
#05: ???[/usr/lib64/firefox/libxul.so +0x5216577]
#06: ???[/usr/lib64/firefox/libxul.so +0x1f85d1e]
#07: ???[/usr/lib64/firefox/libxul.so +0x20c4002]
#08: ???[/usr/bin/firefox +0x269bc]
#09: ???[/usr/bin/firefox +0xadd4]
#10: __libc_start_main[/lib64/libc.so.6 +0x2375b]
#11: _start[/usr/bin/firefox +0xaeba]
#12: ??? (???:???)
Thread 1 "firefox" received signal SIGSEGV, Segmentation fault.
mozilla::intl::LocaleService::GetDefaultLocale (this=<optimized out>, 
    aRetVal=...)
    at /home/portage/portage/www-client/firefox-66.0.2/work/firefox-66.0.2/intl/locale/LocaleService.cpp:529
529	/home/portage/portage/www-client/firefox-66.0.2/work/firefox-66.0.2/intl/locale/LocaleService.cpp: No such file or directory.
(gdb) bt
#0  mozilla::intl::LocaleService::GetDefaultLocale (this=<optimized out>, 
    aRetVal=...)
    at /home/portage/portage/www-client/firefox-66.0.2/work/firefox-66.0.2/intl/locale/LocaleService.cpp:529
#1  0x00007fffe94047c2 in mozilla::intl::LocaleService::NegotiateAppLocales (
    this=<optimized out>, aRetVal=...)
    at /home/portage/portage/www-client/firefox-66.0.2/work/firefox-66.0.2/intl/locale/LocaleService.cpp:136
#2  0x00007fffe940486c in mozilla::intl::LocaleService::GetAppLocaleAsBCP47 (
    this=0x7fffdd136b00, aRetVal=...)
    at /home/portage/portage/www-client/firefox-66.0.2/work/firefox-66.0.2/intl/locale/LocaleService.cpp:589
#3  0x00007fffe8de7e21 in _Z19xpc_LocalizeRuntimeP9JSRuntime (
    rt=<optimized out>, rt=<optimized out>)
    at /home/portage/portage/www-client/firefox-66.0.2/work/firefox-66.0.2/js/xpconnect/src/XPCLocale.cpp:138
#4  0x00007fffe94e0e1e in XPCJSRuntime::Initialize (cx=0x7fffd8325000, 
    this=<optimized out>)
    at /usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/include/g++-v8/bits/atomic_base.h:390
#5  XPCJSContext::Initialize (aPrimaryContext=0x0, this=0x7fffdc331000)
    at /home/portage/portage/www-client/firefox-66.0.2/work/firefox-66.0.2/js/xpconnect/src/XPCJSContext.cpp:1186
--Type <RET> for more, q to quit, c to continue without paging--c
#6  XPCJSContext::NewXPCJSContext (aPrimaryContext=0x0) at /home/portage/portage/www-client/firefox-66.0.2/work/firefox-66.0.2/js/xpconnect/src/XPCJSContext.cpp:1224
#7  nsXPConnect::nsXPConnect (this=<optimized out>, this=<optimized out>) at /home/portage/portage/www-client/firefox-66.0.2/work/firefox-66.0.2/js/xpconnect/src/nsXPConnect.cpp:75
#8  nsXPConnect::InitStatics () at /home/portage/portage/www-client/firefox-66.0.2/work/firefox-66.0.2/js/xpconnect/src/nsXPConnect.cpp:127
#9  xpcModuleCtor () at /home/portage/portage/www-client/firefox-66.0.2/work/firefox-66.0.2/js/xpconnect/src/XPCModule.cpp:11
#10 nsLayoutModuleInitialize () at /home/portage/portage/www-client/firefox-66.0.2/work/firefox-66.0.2/layout/build/nsLayoutModule.cpp:237
#11 nsComponentManagerImpl::Init (this=0x7ffff6a85ac0) at /home/portage/portage/www-client/firefox-66.0.2/work/firefox-66.0.2/xpcom/components/nsComponentManager.cpp:362
#12 0x00007fffe94ea577 in NS_InitXPCOM2 (aResult=<optimized out>, aBinDirectory=<optimized out>, aAppFileLocationProvider=<optimized out>) at /home/portage/portage/www-client/firefox-66.0.2/work/firefox-66.0.2/xpcom/build/XPCOMInit.cpp:587
#13 0x00007fffe6259d1e in ScopedXPCOMStartup::Initialize (this=0x7fffdd17b4b0) at /home/portage/portage/www-client/firefox-66.0.2/work/firefox-66.0.2/toolkit/xre/nsXREDirProvider.h:77
#14 0x00007fffe6398002 in XREMain::XRE_main (aConfig=..., argv=<optimized out>, argc=<optimized out>, this=0x7fffffffc4b0) at /home/portage/portage/www-client/firefox-66.0.2/work/firefox-66.0.2/toolkit/xre/nsAppRunner.cpp:4529
#15 XRE_main (argc=<optimized out>, argv=<optimized out>, aConfig=...) at /home/portage/portage/www-client/firefox-66.0.2/work/firefox-66.0.2/toolkit/xre/nsAppRunner.cpp:4617
#16 0x000055555557a9bc in do_main (argc=1, argv=0x7fffffffdc38, envp=<optimized out>) at /home/portage/portage/www-client/firefox-66.0.2/work/firefox-66.0.2/browser/app/nsBrowserApp.cpp:214
#17 0x000055555555edd4 in main (argc=1, argv=0x7fffffffdc38, envp=0x7fffffffdc48) at /home/portage/portage/www-client/firefox-66.0.2/work/firefox-66.0.2/browser/app/nsBrowserApp.cpp:293
Comment 16 Jan Vesely 2019-05-24 00:57:15 UTC
firefox-67.0 works ok with gcc-8.3.0-r1 and USE=lto.
Comment 17 Michael Rohleder (mroh) 2019-12-03 01:05:10 UTC
I can reproduce that with firefox-71.0[lto]

Thread 54 "IndexedDB #1" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffe4aff700 (LWP 23630)]
0x00007ffff2a2c268 in NS_ABORT_OOM(unsigned long) () from /usr/lib64/firefox/libxul.so
(gdb) bt
#0  0x00007ffff2a2c268 in NS_ABORT_OOM(unsigned long) () at /usr/lib64/firefox/libxul.so
#1  0x00007ffff0c5bfcb in nsTSubstring<char>::Assign(nsTSubstringTuple<char> const&) [clone .cold] ()
    at /usr/lib64/firefox/libxul.so
#2  0x00007ffff34e4798 in mozilla::dom::indexedDB::(anonymous namespace)::Cursor::OpenOp::DoIndexKeyDatabaseWork(mozilla::dom::indexedDB::(anonymous namespace)::DatabaseConnection*) () at /usr/lib64/firefox/libxul.so
#3  0x00007ffff34e43ee in mozilla::dom::indexedDB::(anonymous namespace)::Cursor::OpenOp::DoDatabaseWork(mozilla::dom::indexedDB::(anonymous namespace)::DatabaseConnection*) () at /usr/lib64/firefox/libxul.so
#4  0x00007ffff34cf963 in mozilla::dom::indexedDB::(anonymous namespace)::TransactionDatabaseOperationBase::RunOnConnectionThread() [clone .lto_priv.0] () at /usr/lib64/firefox/libxul.so
#5  0x00007ffff34cf3da in mozilla::dom::indexedDB::(anonymous namespace)::TransactionDatabaseOperationBase::Run() [clone .lto_priv.0] () at /usr/lib64/firefox/libxul.so
#6  0x00007ffff2ae8e05 in nsThread::ProcessNextEvent(bool, bool*) () at /usr/lib64/firefox/libxul.so
#7  0x00007ffff2ae80ec in NS_ProcessNextEvent(nsIThread*, bool) () at /usr/lib64/firefox/libxul.so
#8  0x00007ffff34cf336 in mozilla::dom::indexedDB::(anonymous namespace)::ConnectionPool::ThreadRunnable::Run() ()
    at /usr/lib64/firefox/libxul.so
#9  0x00007ffff2ae8e05 in nsThread::ProcessNextEvent(bool, bool*) () at /usr/lib64/firefox/libxul.so
#10 0x00007ffff2ae7d26 in mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*) ()
    at /usr/lib64/firefox/libxul.so
#11 0x00007ffff2a7f091 in MessageLoop::Run() () at /usr/lib64/firefox/libxul.so
#12 0x00007ffff2ae7583 in nsThread::ThreadFunc(void*) () at /usr/lib64/firefox/libxul.so
#13 0x00007ffff79550d5 in  () at /usr/lib64/libnspr4.so
#14 0x00007ffff7f70347 in start_thread () at /lib64/libpthread.so.0
#15 0x00007ffff7abbfcf in clone () at /lib64/libc.so.6

it works w/o lto!
Comment 18 Valentin V. Bartenev 2019-12-03 10:27:03 UTC
The same problem with recently built Firefox 71.0 using GCC 9.2.0 and lto enabled.

% firefox
zsh: segmentation fault  firefox

Rebuilding without lto use flag fixed the issue.
Comment 19 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-03-31 22:21:54 UTC
Somebody just hit this on #gentoo with USE=debug. No LTO. They were able to fix with USE=-debug.

It looks like htere's an actual fix available suggested on the Mozilla bugtracker [0]:

>The assert (or even most of the body) should be in 
>an #ifdef MOZ_UPDATER, since >update.locale is not packaged
>when the updater is disabled
>https://searchfox.org/mozilla-central/rev/ddb81c7a43ffada1f6cb4200c4f625e50e44dcf3/browser/installer/package-manifest.in#59-62

>Alternatively, update.locale should unconditionally be
>added to the package (even if the updater is disabled).

https://bugzilla.mozilla.org/show_bug.cgi?id=1497581#c5

I have their emerge --info etc locally.
Comment 20 Thomas Deutschmann (RETIRED) gentoo-dev 2020-10-10 17:44:10 UTC
I am closing this as obsolete given that 68.x was removed from repository. If you still see this with 78.3 or later, please re-open or file a new bug.
Comment 21 sliwa 2020-11-10 15:07:16 UTC
This issue is still unresolved in Gentoo's firefox-78.4.1-esr:

With USE=debug firefox reports a failed assertion on start up (locale not set).

Also, with "debug" included, it fails to build unless "-system-av1" is set also (because system libaom includes are missing #define AOM_PLANE_ALPHA).


The primary reason I bother to report this are segfaults in libxul.so when the proprietary NVIDIA drivers are in use (x11-drivers/nvidia-drivers) and running in a firejail sandbox.