www-client/firefox-bin-119.0 failing on launch with a SEGV. No further information, sorry, just instant segmentation fault. Reproduced by at least one other #gentoo user (s0ulslack). # emerge --info =www-client/firefox-bin-119.0 Portage 3.0.51 (python 3.11.5-final-0, default/linux/amd64/17.1/desktop, gcc-12, glibc-2.37-r7, 6.4.12-gentoo-babylon5 x86_64) ================================================================= System Settings ================================================================= System uname: Linux-6.4.12-gentoo-babylon5-x86_64-AMD_Ryzen_9_5900X_12-Core_Processor-with-glibc2.37 KiB Mem: 65770228 total, 56240836 free KiB Swap: 2097144 total, 2097144 free Timestamp of repository gentoo: Tue, 24 Oct 2023 06:00:01 +0000 Head commit of repository gentoo: c16ea6bb2271509f84dc346033f9d176b2dab75a Head commit of repository brother-overlay: 0d059637b01926488e1eedfa078323f6e48a6130 Head commit of repository mysql: 3925d2fe5eef1e63602a4f520028aa55dca3df08 sh bash 5.1_p16-r6 ld GNU ld (Gentoo 2.40 p5) 2.40.0 app-misc/pax-utils: 1.3.5::gentoo app-shells/bash: 5.1_p16-r6::gentoo dev-java/java-config: 2.3.1-r1::gentoo dev-lang/perl: 5.38.0-r1::gentoo dev-lang/python: 3.11.5::gentoo dev-lang/rust-bin: 1.71.1::gentoo dev-util/cmake: 3.27.7::gentoo dev-util/meson: 1.2.1-r1::gentoo sys-apps/baselayout: 2.14::gentoo sys-apps/openrc: 0.48::gentoo sys-apps/sandbox: 2.38::gentoo sys-devel/autoconf: 2.71-r6::gentoo sys-devel/automake: 1.16.5-r1::gentoo sys-devel/binutils: 2.40-r5::gentoo sys-devel/binutils-config: 5.5::gentoo sys-devel/clang: 16.0.6::gentoo sys-devel/gcc: 12.3.1_p20230825::gentoo, 13.2.1_p20230826::gentoo sys-devel/gcc-config: 2.11::gentoo sys-devel/libtool: 2.4.7-r1::gentoo sys-devel/llvm: 16.0.6::gentoo sys-devel/make: 4.4.1-r1::gentoo sys-kernel/linux-headers: 6.5-r1::gentoo (virtual/os-headers) sys-libs/glibc: 2.37-r7::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://epsilon3.caerllewys.net/gentoo-portage priority: -1000 volatile: True sync-rsync-verify-max-age: 24 sync-rsync-verify-metamanifest: yes sync-rsync-verify-jobs: 1 sync-rsync-extra-opts: brother-overlay location: /var/db/repos/brother-overlay sync-type: git sync-uri: https://github.com/stefan-langenmaier/brother-overlay masters: gentoo volatile: False gentoo-dev-alaric location: /var/lib/alaric masters: gentoo volatile: True mysql location: /var/db/repos/mysql sync-type: git sync-uri: https://anongit.gentoo.org/git/proj/mysql.git masters: gentoo volatile: False ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="*" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=native -O2 -pipe -mfpmath=sse" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /var/bind /var/lib/hsqldb" 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 -pipe -mfpmath=sse" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="--with-bdeps=y --verbose-conflicts --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" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg-live 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 qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://gentoo.osuosl.org http://www.gtlib.gatech.edu/pub/gentoo http://mirrors.cs.wmich.edu/gentoo http://distfiles.gentoo.org " LANG="en_US.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LEX="flex" LINGUAS="en_US en" MAKEOPTS="-j12" 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" SHELL="/bin/bash" USE="3dnow 3dnowext X a52 aac acl acpi alsa amd64 bash-completion branding bzip2 cairo cdda cddb cdr cli crypt cuda cups dbus dri dts dvd dvdr elogind encode exif ffmpeg flac fltk fortran gdbm gif gpm gtk gui iconv icu id3tag imagemagick ipv6 java jpeg jpeg2k lcms libnotify libtirpc mad mmx mmxext mng mp3 mp4 mpeg multilib mysql ncurses nls nptl nsplugin nvidia ogg opengl openmp opus pam pango pcre pcsc-lite pdf png policykit ppds qt5 readline sdl seccomp sound spell split-usr sse sse2 sse4 ssl startup-notification svg test-rust theora threads tiff tk tools truetype udev udisks unicode upower usb utils v4l v4l2 vdpau vorbis vpx vulkan wxwidgets x264 xattr xcb xft xml xpm xv xvid xvmc zlib" ABI_X86="64" ADA_TARGET="gnat_2021" ALSA_CARDS="emu10k1" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="3dnow 3dnowext mmx mmxext popcnt sse sse2 sse3 sse4a" 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="en en-US" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-1" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11" RUBY_TARGETS="ruby31" VIDEO_CARDS="nvidia v4l" 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, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Can someone hitting this please run it under gdb and try get a backtrace? Thanks.
(In reply to Sam James from comment #1) > Can someone hitting this please run it under gdb and try get a backtrace? > Thanks. I tried ... (gdb) file /usr/bin/firefox-bin "/usr/bin/firefox-bin": not in executable format: file format not recognized
Ugh, the wrapper thing.. sorry, I cant look up the real path right now, can when home.
(In reply to Sam James from comment #3) > Ugh, the wrapper thing.. sorry, I cant look up the real path right now, can > when home. I found it, it's /opt/firefox/firefox-bin. Don't know whether this is enough information: (gdb) file /opt/firefox/firefox-bin Reading symbols from /opt/firefox/firefox-bin... (No debugging symbols found in /opt/firefox/firefox-bin) (gdb) run Starting program: /opt/firefox/firefox-bin [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". [New Thread 0x7ffff77ff6c0 (LWP 23068)] [Thread 0x7ffff77ff6c0 (LWP 23068) exited] [Detaching after fork from child process 23069] Thread 1 "firefox-bin" received signal SIGSEGV, Segmentation fault. 0x0000000005f3f650 in ?? () (gdb) bt #0 0x0000000005f3f650 in () #1 0x00007ffff7fcee5e in () at /lib64/ld-linux-x86-64.so.2 #2 0x00007ffff7fcef4c in () at /lib64/ld-linux-x86-64.so.2 #3 0x00007ffff7fcb556 in _dl_catch_exception () at /lib64/ld-linux-x86-64.so.2 #4 0x00007ffff7fd583f in () at /lib64/ld-linux-x86-64.so.2 #5 0x00007ffff7fcb4c9 in _dl_catch_exception () at /lib64/ld-linux-x86-64.so.2 #6 0x00007ffff7fd5bdd in () at /lib64/ld-linux-x86-64.so.2 #7 0x00007ffff7aa9a18 in () at /lib64/libc.so.6 #8 0x00007ffff7fcb4c9 in _dl_catch_exception () at /lib64/ld-linux-x86-64.so.2 #9 0x00007ffff7fcb5ef in () at /lib64/ld-linux-x86-64.so.2 #10 0x00007ffff7aa94ea in () at /lib64/libc.so.6 #11 0x00007ffff7aa9ad1 in dlopen () at /lib64/libc.so.6 #12 0x00005555555e47e9 in _start () (gdb)
(I still have the gdb session open if you can give me specific commands you'd like me to run.)
It's failing to load some shared library via dlopen(). You would need to rebuild sys-libs/glibc with debug symbols to determine which library it is trying to load. Alternatively, you could run strace to see what file is getting loaded.
(In reply to Mike Gilbert from comment #6) > It's failing to load some shared library via dlopen(). You would need to > rebuild sys-libs/glibc with debug symbols to determine which library it is > trying to load. > > Alternatively, you could run strace to see what file is getting loaded. Here's the tail end of the strace: openat(AT_FDCWD, "/usr/lib64/apulse/libX11-xcb.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/opt/firefox/libX11-xcb.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/lib64/apulse/libX11-xcb.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/lib64/libX11-xcb.so.1", O_RDONLY|O_CLOEXEC) = 7 read(7, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832 newfstatat(7, "", {st_mode=S_IFREG|0755, st_size=13816, ...}, AT_EMPTY_PATH) = 0 mmap(NULL, 16400, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 7, 0) = 0x7f49ed45a000 mmap(0x7f49ed45b000, 4096, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 7, 0x1000) = 0x7f49ed45b000 mmap(0x7f49ed45c000, 4096, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 7, 0x2000) = 0x7f49ed45c000 mmap(0x7f49ed45d000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 7, 0x2000) = 0x7f49ed45d000 close(7) = 0 mprotect(0x7f49ed45d000, 4096, PROT_READ) = 0 mprotect(0x7f49ebacd000, 4096, PROT_READ) = 0 mprotect(0x7f49ed466000, 4096, PROT_READ) = 0 mprotect(0x7f49ebbb6000, 24576, PROT_READ) = 0 mprotect(0x7f49eb3ae000, 5156864, PROT_READ) = 0 mprotect(0x7f49eb3ae000, 5156864, PROT_READ|PROT_WRITE) = 0 mprotect(0x7f49eb3ae000, 5156864, PROT_READ) = 0 --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x5f3f650} --- +++ killed by SIGSEGV +++ Segmentation fault
Seeing a lot of ENOENTs there. It looks to me like firefox-bin-119 is trying to open those libraries from places where they shouldn't be...?
(In reply to Phil Stracchino (Unix Ronin) from comment #8) > Seeing a lot of ENOENTs there. It looks to me like firefox-bin-119 is > trying to open those libraries from places where they shouldn't be...? And/or versions of libraries that aren't installed...
libx11-xcb.so.1 is likely being loaded as a dependency of some other library. Please attach the full strace output.
Created attachment 873415 [details] strace output
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0512a42f7fccccc16c44a2047cdc9d314cd044db commit 0512a42f7fccccc16c44a2047cdc9d314cd044db Author: Joonas Niilola <juippis@gentoo.org> AuthorDate: 2023-10-24 18:05:23 +0000 Commit: Joonas Niilola <juippis@gentoo.org> CommitDate: 2023-10-24 18:06:41 +0000 www-client/firefox-bin: fix RDEPEND typo on 119.0 Closes: https://bugs.gentoo.org/916230 Signed-off-by: Joonas Niilola <juippis@gentoo.org> .../{firefox-bin-119.0.ebuild => firefox-bin-119.0-r1.ebuild} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
I guess this is it but not really sure how you hit it now. Please reopen if it still segfaults.
Wait, no, that can't be it.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=866e2402f3b421eb12b4de2714cbdc43f48ef61d commit 866e2402f3b421eb12b4de2714cbdc43f48ef61d Author: Joonas Niilola <juippis@gentoo.org> AuthorDate: 2023-10-24 18:13:14 +0000 Commit: Joonas Niilola <juippis@gentoo.org> CommitDate: 2023-10-24 18:13:19 +0000 www-client/firefox-bin: re-add 118.0.2 - in case 119.0 is broken for some people. Bug: https://bugs.gentoo.org/916230 Signed-off-by: Joonas Niilola <juippis@gentoo.org> www-client/firefox-bin/Manifest | 98 ++++++ www-client/firefox-bin/firefox-bin-118.0.2.ebuild | 382 ++++++++++++++++++++++ 2 files changed, 480 insertions(+)
Based on the strace log, it looks like it is crashing in dlopen("/opt/firefox/libxul.so").
Okay, reproduced with apulse.
The problem is still there in www-client/firefox-bin-119.0-r1 $ firefox-bin Segmentation fault See attached strace output
Created attachment 873416 [details] strace firefox-bin
> The problem is still there in www-client/firefox-bin-119.0-r1 Me too, with +alsa -pulseaudio. Thanks all. Regards.
Re: www-client/firefox-bin-119.0-r1 Ditto. (Me too.) Reverting to 118.0.2 restored functionality.
So I think apulse needs to be updated to work with 119.0. Looking at https://github.com/i-rinat/apulse/issues/121 I'm not very hopeful that would happen. Someone should still report this to apulse upstream, maybe there's someone with an idea how to fix it. Unfortunately as the issue seems to be at least in firefox-bin, there's not much that can be done to fix it.
Created attachment 873560 [details] Fixed ebuild. Dear patients, please try the attached ebuild. It simply drops the line of "patchelf". (And accompanying BDEPEND fix.) At least it works for me.
Created attachment 873561 [details, diff] Patch to the official ebuild. If you're sane, you would prefer this patch rather than diretly relying on my ebuild. Hope this works. Thanks all!
(In reply to Teika kazura from comment #23) > Created attachment 873560 [details] > Fixed ebuild. > > Dear patients, please try the attached ebuild. > > It simply drops the line of "patchelf". (And accompanying BDEPEND fix.) At > least it works for me. YES! I downloaded the ebuild as firefox-bin-119.0-r2.ebuild in my local repo, emerged it then have it running now. Appears to work fine. Has sound. Only error running from shell, which has been present for a while now, is: $ firefox-bin ATTENTION: default value of option mesa_glthread overridden by environment. ATTENTION: default value of option mesa_glthread overridden by environment. Very happy. Wondering if there are any long term casualties in adopting this? I don't know. I'm just a patient.
Mysterious. I wonder if they added some apulse detection upstream in 119 which makes it obsolete or something.
/usr/bin/firefox-bin still has these lines: APULSELIB_DIR="/usr/lib64/apulse" ... export LD_LIBRARY_PATH="${APULSELIB_DIR:+${APULSELIB_DIR}:}${MOZILLA_FIVE_HOME}" So they suffice, I guess. # Or rather, why LD_LIBRARY_PATH is insufficient, and patchelf is necessary, unless libpulse.so path is hardcoded? ## Dunno what patchelf is exactly. Sorry if my comment misses the point.
(In reply to Teika kazura from comment #23) > Created attachment 873560 [details] > Fixed ebuild. > > Dear patients, please try the attached ebuild. > > It simply drops the line of "patchelf". (And accompanying BDEPEND fix.) At > least it works for me. (In reply to Andy Figueroa from comment #25) > (In reply to Teika kazura from comment #23) > > Created attachment 873560 [details] > > Fixed ebuild. > > > > Dear patients, please try the attached ebuild. > > > > It simply drops the line of "patchelf". (And accompanying BDEPEND fix.) At > > least it works for me. > > YES! > > I downloaded the ebuild as firefox-bin-119.0-r2.ebuild in my local repo, > emerged it then have it running now. Appears to work fine. Has sound. Only > error running from shell, which has been present for a while now, is: > > $ firefox-bin > ATTENTION: default value of option mesa_glthread overridden by environment. > ATTENTION: default value of option mesa_glthread overridden by environment. > > Very happy. Wondering if there are any long term casualties in adopting > this? I don't know. I'm just a patient. Do either of you have pulseaudio or pipewire installed? It shouldn't be using apulse after that modification. And I also doubt upstream Mozilla has done anything to support apulse either, buuut who knows, might have to take a deeper look.
(In reply to Joonas Niilola from comment #28) > > Do either of you have pulseaudio or pipewire installed? It shouldn't be > using apulse after that modification. And I also doubt upstream Mozilla has > done anything to support apulse either, buuut who knows, might have to take > a deeper look. No, my system is stricly -pulseaudio +alsa with no pipewire. apulse is installed.
(In reply to Andy Figueroa from comment #29) > (In reply to Joonas Niilola from comment #28) > > > > Do either of you have pulseaudio or pipewire installed? It shouldn't be > > using apulse after that modification. And I also doubt upstream Mozilla has > > done anything to support apulse either, buuut who knows, might have to take > > a deeper look. > > No, my system is stricly -pulseaudio +alsa with no pipewire. apulse is > installed. Same here: +alsa -pulseaudio, apulse, no pipewire. I long ago learned that any of the open-surce software mixers, even if you can get them correctly configured, are a poor substitute for an EMU10K1 card with hardware mixing. I've tested Teika's patch and verified it appears to work correctly for me.
I, too, can confirm that removing the patchelf command gives a working firefox build (including sound!) I did some poking around Mozilla's bugzilla and didn't see anything related to audio that looked all that interesting, so I used Mozilla's mozregression tool to see if it provided anything useful... here's what it said: 13:25.85 INFO: Narrowed integration regression window from [c8336f0a, 68879cdd] (3 builds) to [c8336f0a, 032b87ff] (2 builds) (~1 steps left) 13:25.85 INFO: No more integration revisions, bisection finished. 13:25.85 INFO: Last good revision: c8336f0ad9fba7249e6fa871f0cf96660c9c3b97 13:25.85 INFO: First bad revision: 032b87ff55061bcbdc7a85d9e18fde814797073a 13:25.85 INFO: Pushlog: https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=c8336f0ad9fba7249e6fa871f0cf96660c9c3b97&tochange=032b87ff55061bcbdc7a85d9e18fde814797073a This is the specific commit referenced in the pushlog: https://hg.mozilla.org/integration/autoland/rev/032b87ff55061bcbdc7a85d9e18fde814797073a And this is the original Mozilla bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1850866 This, in turn, references https://bugzilla.mozilla.org/show_bug.cgi?id=1839740, which is about "modernizing elfhack," (whatever that is... but wait for it!) the bug conveniently references a blog post on elfhack: https://glandium.org/blog/?p=4297 (which, in turn, goes into a fair amount of details about what "relhack" is, and that seems to be the smoking gun). So, tl;dr: I don't think this has (or ever had) anything to do with apulse or audio in general; it was the patchelf command in the ebuild that probably conflicted with Mozilla's new "relhack" linker munging tool, which got turned on in their official build system for 119.x. I'd also guess that the reason "everything works" after removing that command is because the /usr/bin/firefox-bin wrapper still sets LD_LIBRARY_PATH to include the apulse lib directory for -pulseaudio +alsa configurations. So, I think the above patch is a pretty solid candidate for a firefox-bin-119.0-r2 ebuild.
Many thanks for doing that work. Agreed!
(In reply to J. Paul Reed from comment #31) > > I'd also guess that the reason "everything works" after removing that > command is because the /usr/bin/firefox-bin wrapper still sets > LD_LIBRARY_PATH to include the apulse lib directory for -pulseaudio +alsa > configurations. > Ahh indeed, that explains it. Thanks for digging into it :) let's go with this.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e64a17210c65081ee68e1e63031e66e45b6bc09c commit e64a17210c65081ee68e1e63031e66e45b6bc09c Author: Joonas Niilola <juippis@gentoo.org> AuthorDate: 2023-10-29 07:37:31 +0000 Commit: Joonas Niilola <juippis@gentoo.org> CommitDate: 2023-10-29 07:37:31 +0000 www-client/firefox-bin: fix 119.0 when using apulse Closes: https://bugs.gentoo.org/916230 Signed-off-by: Joonas Niilola <juippis@gentoo.org> ...119.0-r1.ebuild => firefox-bin-119.0-r2.ebuild} | 28 +++++++--------------- 1 file changed, 8 insertions(+), 20 deletions(-)