You are not logged in.

#1 2024-10-25 16:05:46

twelveeighty
Member
From: Alberta, Canada
Registered: 2011-09-04
Posts: 1,142

[SOLVED] firefox SIGSEGV on startup, downgrade doesn't help

UPDATE: downgrading nss from 3.105-1 => 3.104-1 fixes the issue for me. I'd welcome anyone commenting on what could possibly be happening here.

I run firefox on i3. Since my pacman update that coincided with firefox being updated to 131.0.3-1, it crashes on startup. I briefly see the browser window and then it goes to the firefox Crash Reporter. Starting firefox with --safe-mode, a different profile, or creating a new profile, all have the same result. I also tried downgrading firefox, but that didn't help either, so I assume it's another dependency that's at play here.

Since no actual exception trace is echoed back to the terminal, I ran firefox through gdb with the following:

$ gdb /usr/lib/firefox/firefox
...
> run --safe-mode
...
Thread 11 "Socket Thread" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffe82be6c0 (LWP 4871)]
Hacl_Bignum_Addition_bn_add_eq_len_u64 (aLen=8, a=0x7fffe82bb330, b=<optimized out>, res=0x7fffe82bb330)
    at ../../lib/freebl/verified/internal/Hacl_Bignum_Base.h:252
252	        c = Lib_IntTypes_Intrinsics_add_carry_u64(c, t10, t21, res_i1);

I tried digging into where this could come from, perhaps libxt? But libxt's last update was back in July, at firefox worked fine for me at then. I can't find issues reported either on the bug tracker or in the forums that are remotely similar. Anyone have any ideas where/how to dig further?

Last edited by twelveeighty (2024-10-26 23:29:19)

Offline

#2 2024-10-26 07:38:50

seth
Member
Registered: 2012-09-03
Posts: 59,042

Re: [SOLVED] firefox SIGSEGV on startup, downgrade doesn't help

https://fossies.org/linux/misc/nss-3.10 … num_Base.h
=> https://archlinux.org/packages/core/x86_64/nss/
Certificate issue?
Do you have more backtrace?
strace to see whether some offshoot certificate is loaded?

Online

#3 2024-10-26 15:31:49

twelveeighty
Member
From: Alberta, Canada
Registered: 2011-09-04
Posts: 1,142

Re: [SOLVED] firefox SIGSEGV on startup, downgrade doesn't help

strace doesn't log anything interesting I could tell. The output is massive, can you recommend any grep patterns to filter by so I can post them here?

That's the entirety of the backtrace itself, the only other things gdb logs is threads spawning. I'll paste the entire gdb log below for reference.

Yes, Hacl_Bignum_Base.h is where the crash happens. If I interpret nss's hg logs correctly, that file wasn't changed from 3.104 to 3.105, so then it would have to be the caller to passing in incorrect parameters to Hacl_Bignum_Addition_bn_add_eq_len_u64() or Hacl_Bignum_Multiplication_bn_sqr_u64() (which calls the former inline). I'm still working my way through  Fossies Dox to try to find a source file that was changed in 3.105 that calls these functions.

Here's the entire gdb output:

[twelveeighty@otc-twelveeighty ~]$ gdb /usr/lib/firefox/firefox
GNU gdb (GDB) 15.2
Copyright (C) 2024 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://www.gnu.org/software/gdb/bugs/>.
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 /usr/lib/firefox/firefox...

This GDB supports auto-downloading debuginfo from the following URLs:
  <https://debuginfod.archlinux.org>
Enable debuginfod for this session? (y or [n]) y
Debuginfod has been enabled.
To make this setting permanent, add 'set debuginfod enabled on' to .gdbinit.
Reading symbols from /home/twelveeighty/.cache/debuginfod_client/143f48647a67acc02072b05652cdc20a8677af40/debuginfo...
(gdb) run --safe-mode
Starting program: /usr/lib/firefox/firefox --safe-mode
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7ffff72006c0 (LWP 4860)]
[Thread 0x7ffff72006c0 (LWP 4860) exited]
[Detaching after fork from child process 4861]
[New Thread 0x7ffff72006c0 (LWP 4862)]
[New Thread 0x7fffe8c006c0 (LWP 4863)]
[New Thread 0x7fffe82006c0 (LWP 4864)]
[New Thread 0x7fffe78006c0 (LWP 4865)]
[New Thread 0x7fffe6e006c0 (LWP 4866)]
[Detaching after vfork from child process 4867]
[New Thread 0x7fffe91366c0 (LWP 4868)]
[New Thread 0x7fffe8c776c0 (LWP 4869)]
[New Thread 0x7fffe82ff6c0 (LWP 4870)]
[New Thread 0x7fffe82be6c0 (LWP 4871)]
[New Thread 0x7fffe827d6c0 (LWP 4872)]
[New Thread 0x7fffe78ff6c0 (LWP 4873)]
[New Thread 0x7fffe78be6c0 (LWP 4874)]
[New Thread 0x7fffe787d6c0 (LWP 4875)]
[New Thread 0x7fffe6eff6c0 (LWP 4876)]
[New Thread 0x7fffe6ebe6c0 (LWP 4877)]
[New Thread 0x7fffe6e7d6c0 (LWP 4878)]
[New Thread 0x7fffe49ff6c0 (LWP 4879)]
[New Thread 0x7fffe1a006c0 (LWP 4880)]
[New Thread 0x7fffe10006c0 (LWP 4881)]
[New Thread 0x7fffe06006c0 (LWP 4882)]
[Thread 0x7fffe06006c0 (LWP 4882) exited]
[New Thread 0x7fffe8c226c0 (LWP 4883)]
[New Thread 0x7fffe1aff6c0 (LWP 4888)]
[New Thread 0x7fffe823c6c0 (LWP 4889)]
[New Thread 0x7fffe1abe6c0 (LWP 4890)]
[New Thread 0x7fffe1a7d6c0 (LWP 4891)]
[New Thread 0x7fffdf3ff6c0 (LWP 4892)]
[New Thread 0x7fffdf2006c0 (LWP 4893)]
[New Thread 0x7fffdf0016c0 (LWP 4894)]
[New Thread 0x7fffdee026c0 (LWP 4895)]
[New Thread 0x7fffdec036c0 (LWP 4896)]
[New Thread 0x7fffdea046c0 (LWP 4897)]
[New Thread 0x7fffde8056c0 (LWP 4898)]
[New Thread 0x7fffde6066c0 (LWP 4899)]
[New Thread 0x7fffe10ff6c0 (LWP 4900)]
[New Thread 0x7fffe10be6c0 (LWP 4901)]
[New Thread 0x7fffe107d6c0 (LWP 4902)]
[New Thread 0x7fffe06006c0 (LWP 4903)]
[Thread 0x7fffe1a006c0 (LWP 4880) exited]
[Detaching after vfork from child process 4904]
[New Thread 0x7fffdd1576c0 (LWP 4905)]
[New Thread 0x7fffda9ff6c0 (LWP 4906)]
[New Thread 0x7fffe1a006c0 (LWP 4907)]
[New Thread 0x7fffd26006c0 (LWP 4908)]
[New Thread 0x7fffd22006c0 (LWP 4909)]
[New Thread 0x7fffd1e006c0 (LWP 4910)]
[New Thread 0x7fffd1a006c0 (LWP 4911)]
[New Thread 0x7fffd16006c0 (LWP 4912)]
[New Thread 0x7fffd12006c0 (LWP 4913)]
[New Thread 0x7fffd0e006c0 (LWP 4914)]
[New Thread 0x7fffd0a006c0 (LWP 4915)]
[New Thread 0x7fffd06006c0 (LWP 4916)]
[New Thread 0x7fffd02006c0 (LWP 4917)]
[New Thread 0x7fffcfe006c0 (LWP 4918)]
[New Thread 0x7fffcfa006c0 (LWP 4919)]
[New Thread 0x7fffda9be6c0 (LWP 4920)]
[New Thread 0x7fffcf6006c0 (LWP 4921)]
[New Thread 0x7fffda93d6c0 (LWP 4922)]
[New Thread 0x7fffda8fc6c0 (LWP 4923)]
[New Thread 0x7fffd1e546c0 (LWP 4924)]
[New Thread 0x7fffce8006c0 (LWP 4925)]
[New Thread 0x7fffd16c16c0 (LWP 4926)]
[New Thread 0x7fffd16806c0 (LWP 4927)]
[Detaching after fork from child process 4928]
[Thread 0x7fffe1aff6c0 (LWP 4888) exited]
[New Thread 0x7fffd12ff6c0 (LWP 4931)]
[New Thread 0x7fffe1aff6c0 (LWP 4933)]
[New Thread 0x7fffd12be6c0 (LWP 4939)]
[New Thread 0x7fffd0e8d6c0 (LWP 4941)]
[New Thread 0x7fffd0eff6c0 (LWP 4942)]
[New Thread 0x7fffc94006c0 (LWP 4943)]
[New Thread 0x7fffd0e4c6c0 (LWP 4944)]
[New Thread 0x7fffd22306c0 (LWP 4945)]
[New Thread 0x7fffbca006c0 (LWP 4946)]
[New Thread 0x7fffbc6006c0 (LWP 4947)]
[New Thread 0x7fffbc2006c0 (LWP 4948)]
[Thread 0x7fffd22306c0 (LWP 4945) exited]
[Thread 0x7fffbc6006c0 (LWP 4947) exited]
[Thread 0x7fffbca006c0 (LWP 4946) exited]
[Thread 0x7fffbc2006c0 (LWP 4948) exited]
[Detaching after fork from child process 4950]
[New Thread 0x7fffd0a696c0 (LWP 4951)]
[New Thread 0x7fffd06696c0 (LWP 4954)]
[New Thread 0x7fffd02ff6c0 (LWP 4955)]
[New Thread 0x7fffd22306c0 (LWP 4956)]
[New Thread 0x7fffbc2006c0 (LWP 4957)]
[New Thread 0x7fffbca006c0 (LWP 4958)]
[New Thread 0x7fffbc6006c0 (LWP 4959)]
[New Thread 0x7fffd02be6c0 (LWP 4975)]
[New Thread 0x7fffd027d6c0 (LWP 4976)]
[New Thread 0x7fffcfeff6c0 (LWP 4977)]
[New Thread 0x7fffcfaff6c0 (LWP 4982)]
[New Thread 0x7fffcfa676c0 (LWP 4983)]
[New Thread 0x7fffb2e006c0 (LWP 4984)]
[New Thread 0x7fffcf1ff6c0 (LWP 4985)]
[New Thread 0x7fffcf1be6c0 (LWP 4986)]
[New Thread 0x7fffcf17d6c0 (LWP 4987)]
[New Thread 0x7fffce8ff6c0 (LWP 4988)]
[New Thread 0x7fffce8be6c0 (LWP 4989)]

Thread 11 "Socket Thread" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffe82be6c0 (LWP 4871)]
Hacl_Bignum_Addition_bn_add_eq_len_u64 (aLen=8, a=0x7fffe82bb330, b=<optimized out>, res=0x7fffe82bb330)
    at ../../lib/freebl/verified/internal/Hacl_Bignum_Base.h:252
252	        c = Lib_IntTypes_Intrinsics_add_carry_u64(c, t10, t21, res_i1);
(gdb) quit
A debugging session is active.

	Inferior 1 [process 4856] will be killed.

Quit anyway? (y or n) y
Exiting due to channel error.

Offline

#4 2024-10-26 15:41:43

seth
Member
Registered: 2012-09-03
Posts: 59,042

Re: [SOLVED] firefox SIGSEGV on startup, downgrade doesn't help

How massive is massive (since it's crashing on startup, though otoh it's also spawning a shit-ton of threads)
5MB or so really isn't all that much, the most interesting stuff will be at the tail - if you're not aware of custom certificates

pacman -Qikk firefox nss ca-certificates-mozilla ca-certificates-utils

For a meaningful backtrace run

(gdb) thread apply all backtrace full

Online

#5 2024-10-26 16:07:32

twelveeighty
Member
From: Alberta, Canada
Registered: 2011-09-04
Posts: 1,142

Re: [SOLVED] firefox SIGSEGV on startup, downgrade doesn't help

OK - it's getting very bizarre: as mentioned, I had downgraded to 3.104, problem went away. On a hunch, I "reverted" back to 3.105 via pacman -Syu and the problem is still gone. So now, I can't reproduce the issue anymore...

Name            : firefox
Version         : 131.0.3-1
Description     : Fast, Private & Safe Web Browser
Architecture    : x86_64
URL             : https://www.mozilla.org/firefox/
Licenses        : MPL-2.0
Groups          : None
Provides        : None
Depends On      : alsa-lib  at-spi2-core  bash  cairo  dbus  ffmpeg  fontconfig  freetype2  gcc-libs  gdk-pixbuf2  glib2  glibc  gtk3  hicolor-icon-theme  libpulse  libx11  libxcb  libxcomposite  libxdamage  libxext  libxfixes  libxrandr  libxss  libxt  mime-types  nspr  nss  pango
                  ttf-font
Optional Deps   : hunspell-en_US: Spell checking, American English [installed]
                  libnotify: Notification integration [installed]
                  networkmanager: Location detection via available WiFi networks [installed]
                  speech-dispatcher: Text-to-Speech
                  xdg-desktop-portal: Screensharing with Wayland
Required By     : None
Optional For    : lastpass
Conflicts With  : None
Replaces        : None
Installed Size  : 239.88 MiB
Packager        : Jan Alexander Steffens (heftig) <heftig@archlinux.org>
Build Date      : Mon 14 Oct 2024 04:20:19 AM MDT
Install Date    : Mon 21 Oct 2024 01:54:57 PM MDT
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : Signature

firefox: 103 total files, 0 altered files
Name            : nss
Version         : 3.105-1
Description     : Network Security Services
Architecture    : x86_64
URL             : https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS
Licenses        : MPL-2.0
Groups          : None
Provides        : None
Depends On      : nspr>=4.35  p11-kit>=0.23.19  glibc  sqlite  zlib  sh
Optional Deps   : None
Required By     : chromium  discord  firefox  jdk-openjdk  jre7-openjdk-headless  jre8-openjdk-headless  libblockdev-crypto  libnm  libreoffice-fresh  networkmanager  pkcs11-helper  poppler  qca-qt5  qca-qt6  qt5-webengine  qt6-webengine  slack-desktop  teams  teams-for-linux
                  teams-insiders  volume_key  xmlsec  zoom
Optional For    : apr-util
Conflicts With  : None
Replaces        : None
Installed Size  : 5.10 MiB
Packager        : Jan Alexander Steffens (heftig) <heftig@archlinux.org>
Build Date      : Sat 28 Sep 2024 12:00:51 PM MDT
Install Date    : Sat 26 Oct 2024 09:59:33 AM MDT
Install Reason  : Installed as a dependency for another package
Install Script  : No
Validated By    : Signature

nss: 143 total files, 0 altered files
Name            : ca-certificates-mozilla
Version         : 3.105-1
Description     : Mozilla's set of trusted CA certificates
Architecture    : x86_64
URL             : https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS
Licenses        : MPL-2.0
Groups          : None
Provides        : None
Depends On      : ca-certificates-utils>=20181109-3
Optional Deps   : None
Required By     : ca-certificates
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 1069.00 KiB
Packager        : Jan Alexander Steffens (heftig) <heftig@archlinux.org>
Build Date      : Sat 28 Sep 2024 12:00:51 PM MDT
Install Date    : Mon 21 Oct 2024 01:40:14 PM MDT
Install Reason  : Installed as a dependency for another package
Install Script  : No
Validated By    : Signature

ca-certificates-mozilla: 5 total files, 0 altered files
Name            : ca-certificates-utils
Version         : 20240618-1
Description     : Common CA certificates (utilities)
Architecture    : any
URL             : https://src.fedoraproject.org/rpms/ca-certificates
Licenses        : GPL-2.0-or-later
Groups          : None
Provides        : ca-certificates  ca-certificates-java
Depends On      : bash  coreutils  findutils  p11-kit
Optional Deps   : None
Required By     : ca-certificates-mozilla  curl  jdk-openjdk  jre7-openjdk-headless  jre8-openjdk-headless  neon  python-certifi  qca-qt5  qca-qt6
Optional For    : openssl  wget
Conflicts With  : ca-certificates-java
Replaces        : ca-certificates-java
Installed Size  : 13.63 KiB
Packager        : Jan Alexander Steffens (heftig) <heftig@archlinux.org>
Build Date      : Tue 18 Jun 2024 12:36:40 PM MDT
Install Date    : Tue 25 Jun 2024 09:07:17 AM MDT
Install Reason  : Installed as a dependency for another package
Install Script  : Yes
Validated By    : Signature

ca-certificates-utils: 33 total files, 0 altered files

Offline

#6 2024-10-26 19:08:01

seth
Member
Registered: 2012-09-03
Posts: 59,042

Re: [SOLVED] firefox SIGSEGV on startup, downgrade doesn't help

Likely corrupted package (binary on disk) that got sanitized w/ the re-installation?
Were there any filesystem/disk related incidents? Did the system crash during an update or hard reset shortly after?
Did you check "smartctl -a"?

Online

#7 2024-10-26 20:17:13

twelveeighty
Member
From: Alberta, Canada
Registered: 2011-09-04
Posts: 1,142

Re: [SOLVED] firefox SIGSEGV on startup, downgrade doesn't help

No crash or shenanigans during update. smartctl reports no errors. The only thing I recall happening when I rebooted after that update is the dirmngr@etc-pacman.d-gnupg service timing out at shutdown:

Oct 21 13:42:16 otc-twelveeighty systemd[1]: dirmngr@etc-pacman.d-gnupg.service: State 'stop-sigterm' timed out. Killing.
Oct 21 13:42:16 otc-twelveeighty systemd[1]: dirmngr@etc-pacman.d-gnupg.service: Killing process 591581 (dirmngr) with signal SIGKILL.
Oct 21 13:42:16 otc-twelveeighty systemd[1]: dirmngr@etc-pacman.d-gnupg.service: Main process exited, code=killed, status=9/KILL
Oct 21 13:42:16 otc-twelveeighty systemd[1]: dirmngr@etc-pacman.d-gnupg.service: Failed with result 'timeout'.
Oct 21 13:42:16 otc-twelveeighty systemd[1]: Stopped GnuPG network certificate management daemon for /etc/pacman.d/gnupg.
Oct 21 13:42:16 otc-twelveeighty systemd[1]: dirmngr@etc-pacman.d-gnupg.service: Consumed 9.050s CPU time, 20.7M memory peak.

Offline

#8 2024-10-26 21:06:02

seth
Member
Registered: 2012-09-03
Posts: 59,042

Re: [SOLVED] firefox SIGSEGV on startup, downgrade doesn't help

I don't really see any connection between dirmngr and nss except for maybe the certificates, but those haven't been updated.
The most likely explanation is that something in the nss installation was corrupted for some reason.

smartctl reports no errors

As long as there're no pending or re-allocated or offline uncorrectable sectors, it's also no the disc.

"cosmic rays" - unless you're using sth. like timeshift or btrfs snapshots to go back to the broken state, we won't figure hmm

Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Online

#9 2024-10-26 23:28:54

twelveeighty
Member
From: Alberta, Canada
Registered: 2011-09-04
Posts: 1,142

Re: [SOLVED] firefox SIGSEGV on startup, downgrade doesn't help

It's interesting that both dirmngr and nss deal with certs, but pure coincidences happen as well.,Now it'll be very hard to troubleshoot, I don't use timeshift or btrfs, just old-fashioned backups of data partitions.

Thanks anyway, Seth, I'll mark as solved for now.

Offline

Board footer

Powered by FluxBB