View previous topic :: View next topic |
Author |
Message |
molletts Tux's lil' helper


Joined: 16 Feb 2013 Posts: 133
|
Posted: Mon Jun 05, 2023 8:18 pm Post subject: dev-libs/nss update leads to illegal instruction in Firefox |
|
|
Hi,
Just wondering if anyone else has seen this yet. I'm still looking into it myself so this is just a quick initial scribble. Also, I thought it might be worth getting it out here in case someone else is struggling to diagnose the same crash.
Updated from dev-libs/nss-3.89.1 to nss-3.90 as part of today's ~amd64 updates. www-client/firefox-113.0.2 exits immediately after creating its main window with an "illegal instruction" message. After re-merging nss-3.89.1, Firefox works fine again. I suspect at least some other nss consumers will be affected too, depending on exactly what function(s) contain the offending opcodes.
Haven't yet tried re-merging Firefox after updating nss in case of some ABI-related weirdness (I'll leave that going tonight to look into tomorrow evening; it takes an hour and a half or so to build).
Using CFLAGS="-O2 -march=native -pipe" on AMD FX-9590 (equivalent to -march=piledriver -mno-lwp). USE etc for nss as follows:
Code: | [ebuild U ] dev-libs/nss-3.90::gentoo [3.89.1::gentoo] USE="utils -cacert -test" ABI_X86="(64) -32 (-x32)" CPU_FLAGS_X86="sse3%* -avx2%" 0 KiB |
Full cpuid2cpuflags output for the CPU for reference:
Code: | CPU_FLAGS_X86: aes avx f16c fma3 fma4 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 xop |
Regards,
Stephen |
|
Back to top |
|
 |
alamahant Advocate

Joined: 23 Mar 2019 Posts: 3961
|
Posted: Tue Jun 06, 2023 12:14 am Post subject: |
|
|
Ok i just tried updating nss to
Code: |
[ebuild U ] dev-libs/nss-3.90::gentoo [3.89.1::gentoo] USE="utils -cacert -test" ABI_X86="(64) -32 (-x32)" CPU_FLAGS_X86="avx2%* sse3%*" 0 KiB
|
with
Code: |
CPU_FLAGS_X86: aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sse sse2 sse3 sse4_1 sse4_2 ssse3
and
COMMON_FLAGS="-march=native -O2 -pipe"
|
on an i7 and firefox-bin opens ok. _________________
 |
|
Back to top |
|
 |
Hu Administrator

Joined: 06 Mar 2007 Posts: 23355
|
Posted: Tue Jun 06, 2023 12:48 am Post subject: |
|
|
"Illegal instruction" errors are often system dependent, since a system with the latest CPU can understand and process instructions that older systems did not. Therefore, if the problem is that a current generation instruction has been introduced in a file which should be usable on older generation CPUs, only people testing on older CPUs will see it. Diagnosing this might be easier if we knew the specific opcodes that are failing, and in what functions they are found. |
|
Back to top |
|
 |
sam_ Developer


Joined: 14 Aug 2020 Posts: 2273
|
|
Back to top |
|
 |
Josef.95 Advocate

Joined: 03 Sep 2007 Posts: 4739 Location: Germany
|
Posted: Tue Jun 06, 2023 6:29 am Post subject: |
|
|
alamahant wrote: | firefox-bin opens ok | Yes, firefox-bin using probably a bundled nss version (it is visible in about:support ). |
|
Back to top |
|
 |
molletts Tux's lil' helper


Joined: 16 Feb 2013 Posts: 133
|
Posted: Tue Jun 06, 2023 6:28 pm Post subject: |
|
|
Just tested the patch referenced in bug 907932 on unmasked nss-3.90 and it fixes the issue for me.
It looks like a bit of a blunt instrument (just disable the bit of code instead of using the instruction set extension conditionally based on a configure-time test or flag) but it's an effective quick fix which presumably doesn't regress anything and buys some time to finesse the fix in a point release. |
|
Back to top |
|
 |
|