Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 904354 - www-client/firefox-112.0[pgo]: fails to install (error: $SRCDIR/browser/installer/package-manifest.in:48: Missing file(s))
Summary: www-client/firefox-112.0[pgo]: fails to install (error: $SRCDIR/browser/insta...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-04-15 07:17 UTC by Michael Mair-Keimberger (iamnr3)
Modified: 2023-08-01 10:04 UTC (History)
1 user (show)

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


Attachments
firefox-112.build.log (firefox-build.log.xz,370.92 KB, application/x-xz)
2023-04-15 07:17 UTC, Michael Mair-Keimberger (iamnr3)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Mair-Keimberger (iamnr3) 2023-04-15 07:17:34 UTC
Created attachment 860117 [details]
firefox-112.build.log

Hi, 

I'm unable to install the latest firefox. It seems like it fails in the install phase (src_install), however the compilation is also much fast than usual (firefox-111.0 took around 28 Minutes to compile - 112 wanted to install already after 3-4 Minutes).
I've attached the full build.log


emerge --info:
Portage 3.0.46 (python 3.10.11-final-0, default/linux/amd64/17.1, gcc-12, glibc-2.37-r2, 6.2.11-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-6.2.11-gentoo-x86_64-AMD_Ryzen_9_7950X3D_16-Core_Processor-with-glibc2.37
KiB Mem:    64963360 total,  44820276 free
KiB Swap:   16777212 total,  16777212 free
Timestamp of repository gentoo: Fri, 14 Apr 2023 21:16:54 +0000
Head commit of repository gentoo: e70220cef0929f6ae25a9eae33ace588eee81f00

Timestamp of repository guru: Fri, 14 Apr 2023 17:46:49 +0000
Head commit of repository guru: aa5a954d2109f8912bd626de58a1e4d30061f791

Head commit of repository local: ab0349d4349e86c0fb4fc1821da2f5f012b6de42

Timestamp of repository steam-overlay: Sun, 02 Apr 2023 01:01:55 +0000
Head commit of repository steam-overlay: d24ddd3db84f894a52a2fdfd55a26ca822420081

sh bash 5.2_p15-r2
ld GNU ld (Gentoo 2.40 p4) 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.0-r2::gentoo
dev-lang/python:           3.10.11::gentoo, 3.11.3::gentoo
dev-lang/rust:             1.68.2::gentoo
dev-util/cmake:            3.26.3::gentoo
dev-util/meson:            1.0.1::gentoo
sys-apps/baselayout:       2.13-r1::gentoo
sys-apps/openrc:           0.46::gentoo
sys-apps/sandbox:          2.30-r1::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-r4::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           15.0.7-r1::gentoo, 16.0.1::gentoo
sys-devel/gcc:             12.2.1_p20230304::gentoo
sys-devel/gcc-config:      2.10::gentoo
sys-devel/libtool:         2.4.7-r1::gentoo
sys-devel/lld:             15.0.7::gentoo, 16.0.1::gentoo
sys-devel/llvm:            15.0.7::gentoo, 16.0.1::gentoo
sys-devel/make:            4.4.1::gentoo
sys-kernel/linux-headers:  6.2::gentoo (virtual/os-headers)
sys-libs/glibc:            2.37-r2::gentoo
Repositories:

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

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

local
    location: /var/db/repos/local
    sync-type: git
    sync-uri: git://s2/local.git
    masters: gentoo
    volatile: False

steam-overlay
    location: /var/db/repos/steam-overlay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/steam-overlay.git
    masters: gentoo
    volatile: False

Installed sets: @g_base, @g_base_openrc, @g_base_tools, @g_dev_tools, @x2
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=znver4 -mshstk --param=l1-cache-line-size=64 --param=l1-cache-size=32 --param=l2-cache-size=1024"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/openldap/ldap.conf /etc/ssh/sshd_config /etc/sssd/sssd.conf /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="-O2 -pipe -march=znver4 -mshstk --param=l1-cache-line-size=64 --param=l1-cache-size=32 --param=l2-cache-size=1024"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--oneshot --jobs=4 --with-bdeps=y --keep-going"
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 -march=znver4 -mshstk --param=l1-cache-line-size=64 --param=l1-cache-size=32 --param=l2-cache-size=1024"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch parallel-install pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms sign strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe -march=znver4 -mshstk --param=l1-cache-line-size=64 --param=l1-cache-size=32 --param=l2-cache-size=1024"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LEX="flex"
LINGUAS="en"
MAKEOPTS="-j32"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--info=progress2,name0,del0"
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"
SHELL="/bin/bash"
USE="acl alsa amd64 bzip2 cli crypt dbus dri elogind flac fortran gdbm iconv ipv6 jpeg libglvnd libtirpc lto mp3 multilib ncurses nls nptl opengl openmp pam pcre pgo pipewire png readline sdl seccomp split-usr ssl svg test-rust threads tiff udev unicode vim-syntax vulkan wayland webp xattr xml zlib zstd" ABI_X86="64" ADA_TARGET="gnat_2021" 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="mmx mmxext sse sse2 aes avx avx2 avx512bw avx512cd avx512dq avx512f avx512vbmi avx512vl f16c fma3 pclmul popcnt rdrand sha 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" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en" 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_10" PYTHON_TARGETS="python3_10" RUBY_TARGETS="ruby30" USERLAND="GNU" VIDEO_CARDS="radeon amdgpu radeonsi" 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, LC_ALL, LD, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS

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

www-client/firefox-111.0::gentoo was built with the following:
USE="clang dbus gmp-autoupdate lto openh264 pgo system-av1 system-harfbuzz system-icu system-jpeg system-libevent system-libvpx system-webp wayland -X -debug -eme-free -geckodriver -hardened -hwaccel -jack -libproxy -pulseaudio -screencast (-selinux) -sndio -system-png (-system-python-libs) -wifi" ABI_X86="(64)" L10N="-ach -af -an -ar -ast -az -be -bg -bn -br -bs -ca -ca-valencia -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 -fur -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 -ne -nl -nn -oc -pa -pl -pt-BR -pt-PT -rm -ro -ru -sc -sco -si -sk -sl -son -sq -sr -sv -szl -ta -te -th -tl -tr -trs -uk -ur -uz -vi -xh -zh-CN -zh-TW"
CFLAGS="-pipe -mshstk"
CXXFLAGS="-pipe -mshstk"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--compress-debug-sections=zlib -Wl,-rpath=/usr/lib64/firefox,--enable-new-dtags"
Comment 1 tt_1 2023-04-15 10:33:23 UTC
it might be unhappy about missing L10N
Comment 2 Michael Mair-Keimberger (iamnr3) 2023-04-15 18:30:31 UTC
(In reply to tt_1 from comment #1)
> it might be unhappy about missing L10N

Thanks for the hint. I've added en-GB now but unfortunately it still fails the same.
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-04-16 07:06:27 UTC
[34m 7:51.03(B[m gmake[1]: Leaving directory '/var/tmp/portage/www-client/firefox-112.0/work/firefox_build/instrumented/browser/installer'(B[m(B[m
[34m 7:51.03(B[m gmake: Leaving directory '/var/tmp/portage/www-client/firefox-112.0/work/firefox_build/instrumented'(B[m(B[m
00:07:51.613 [1;90m[types/wlr_compositor.c:673] New wlr_surface 0x55ac5299cae0 (res 0x55ac5299ce40)[0m
00:07:51.613 [1;90m[types/wlr_compositor.c:673] New wlr_surface 0x55ac5299cf60 (res 0x55ac5299d2c0)[0m
console.warn: services.settings: Ignoring preference override of remote settings server
console.warn: services.settings: Allow by setting MOZ_REMOTE_SETTINGS_DEVTOOLS=1 in the environment
00:07:51.858 [1;90m[types/wlr_compositor.c:673] New wlr_surface 0x55ac5299d590 (res 0x55ac5299d8f0)[0m
00:07:51.858 [1;90m[types/wlr_compositor.c:673] New wlr_surface 0x55ac5299d8f0 (res 0x55ac5299dc50)[0m
00:07:51.925 [1;90m[types/wlr_compositor.c:673] New wlr_surface 0x55ac5299e1c0 (res 0x55ac5299e520)[0m
00:07:52.089 [1;90m[types/wlr_compositor.c:673] New wlr_surface 0x55ac5299f650 (res 0x55ac5299f9b0)[0m
00:07:52.089 [1;90m[types/wlr_compositor.c:673] New wlr_surface 0x55ac529a5660 (res 0x55ac5299fa40)[0m
00:07:52.123 [1;90m[types/wlr_compositor.c:673] New wlr_surface 0x55ac529a59c0 (res 0x55ac5299fad0)[0m
00:07:52.123 [1;90m[types/wlr_compositor.c:673] New wlr_surface 0x55ac529a5d20 (res 0x55ac5299e520)[0m
00:07:52.132 [1;90m[types/wlr_compositor.c:673] New wlr_surface 0x55ac529aad10 (res 0x55ac529ab070)[0m
00:07:52.132 [1;90m[types/wlr_compositor.c:673] New wlr_surface 0x55ac529ab190 (res 0x55ac529ab4f0)[0m
00:07:52.148 [1;90m[types/wlr_compositor.c:673] New wlr_surface 0x55ac529ab580 (res 0x55ac529ab8e0)[0m
Exiting due to channel error.
Exiting due to channel error.
Firefox exited with code -11 during profile initialization
Error running mach:

    ['build', '--verbose']

The error occurred in code that was called by the mach command. This is either
a bug in the called code itself or in the way that mach is calling it.
You can invoke ``./mach busted`` to check if this issue is already on file. If it
isn't, please use ``./mach busted file build`` to report it. If ``./mach busted`` is
misbehaving, you can also inspect the dependencies of bug 1543241.

If filing a bug, please include the full output of mach, including this error
message.

The details of the failure are as follows:

subprocess.CalledProcessError: Command '['/var/tmp/portage/www-client/firefox-112.0/work/firefox_build/_virtualenvs/build/bin/python', '/var/tmp/portage/www-client/firefox-112.0/work/firefox-112.0/build/pgo/profileserver.py']' returned non-zero exit status 245.

  File "/var/tmp/portage/www-client/firefox-112.0/work/firefox-112.0/python/mozbuild/mozbuild/build_commands.py", line 215, in build
    subprocess.check_call(pgo_cmd, cwd=instr.topobjdir, env=pgo_env)
  File "/usr/lib/python3.11/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
>>> Source compiled.
Comment 4 Michael Mair-Keimberger (iamnr3) 2023-04-16 09:02:00 UTC
Thanks sam for the update.
I've checked the other bug. It seems to be the same problem, but unfortunately the problem still persist for me. 

For the record. I'm using gui-wm/sway here as my window manager, which get started via gui-apps/tuigreet. It starts a script which looks like this:


#!/bin/sh

export MOZ_ENABLE_WAYLAND=1
exec dbus-run-session sway >> /dev/null 2>&1



I'm wondering if i might miss some env variables. I've checked with the settings from the other bug and tried to set following (as they were empty for me):
export XDG_CURRENT_DESKTOP=sway
export XDG_SESSION_DESKTOP=sway
export SDL_VIDEODRIVER=wayland

So far without any luck.
Comment 5 Joonas Niilola gentoo-dev 2023-04-18 05:28:21 UTC
I know this sounds dumb, but could you reboot and immediately try compiling firefox again? I can't see any other reason except the graphical session somehow not interacting with the pgo build process. Although it could be the virtwl() function, it could also be sway. 

I guess I'll need a wayland-only VM to test this.
Comment 6 Joonas Niilola gentoo-dev 2023-04-18 05:50:47 UTC
https://bugzilla.mozilla.org/show_bug.cgi?id=1551279 maybe something in here proves helpful? Maybe https://hg.mozilla.org/mozilla-central/rev/1068e0955cfb does something? You can wget it from https://hg.mozilla.org/mozilla-central/raw-rev/1068e0955cfb and place under /etc/portage/patches. You could also try to remove the --enable-system-pixman line from our src_configure to see if that helps?
Comment 7 Joonas Niilola gentoo-dev 2023-04-18 06:09:13 UTC
^ I'll include that patch for 112.0.1, doing test runs now. Will push in few hours if everything goes okay.
Comment 8 Larry the Git Cow gentoo-dev 2023-04-18 08:35:34 UTC
The bug has been referenced in the following commit(s):

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

commit 2c053bbe89752d9418b27f28eeb0e22eaa946db0
Author:     Joonas Niilola <juippis@gentoo.org>
AuthorDate: 2023-04-18 08:35:12 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2023-04-18 08:35:12 +0000

    www-client/firefox: add 112.0.1
    
    Bug: https://bugs.gentoo.org/904354
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 www-client/firefox/Manifest               |  101 +++
 www-client/firefox/firefox-112.0.1.ebuild | 1379 +++++++++++++++++++++++++++++
 2 files changed, 1480 insertions(+)
Comment 9 Michael Mair-Keimberger (iamnr3) 2023-04-18 16:40:10 UTC
Hi Joonas,

thanks for the update. Unfortunately no changes for me yet. I even rebooted the system again to have a freshly booted system.

The error still looks pretty much the same:
00:08:01.167 [types/wlr_compositor.c:673] New wlr_surface 0x5626568cea90 (res 0x5626568cedf0)
00:08:01.167 [types/wlr_compositor.c:673] New wlr_surface 0x5626568cef10 (res 0x5626568cf270)
console.warn: services.settings: Ignoring preference override of remote settings server
console.warn: services.settings: Allow by setting MOZ_REMOTE_SETTINGS_DEVTOOLS=1 in the environment
00:08:01.406 [types/wlr_compositor.c:673] New wlr_surface 0x5626568cf540 (res 0x5626568cf8a0)
00:08:01.406 [types/wlr_compositor.c:673] New wlr_surface 0x5626568cf8a0 (res 0x5626568cfc00)
00:08:01.472 [types/wlr_compositor.c:673] New wlr_surface 0x5626568d00e0 (res 0x5626568d0440)
00:08:01.624 [types/wlr_compositor.c:673] New wlr_surface 0x5626568d1400 (res 0x5626568d1760)
00:08:01.624 [types/wlr_compositor.c:673] New wlr_surface 0x5626568d1880 (res 0x5626568d1be0)
00:08:01.653 [types/wlr_compositor.c:673] New wlr_surface 0x5626568d76b0 (res 0x5626568d07e0)
00:08:01.653 [types/wlr_compositor.c:673] New wlr_surface 0x5626568d7a10 (res 0x5626568d0440)
00:08:01.662 [types/wlr_compositor.c:673] New wlr_surface 0x5626568dcc40 (res 0x5626568dcfa0)
00:08:01.662 [types/wlr_compositor.c:673] New wlr_surface 0x5626568dd0c0 (res 0x5626568dd420)
00:08:01.667 [types/wlr_compositor.c:673] New wlr_surface 0x5626568dd4b0 (res 0x5626568dd810)
Exiting due to channel error.
Exiting due to channel error.
Firefox exited with code -11 during profile initialization
Error running mach:

    ['build', '--verbose']

The error occurred in code that was called by the mach command. This is either
a bug in the called code itself or in the way that mach is calling it.
You can invoke ``./mach busted`` to check if this issue is already on file. If it
isn't, please use ``./mach busted file build`` to report it. If ``./mach busted`` is
misbehaving, you can also inspect the dependencies of bug 1543241.

If filing a bug, please include the full output of mach, including this error
message.

The details of the failure are as follows:

subprocess.CalledProcessError: Command '['/var/tmp/portage/www-client/firefox-112.0.1/work/firefox_build/_virtualenvs/build/bin/python', '/var/tmp/portage/www-client/firefox-112.0.1/work/firefox-112.0.1/build/pgo/profileserver.py']' returned non-zero exit status 245
Comment 10 Michael Mair-Keimberger (iamnr3) 2023-04-18 19:11:19 UTC
FYI: Forgot to test to build firefox with --enable-system-pixman removed from the ebuild. However, still the same issue.
Comment 11 Michael Mair-Keimberger (iamnr3) 2023-04-18 19:46:09 UTC
Some more information:
I've now tried to rebuild firefox-111.0. (restored the ebuild and put it into my overlay). Firefox 111.0 fails now too.
So maybe this is more related to some dependencies?
Comment 12 Joonas Niilola gentoo-dev 2023-04-19 05:33:16 UTC
Right, anything in dmesg? Has your graphical drivers crashed for example (although shouldn't happen after a fresh reboot?)

Other than that really no clue. You should report it upstream, build.log all the way to that crash is relevant (your post in #c9). The src_install failure is irrelevant because that's an error in the ebuild. Please also link the upstream bug so when resolved we can resolve that in Gentoo too.
Comment 13 Michael Mair-Keimberger (iamnr3) 2023-04-21 15:00:47 UTC
Thanks Joonas for the help.
I've checked dmesg for some errors. The only error i could find which could be related was:
[   51.311040] gldriverquery[6852]: segfault at 0 ip 0000000000000000 sp 00007ffc180d9fd8 error 14 in gldriverquery[560b73800000+14000] likely on CPU 31 (core 15, socket 0)
This comes basically right after logging. However as far as I can see it doesn't happen every boot and last time i tried to compile firefox it didn't happen. I've also haven't seen any other problems because of that..

I can make an upstream bug, just to be sure, with upstream you mean firefox upstream?
Comment 14 Alex Xu (Hello71) 2023-04-21 17:28:13 UTC
So, there's two problems here:

1. instrumented firefox crashes in Servo_AuthorStyles_Flush trying to write to libxul.so .rodata. I'm still investigating this issue.

2. virtwl has a bug, it doesn't propagate the return code. for this issue, please apply this patch:

diff --git a/www-client/firefox/firefox-112.0.1.ebuild b/www-client/firefox/firefox-112.0.1.ebuild
index cea794ea0bc6..ea69370898b5 100644
--- a/www-client/firefox/firefox-112.0.1.ebuild
+++ b/www-client/firefox/firefox-112.0.1.ebuild
@@ -460,9 +460,11 @@ virtwl() {
 
        debug-print "${FUNCNAME}: $@"
        "$@"
+       local r=$?
 
        [[ -n $VIRTWL_PID ]] || die "tinywl exited unexpectedly"
        exec {VIRTWL[0]}<&- {VIRTWL[1]}>&-
+       return $r
 }
 
 pkg_pretend() {
Comment 15 Michael Mair-Keimberger (iamnr3) 2023-04-22 16:00:32 UTC
(In reply to Alex Xu (Hello71) from comment #14)
> So, there's two problems here:
> 
> 1. instrumented firefox crashes in Servo_AuthorStyles_Flush trying to write
> to libxul.so .rodata. I'm still investigating this issue.
> 
> 2. virtwl has a bug, it doesn't propagate the return code. for this issue,
> please apply this patch:
> 
> diff --git a/www-client/firefox/firefox-112.0.1.ebuild
> b/www-client/firefox/firefox-112.0.1.ebuild
> index cea794ea0bc6..ea69370898b5 100644
> --- a/www-client/firefox/firefox-112.0.1.ebuild
> +++ b/www-client/firefox/firefox-112.0.1.ebuild
> @@ -460,9 +460,11 @@ virtwl() {
>  
>         debug-print "${FUNCNAME}: $@"
>         "$@"
> +       local r=$?
>  
>         [[ -n $VIRTWL_PID ]] || die "tinywl exited unexpectedly"
>         exec {VIRTWL[0]}<&- {VIRTWL[1]}>&-
> +       return $r
>  }
>  
>  pkg_pretend() {

Hello Alex,
Thanks for investigating. 
I've patched the ebuild as mentioned and tried to build firefox again. However, still no luck with the same error. But i guess in order to get it built the crashes in Servo_AuthorStyles_Flush must be fixed too.

Anything i can do to help?
Comment 16 Larry the Git Cow gentoo-dev 2023-04-23 14:20:47 UTC
The bug has been referenced in the following commit(s):

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

commit 6df3faf82239bb42832e1057188b5204be986415
Author:     Joonas Niilola <juippis@gentoo.org>
AuthorDate: 2023-04-23 14:10:31 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2023-04-23 14:20:14 +0000

    www-client/firefox: bug fixes for 112.0.1
    
     - add error-state returning to virtwl(),
     - allow disabling telemetry via an USE flag,
     - include an upstream patch to fix weird bitmap font behaviour
       (upstream bug #1827950).
    
    Bug: https://bugs.gentoo.org/904354
    Closes: https://bugs.gentoo.org/904756
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 www-client/firefox/Manifest               |  2 +-
 www-client/firefox/firefox-112.0.1.ebuild | 17 ++++++++++++++---
 2 files changed, 15 insertions(+), 4 deletions(-)
Comment 17 Michael Mair-Keimberger (iamnr3) 2023-04-25 17:31:03 UTC
Minor update:
Firefox still fails for me the same as before (last tried just a few minutes ago).
In the meantime i've also build firefox with pgo disabled. This works so far. pgo however is still broken.
Comment 18 Alex Xu (Hello71) 2023-04-27 11:49:54 UTC
iamnr3, I wasn't clear, but I meant for juippis to apply the patch, not you. it doesn't fix the build, it just makes it stop in src_compile instead of falling through to src_install.

Unfortunately, I haven't had time to debug the crash, and don't think I'll have time in the next few days, but the summary is that it can be reproduced by:

1. emerge firefox
2. tinywl &
3. (. /tmp/portage/www-client/firefox-112.0.1/temp/environment; gdb /tmp/portage/www-client/firefox-112.0.1/work/firefox_build/instrumented/dist/bin/firefox)

it segfaults in Servo_AuthorStyles_Flush trying to write to libxul.so .rodata. I couldn't identify the cause from the disassembly due to aggressive LLVM inlining, and I didn't have time/space yet to rebuild it with debug symbols (it uses a lot more RAM and disk). based on the short bug CC list, it seems like other users may not be encountering this, so I suspect it may be related to some specific configuration of rust, clang, etc.
Comment 19 Michael Mair-Keimberger (iamnr3) 2023-04-27 17:29:32 UTC
(In reply to Alex Xu (Hello71) from comment #18)
> iamnr3, I wasn't clear, but I meant for juippis to apply the patch, not you.
> it doesn't fix the build, it just makes it stop in src_compile instead of
> falling through to src_install.
> 
> Unfortunately, I haven't had time to debug the crash, and don't think I'll
> have time in the next few days, but the summary is that it can be reproduced
> by:
> 
> 1. emerge firefox
> 2. tinywl &
> 3. (. /tmp/portage/www-client/firefox-112.0.1/temp/environment; gdb
> /tmp/portage/www-client/firefox-112.0.1/work/firefox_build/instrumented/dist/
> bin/firefox)
> 
> it segfaults in Servo_AuthorStyles_Flush trying to write to libxul.so
> .rodata. I couldn't identify the cause from the disassembly due to
> aggressive LLVM inlining, and I didn't have time/space yet to rebuild it
> with debug symbols (it uses a lot more RAM and disk). based on the short bug
> CC list, it seems like other users may not be encountering this, so I
> suspect it may be related to some specific configuration of rust, clang, etc.

Thanks Alex for the explanation. If I can help you somehow please let me know.
Comment 20 Alex Xu (Hello71) 2023-06-07 01:33:35 UTC
I couldn't find the root cause, but seems like it is working for me now on firefox 114.0 with clang 16.0.5. it's also stable interactively for me now, 113.0.1 with USE=-pgo was constantly crashing. try 114 and if it works we'll call it "fixed"?
Comment 21 anna 2023-06-08 15:34:49 UTC
I have PGO on and I keep getting it stalling out like it can't connect to some server, and the whole process just freezes up and I have to cancel it. I'll try again after doing some other updates and rebooting to see if there's any changes since it seems hit or miss but I did already reboot after this happened last night and still the same thing.
Comment 22 anna 2023-06-08 16:40:20 UTC
UPDATE: After rebooting it seemed to freeze at the same point again but this time I just forgot about it and wandered off and eventually ~7-8 minutes later whatever PGO thing it was doing timed out/all the pipes were broken and it kept going, ultimately succeeding. Very odd behavior though.
Comment 23 Joonas Niilola gentoo-dev 2023-06-08 19:47:13 UTC
(In reply to anna from comment #22)
> UPDATE: After rebooting it seemed to freeze at the same point again but this
> time I just forgot about it and wandered off and eventually ~7-8 minutes
> later whatever PGO thing it was doing timed out/all the pipes were broken
> and it kept going, ultimately succeeding. Very odd behavior though.

I do wonder, when this happens, whether pgo gets really enabled or not. IIRC the code dies after a certain timeout, but it could just be one area that's skipped and not the whole pgo process. 

Anyway if I had to guess, you're building with GCC? Try setting the clang use flag with pgo, it _should_ work better.
Comment 24 anna 2023-06-08 20:08:25 UTC
I do have the clang USE flag set, for what it's worth.
Comment 25 Michael Mair-Keimberger (iamnr3) 2023-06-09 18:49:19 UTC
I've just installed the latest firefox with pgo. It does work for me now too. I'm fine with closing this, i guess regarding the odd behavior it would be better to open a new issue?
Comment 26 Larry the Git Cow gentoo-dev 2023-08-01 10:04:31 UTC
The bug has been closed via the following commit(s):

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

commit 1fd128403bb5b3b4619b07e4964f7dfff635f41c
Author:     Joonas Niilola <juippis@gentoo.org>
AuthorDate: 2023-08-01 10:03:51 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2023-08-01 10:04:27 +0000

    www-client/firefox: add 116.0
    
    Closes: https://bugs.gentoo.org/910689
    Bug: https://bugs.gentoo.org/910290
    Closes: https://bugs.gentoo.org/888055
    Bug: https://bugs.gentoo.org/909724
    Closes: https://bugs.gentoo.org/904354
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 www-client/firefox/Manifest             |  101 +++
 www-client/firefox/firefox-116.0.ebuild | 1466 +++++++++++++++++++++++++++++++
 2 files changed, 1567 insertions(+)