Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 701866 - www-client/firefox-71.0 - firefox: JavaScript error: , line 0: UnknownError: The operation failed for reasons unrelated to the database itself and not covered by any other error code.
Summary: www-client/firefox-71.0 - firefox: JavaScript error: , line 0: UnknownError: ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Mozilla Gentoo Team
URL: https://bugzilla.mozilla.org/show_bug...
Whiteboard:
Keywords:
: 701934 702418 (view as bug list)
Depends on:
Blocks: 915000
  Show dependency tree
 
Reported: 2019-12-03 09:00 UTC by klaus818
Modified: 2023-10-01 06:36 UTC (History)
11 users (show)

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


Attachments
upstream patch to fix part 1 non addon corrections. (bug-1601707.patch,3.02 KB, patch)
2019-12-07 00:32 UTC, Jory A. Pratt
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description klaus818 2019-12-03 09:00:24 UTC
firefox 
JavaScript error: , line 0: UnknownError: The operation failed for reasons unrelated to the database itself and not covered by any other error code.
Speicherzugriffsfehler

Portage 2.3.80 (python 3.6.9-final-0, default/linux/amd64/17.1/desktop/plasma/systemd, gcc-9.2.0, glibc-2.30-r3, 5.4.1-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.4.1-gentoo-x86_64-AMD_Ryzen_5_2600X_Six-Core_Processor-with-gentoo-2.6
KiB Mem:    16419716 total,  13956096 free
KiB Swap:   33554428 total,  33554428 free
Timestamp of repository gentoo: Tue, 03 Dec 2019 04:30:01 +0000
Head commit of repository gentoo: 62c4e26c781aa5827f82f50fbd78af397d72efd4
sh bash 5.0_p11
ld GNU ld (Gentoo 2.33.1 p1) 2.33.1
app-shells/bash:          5.0_p11::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.30.1::gentoo
dev-lang/python:          2.7.17::gentoo, 3.6.9-r1::lto-overlay
dev-util/cmake:           3.16.0::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/sandbox:         2.18::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.13.4-r2::gentoo, 1.16.1-r2::gentoo
sys-devel/binutils:       2.33.1::gentoo
sys-devel/gcc:            9.2.0-r2::gentoo
sys-devel/gcc-config:     2.1::gentoo
sys-devel/libtool:        2.4.6-r5::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 5.3-r1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.30-r3::gentoo
Repositories:

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

tvbrowser-bin
    location: /usr/local/portage
    masters: gentoo

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

lto-overlay
    location: /var/lib/layman/lto-overlay
    sync-type: laymansync
    sync-uri: https://github.com/InBetweenNames/gentooLTO.git
    masters: gentoo mv
    priority: 50

mv
    location: /var/lib/layman/mv
    sync-type: laymansync
    sync-uri: https://anongit.gentoo.org/git/user/mv.git
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -flto=12 -fuse-linker-plugin -pipe -ftree-vectorize"
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"
CXXFLAGS="-march=native -O2 -flto=12 -fuse-linker-plugin -pipe -ftree-vectorize"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps=y"
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 candy config-protect-if-modified distlocks ebuild-locks fail-clean 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="ftp://mirror.netcologne.de/gentoo/ http://ftp.free.fr/mirrors/ftp.gentoo.org/ https://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/ https://ftp.halifax.rwth-aachen.de/gentoo/ http://gentoo.mirror.web4u.cz/"
LANG="de_DE.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j12"
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="/var/tmp"
USE="7zip X a52 aac acl acpi activities alsa amd64 berkdb branding bzip2 cairo cdda cdr cli crypt cups cxx dav1d dbus declarative dns-over-tls dri dropbox dts dvd dvdr emboss encode epub exif fam ffmpeg flac fortran gdbm gif gpm grub gtk iconv icu ipv6 ithreads jpeg jumbo-build kde kipi kwallet lcms ldap libnotify libtirpc lightning lm-sensors lto mad matroska mng mp3 mp4 mpeg mtp multilib ncurses nls nptl offload ogg opencl opengl openmp pam pango pcre pdf pgo phonon plasma png policykit postproc ppds pulseaudio qml qt5 rar readline scanner sdl seccomp semantic-desktop spell split-usr ssl startup-notification svg sync-plugin-portage system-llvm systemd tcpd threads tiff truetype udev udisks unicode upower usb vaapi vc vdpau vorbis vpx vulkan wayland webp widgets wxwidgets x264 x265 xattr xcb xcomposite xml xv xvid zlib" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" CAMERAS="sony_dscf1" 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" 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" LLVM_TARGETS="AMDGPU" 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="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" RUBY_TARGETS="ruby24 ruby25" SANE_BACKENDS="hp" USERLAND="GNU" VIDEO_CARDS="amdgpu radeonsi 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, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

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

www-client/firefox-71.0::gentoo was built with the following:
USE="eme-free gmp-autoupdate hwaccel lto pgo pulseaudio startup-notification system-av1 system-harfbuzz system-icu system-jpeg system-libevent system-sqlite system-webp wayland -bindist -clang -custom-cflags -custom-optimization -debug -geckodriver -hardened -jack -screenshot (-selinux) -system-libvpx -test -wifi" ABI_X86="(64)" CPU_FLAGS_X86="avx2" L10N="de -ach -af -an -ar -ast -az -be -bg -bn -br -bs -ca -cak -cs -cy -da -dsb -el -en-CA -en-GB -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 -ia -id -is -it -ja -ka -kab -kk -km -kn -ko -lij -lt -lv -mk -mr -ms -my -nb -nl -nn -oc -pa -pl -pt-BR -pt-PT -rm -ro -ru -si -sk -sl -son -sq -sr -sv -ta -te -th -tr -uk -ur -uz -vi -xh -zh-CN -zh-TW"
CFLAGS="-march=native -pipe -Wl,-O1 -Wl,--as-needed"
CXXFLAGS="-march=native -pipe -Wl,-O1 -Wl,--as-needed -flifetime-dse=1"
FEATURES="assume-digests news sfperms unmerge-logs xattr binpkg-dostrip pid-sandbox multilib-strict parallel-fetch binpkg-docompress ipc-sandbox userpriv ebuild-locks candy config-protect-if-modified fail-clean preserve-libs protect-owned usersandbox unmerge-orphans fixlafiles strict network-sandbox merge-sync unknown-features-warn distlocks usersync sandbox userfetch binpkg-logs"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -march=native -pipe -Wl,-rpath=/usr/lib64/firefox,--enable-new-dtags -Wl,--compress-debug-sections=zlib"
Comment 1 Armitage 2019-12-03 11:41:57 UTC
Same problem here after compiling firefox-71.0.

Just in case it helps, in gdb I can see the following:

Thread 44 "IndexedDB #1" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffd6cff700 (LWP 4601)]
0x00007fffefafd70e in ?? () from /usr/lib64/firefox/libxul.so

I compiled Firefox with GCC 9.2.0. Just started to recompile with the debug use flag.
Comment 2 Søren Dalby Larsen 2019-12-03 12:27:55 UTC
I'm seeing this too with gcc 9.2.0/lto. It does run if compiled with clang (9.0) though.
Comment 3 Larry the Git Cow gentoo-dev 2019-12-03 12:49:06 UTC
The bug has been referenced in the following commit(s):

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

commit 22503797645e16dc5f82bf2233d1c7e5dc407c7e
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2019-12-03 12:48:47 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2019-12-03 12:48:47 +0000

    www-client/firefox: Disable PGO when GCC is used due to startup crash
    
    Bug: https://bugs.gentoo.org/701866
    Package-Manager: Portage-2.3.80, Repoman-2.3.19
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

 www-client/firefox/firefox-71.0.ebuild | 4 ++++
 1 file changed, 4 insertions(+)
Comment 4 Armitage 2019-12-03 14:50:43 UTC
(In reply to Søren Dalby Larsen from comment #2)
> I'm seeing this too with gcc 9.2.0/lto. It does run if compiled with clang
> (9.0) though.

Thanks, I'm recompiling to try it and confirm.
Comment 5 Tomasz Golinski 2019-12-03 17:15:36 UTC
Recompiled with USE=-pgo but it still segfaults.
Comment 6 Armitage 2019-12-03 19:00:54 UTC
I can confirm that the problem is solved after compiling with clang (enable clang use flag). I also kept the pgo and lto use flags enabled.

I know it's not the proper place to make that question but I need to ask: is it better to keep the clang use flag as permanent? Or in other words: is it better to compile firefox (in general, not for that specific version) with clang or with gcc? Thank you in advance and sorry for the inapropiate question.

PD: and also sorry for my bad english :P.
Comment 7 Thomas Deutschmann (RETIRED) gentoo-dev 2019-12-03 19:23:52 UTC
That's a question of faith: For me, GCC 9.x PGO support is currently superior to Clang. However, upstream picked Clang (and therefore Clang+PGO is tested upstream) because they have to support not just Linux and cannot upgrade GCC on their build cluster for some reason. So their Clang version is superior to their GCC version... :)
Comment 8 Armitage 2019-12-03 20:05:16 UTC
(In reply to Thomas Deutschmann from comment #7)
> That's a question of faith: For me, GCC 9.x PGO support is currently
> superior to Clang. However, upstream picked Clang (and therefore Clang+PGO
> is tested upstream) because they have to support not just Linux and cannot
> upgrade GCC on their build cluster for some reason. So their Clang version
> is superior to their GCC version... :)

Thank you for your quick and detailed answer :).

I also prefere GCC 9.x with PGO (which has a really good performance) because almost all my system (which includes the Firefox's dependencies) is built with GCC. So my conclusion is the same than a few months ago: I'll keep the GCC as my first option and Clang will be the second option, just in case that GCC fails.
Comment 9 Jory A. Pratt gentoo-dev 2019-12-04 00:14:43 UTC
*** Bug 701934 has been marked as a duplicate of this bug. ***
Comment 10 Sven B. 2019-12-04 07:42:08 UTC
(In reply to Tomasz Golinski from comment #5)
> Recompiled with USE=-pgo but it still segfaults.
Testing with -pgo +lto shows that 
lto is likely causes the problem, and pgo forces the usage of lto.

-lto works for me on gcc.
Comment 11 Yuri Sevatz 2019-12-04 09:45:02 UTC
Not sure if related but I'm getting an extremely similar startup error with what seems like: -clang -pgo -lto, though I do also have custom-cflags custom-optimization hwaccel

JavaScript error: resource://services-common/kinto-offline-client.js, line 603: Error: IndexedDB clear() The operation failed for reasons unrelated to the database itself and not covered by any other error code.
console.error: PushService: 
  stateChangeProcessEnqueue: Error transitioning state
  UnknownError
JavaScript error: resource://gre/modules/ExtensionUtils.jsm, line 0: Error: An unexpected error occurred

I'm also seeing some VERY odd behavior with addons unable to save settings whenever I try and edit certain preferences anytime after starting the browser, (downloadthemall preferences, specifically).  I'm sure there are more, as this seems like a pretty consistent line failing.

JavaScript error: resource://gre/modules/ExtensionUtils.jsm, line 0: Error: An unexpected error occurred

This whole thing was built with:

     Installed versions:  71.0^td(09:46:29 PM 12/03/2019)(custom-cflags custom-optimization gmp-autoupdate hwaccel pulseaudio screenshot startup-notification system-av1 system-harfbuzz system-icu system-jpeg system-libevent system-libvpx system-sqlite system-webp -bindist -clang -debug -eme-free -geckodriver -hardened -jack -lto -pgo -selinux -test -wayland -wifi CPU_FLAGS_ARM="-neon" CPU_FLAGS_X86="-avx2" L10N="-ach -af -an -ar -ast -az -be -bg -bn -br -bs -ca -cak -cs -cy -da -de -dsb -el -en-CA -en-GB -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 -ia -id -is -it -ja -ka -kab -kk -km -kn -ko -lij -lt -lv -mk -mr -ms -my -nb -nl -nn -oc -pa -pl -pt-BR -pt-PT -rm -ro -ru -si -sk -sl -son -sq -sr -sv -ta -te -th -tr -uk -ur -uz -vi -xh -zh-CN -zh-TW")

I'm retrying with clang to see if it improves significantly.
Comment 12 Yuri Sevatz 2019-12-04 10:16:25 UTC
Update: Rebuilding my previous firefox-71.0 with clang fixed all issues, and I was able to maintain all my previous flags.

It seems -lto -pgo wasn't enough for gcc-9.2.0 if additional problems had occurred?
Comment 13 klaus818 2019-12-04 10:27:16 UTC
-lto and -pgo is enough fpr gcc-9.2.0. With this flags I can build it without problems and it run without problems.
Comment 14 Armitage 2019-12-04 14:58:03 UTC
(In reply to JetDog from comment #12)
> Update: Rebuilding my previous firefox-71.0 with clang fixed all issues, and
> I was able to maintain all my previous flags.
> 
> It seems -lto -pgo wasn't enough for gcc-9.2.0 if additional problems had
> occurred?

Not sure, but I think that your problems could be related with the custom-cflags and custom-optimization use flags. Those use flags are a kind of "critical" since nobody will test your custom cflags and your custom optimizations but you. So it isn't recommended to enable the custom-cflags and custom-optimization use flags.

In order to confirm if that's the case, you could try to recompile with -custom-cflags -custom-optimization -clang -lto -pgo and see what happens.
Comment 15 poncho 2019-12-04 15:18:40 UTC
> I'm also seeing some VERY odd behavior with addons unable to save settings
> whenever I try and edit certain preferences anytime after starting the
> browser, (downloadthemall preferences, specifically).  I'm sure there are
> more, as this seems like a pretty consistent line failing.
> 
> JavaScript error: resource://gre/modules/ExtensionUtils.jsm, line 0: Error:
> An unexpected error occurred

Addons were broken for me when compiling with gcc-9.2.0
After enabling USE=clang (and changing nothing else) the addons were working again.

www-client/firefox-71.0::gentoo was built with the following:
USE="clang gmp-autoupdate pulseaudio screenshot startup-notification system-av1 system-harfbuzz system-icu system-jpeg system-libevent system-sqlite system-webp -bindist -custom-cflags -custom-optimization -debug -eme-free -geckodriver -hardened -hwaccel -jack -lto -pgo (-selinux) -system-libvpx -test -wayland -wifi" ABI_X86="(64)" CPU_FLAGS_X86="avx2"
Comment 16 klaus818 2019-12-04 15:59:29 UTC
For me only every vpn-addon was broken. All other addons works without problems. And this is the same under windows. So I don't think, that I can solve this problem with changing the compiler, but I try.
Comment 17 klaus818 2019-12-04 17:25:38 UTC
I rebuild firefox with clang. pgo and lto is working. But the same with my vpn-addons.
Comment 18 Maciej S. Szmigiero 2019-12-04 21:51:39 UTC
I have also hit this bug with sys-devel/gcc-9.2.0-r2 and USE="lto -clang -pgo",
with FF segfaulting at startup.

It is able to start successfully when rebuilt without the "lto" USE flag set.
Comment 19 Yuri Sevatz 2019-12-04 22:53:06 UTC
Same error occurs with -lto -pgo -custom-cflags -custom-optimization:

     Installed versions:  71.0^td(05:47:04 PM 12/04/2019)(gmp-autoupdate hwaccel pulseaudio screenshot startup-notification system-av1 system-harfbuzz system-icu system-jpeg system-libevent system-libvpx system-sqlite system-webp -bindist -clang -custom-cflags -custom-optimization -debug -eme-free -geckodriver -hardened -jack -lto -pgo -selinux -test -wayland -wifi CPU_FLAGS_ARM="-neon" CPU_FLAGS_X86="avx2" L10N="-ach -af -an -ar -ast -az -be -bg -bn -br -bs -ca -cak -cs -cy -da -de -dsb -el -en-CA -en-GB -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 -ia -id -is -it -ja -ka -kab -kk -km -kn -ko -lij -lt -lv -mk -mr -ms -my -nb -nl -nn -oc -pa -pl -pt-BR -pt-PT -rm -ro -ru -si -sk -sl -son -sq -sr -sv -ta -te -th -tr -uk -ur -uz -vi -xh -zh-CN -zh-TW")


console.error: PushService: 
  stateChangeProcessEnqueue: Error transitioning state
  UnknownError
Log warning: The log 'Services.Common.RESTRequest' is configured to use the preference 'services.common.log.logger.rest.request' - you must adjust the level by setting this preference, not by using the level setter
JavaScript error: resource://gre/modules/ExtensionUtils.jsm, line 0: Error: An unexpected error occurred
JavaScript error: resource://gre/modules/ExtensionUtils.jsm, line 0: Error: An unexpected error occurred

Attempting to edit Preferences in "DownloadThemAll" extension results in:

JavaScript error: resource://gre/modules/ExtensionUtils.jsm, line 0: Error: An unexpected error occurred

"DownloadThemALl" preferences do not appear as last set by the user, after re-opening its preferences.

It seems like we have a legit gcc 9.2.0 bug?  Only remaining thing I have enabled here that i don't think I have on by default is hwaccel.

We may have to make a recommendation for people to switch to USE="clang" in the meantime.
Comment 20 Yuri Sevatz 2019-12-04 23:21:02 UTC
I'm also seeing that I can't save new greasemonkey scripts with the GCC variant when using the same use flags from my previous comment.

Something really screwy is going on with firefox-71.0 and GCC.
Comment 21 tt_1 2019-12-06 18:36:37 UTC
It might be this one you're all hitting?  
https://bugzilla.mozilla.org/show_bug.cgi?id=1601707

there's also a gcc bug mentioned in the comments
Comment 22 Thomas Deutschmann (RETIRED) gentoo-dev 2019-12-06 19:12:35 UTC
Yes, that's the issue. Thank you for sharing.
Comment 23 tt_1 2019-12-06 21:30:59 UTC
The patch got commited to trunk in the meantime, it applies cleanly on top of gcc-9.2.0-r2. That might be worth a shot to test if it fixes the problem? I can't help that much, as I'm still bound to esr. 

Also clang-6 seems affected.
Comment 24 Jory A. Pratt gentoo-dev 2019-12-07 00:32:59 UTC
Created attachment 598778 [details, diff]
upstream patch to fix part 1 non addon corrections.

If someone feels like testing and giving their feedback would be appreciated. I have recompiled with the attached patch and javascript errors are gone except for addons.
Comment 25 Jana Saout 2019-12-08 09:00:25 UTC
(In reply to tt_1 from comment #23)
> The patch got commited to trunk in the meantime, it applies cleanly on top
> of gcc-9.2.0-r2. That might be worth a shot to test if it fixes the problem?

It applies cleanly, but then doesn't compile. The fixed the error not able to find build_local_temp by making it visible from tree.c.

However, after rebuilding Firefox I was disappointed to see that the crash persisted. :(
Comment 26 Jana Saout 2019-12-08 10:45:49 UTC
PS: Ok, I guess I'm experiencing a different crash because neither of these patches solve the issue. Please disregard my previous comment then.
Comment 27 زياد بن عبدالعزيز الباتلي 2019-12-08 15:12:27 UTC
(In reply to Jory A. Pratt from comment #24)
> Created attachment 598778 [details, diff] [details, diff]
> upstream patch to fix part 1 non addon corrections.
> 
> If someone feels like testing and giving their feedback would be
> appreciated. I have recompiled with the attached patch and javascript errors
> are gone except for addons.

It works for me (USE="-clang custom-cflags custom-optimization lto pgo").  Without this patch I couldn’t emerge www-client/firefox-71.0 using GCC 9.2.

Also, I managed to emerge Firefox using CLang (USE="clang custom-cflags custom-optimization lto pgo").

I tried to use GCC without this patch without any luck.  Tried "-clang -lot -pgo", and "-clang -custom-cflags -custom-optimization -lto -pgo".  Either it won’t emerge (in the case of USE="-clang pgo lto"), or it will emerge successfully but will SIGFAULT every time I try to run it).

In both cases (using CLang and using GCC with this patch) all my add-ons are working as expected (uMatrix, Stylus, Old Reddit Redirect, disable-polymer-youtube, PwdHash2, and Greasemonkey) with a slight note that I lost all Greasemonkey scripts that were installed;  but managed to restore them from a backup (Greasemonkey_backup_2019MMDD_HHmmss.zip) and it works like it should be.

My system is stable with a few packages in package.accept_keywords:
  -mostly multimedia (ffmpeg, mpv, dav1d)
  -net-misc/youtube-dl
  -xfce-*/*
  -media-fonts/*

Hope this helps.

Thanks.
Ziyad.
Comment 28 Larry the Git Cow gentoo-dev 2019-12-09 23:52:19 UTC
The bug has been closed via the following commit(s):

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

commit c40cc87ed9378492d84a2c6c5e45fa3d399ba7a2
Author:     Jory Pratt <anarchy@gentoo.org>
AuthorDate: 2019-12-09 23:51:50 +0000
Commit:     Jory Pratt <anarchy@gentoo.org>
CommitDate: 2019-12-09 23:52:11 +0000

    www-client/firefox: Fix segfault with gcc lto builds
    
    Closes: https://bugs.gentoo.org/show_bug.cgi?id=701866
    Package-Manager: Portage-2.3.81, Repoman-2.3.20
    Signed-off-by: Jory Pratt <anarchy@gentoo.org>

 .../files/mozilla-bug1601707-gcc-fixup.patch       | 114 +++++++++++++++++++++
 www-client/firefox/firefox-71.0.ebuild             |   1 +
 2 files changed, 115 insertions(+)
Comment 29 Larry the Git Cow gentoo-dev 2019-12-10 00:00:53 UTC
The bug has been referenced in the following commit(s):

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

commit 089f2a1adee4dbc672b3a9295978efcef8b9d98e
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2019-12-10 00:00:35 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2019-12-10 00:00:35 +0000

    www-client/firefox: re-enable PGO
    
    Bug: https://bugs.gentoo.org/701866
    Package-Manager: Portage-2.3.81, Repoman-2.3.20
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

 www-client/firefox/firefox-71.0.ebuild | 4 ----
 1 file changed, 4 deletions(-)
Comment 30 Thomas Deutschmann (RETIRED) gentoo-dev 2019-12-10 11:48:54 UTC
*** Bug 702418 has been marked as a duplicate of this bug. ***
Comment 31 Larry the Git Cow gentoo-dev 2019-12-16 19:24:34 UTC
The bug has been referenced in the following commit(s):

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

commit 16cba686662653bf738d51935c4acc3370cd35df
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2019-12-16 19:24:07 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2019-12-16 19:24:25 +0000

    www-client/firefox: rev bump to force rebuild
    
    Rebuild is required to fix firefox for everyone using GCC
    who didn't notice yet that firefox wasn't properly working.
    
    Bug: https://bugs.gentoo.org/701866
    Package-Manager: Portage-2.3.81, Repoman-2.3.20
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

 www-client/firefox/{firefox-71.0.ebuild => firefox-71.0-r1.ebuild} | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
Comment 32 tt_1 2019-12-21 11:11:41 UTC
there's now a backport available for gcc-9 in pr92831
Comment 33 Larry the Git Cow gentoo-dev 2019-12-22 00:06:34 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=ba1c1c9ab955b533393e343bdfd8a0e7d7650639

commit ba1c1c9ab955b533393e343bdfd8a0e7d7650639
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2019-12-22 00:04:55 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2019-12-22 00:04:55 +0000

    9.2.0: backport PR92831 (':?' lifetime extension)
    
    It's a backport of upstream commit 59693b226e245aeb99.
    
    Bug: https://gcc.gnu.org/PR92831
    Bug: https://bugs.gentoo.org/701866
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 9.2.0/gentoo/33_all_extend-lifetime.patch | 240 ++++++++++++++++++++++++++++++
 9.2.0/gentoo/README.history               |   1 +
 2 files changed, 241 insertions(+)
Comment 34 Larry the Git Cow gentoo-dev 2019-12-22 11:11:17 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=35beff919bc59076c5c1aa549e04d8119c559261

commit 35beff919bc59076c5c1aa549e04d8119c559261
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2019-12-22 11:07:00 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2019-12-22 11:07:00 +0000

    9.2.0: cut 4 patchset
    
    4 new patches:
    - 27_all_sparc-PIC-constant-PR91472.patch: fix PIC register alocation
      (bug detected by gmp test suite)
    - 31_all_openmp-for-SEGV.patch: fix opemnmp for loop condition folding
    - 32_all_sparc-PIC-constant-part2.patch: fix PIC register allocation
      (bug detected by python regressin)
    - 33_all_extend-lifetime.patch: fix lifetime extension on ':?' operator
      (bug detected by firefox LTO build
    
    Bug: https://gcc.gnu.org/PR91472
    Bug: https://bugs.gentoo.org/699938
    Bug: https://gcc.gnu.org/PR92504
    Bug: https://bugs.gentoo.org/697708
    Bug: https://gcc.gnu.org/PR92095
    Bug: https://bugs.gentoo.org/701866
    Bug: https://gcc.gnu.org/PR92831
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 9.2.0/gentoo/README.history | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 35 Larry the Git Cow gentoo-dev 2019-12-22 11:28:42 UTC
The bug has been referenced in the following commit(s):

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

commit 649ef16ea81488d36fae3fa4a8881c9e665d2e7a
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2019-12-22 11:24:45 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2019-12-22 11:28:34 +0000

    sys-devel/gcc: 9.2.0: cut 4 patchset
    
    4 new patches:
    - 27_all_sparc-PIC-constant-PR91472.patch: fix PIC register alocation
      (bug detected by gmp test suite)
    - 31_all_openmp-for-SEGV.patch: fix opemnmp for loop condition folding
    - 32_all_sparc-PIC-constant-part2.patch: fix PIC register allocation
      (bug detected by python regressin)
    - 33_all_extend-lifetime.patch: fix lifetime extension on ':?' operator
      (bug detected by firefox LTO build
    
    Bug: https://gcc.gnu.org/PR91472
    Bug: https://bugs.gentoo.org/699938
    Bug: https://gcc.gnu.org/PR92504
    Bug: https://bugs.gentoo.org/697708
    Bug: https://gcc.gnu.org/PR92095
    Bug: https://bugs.gentoo.org/701866
    Bug: https://gcc.gnu.org/PR92831
    Package-Manager: Portage-2.3.82, Repoman-2.3.20
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 sys-devel/gcc/Manifest            |  1 +
 sys-devel/gcc/gcc-9.2.0-r3.ebuild | 19 +++++++++++++++++++
 2 files changed, 20 insertions(+)
Comment 36 Sergei Trofimovich (RETIRED) gentoo-dev 2019-12-22 11:31:01 UTC
Should be fixed in gcc-9.2.0-r3 as well.