> From: Greg Steuck <gne...@openbsd.org>
> Date: Sun, 01 Oct 2023 13:42:21 -0700
> 
> I had firefox crash on me but the core looks suspect. I don't understand
> why `push   %r15` is an invalid instruction.
> 
> % egdb /usr/local/lib/firefox/firefox ~/firefox.core 
> GNU gdb (GDB) 9.2
> ...
> [New process 561871]
> 
> warning: .dynamic section for "/usr/lib/libc++.so.9.0" is not at the expected 
> address (wrong library or version mismatch?)
> 
> warning: .dynamic section for "/usr/lib/libc++abi.so.6.0" is not at the 
> expected address (wrong library or version mismatch?)
> 
> warning: .dynamic section for "/usr/lib/libc.so.97.1" is not at the expected 
> address (wrong library or version mismatch?)
> 
> warning: .dynamic section for "/usr/lib/libexpat.so.14.0" is not at the 
> expected address (wrong library or version mismatch?)
> 
> warning: .dynamic section for "/usr/lib/libexecinfo.so.3.0" is not at the 
> expected address (wrong library or version mismatch?)

This suggests that the shared libraries that your firefox was using
didn't match the shared libraries on your disk.  Therefore gdb may be
showing you the wrong instructions.

That said, the crash happened in a library that isn't listed above.

> Core was generated by `firefox'.
> Program terminated with signal SIGILL, Illegal instruction.
> #0  0x00000109467034f8 in __emutls_get_address (control=0x108f8e127a8 
> <__emutls_v._ZL20sAlreadyHandlingTrap.0.0>) at 
> /usr/src/gnu/lib/libcompiler_rt/../../llvm/compiler-rt/lib/builtins/emutls.c:392
> 392   void *__emutls_get_address(__emutls_control *control) {
> [Current thread is 1 (process 285525)]
> (gdb) bt
> #0  0x00000109467034f8 in __emutls_get_address (control=0x108f8e127a8 
> <__emutls_v._ZL20sAlreadyHandlingTrap.0.0>) at 
> /usr/src/gnu/lib/libcompiler_rt/../../llvm/compiler-rt/lib/builtins/emutls.c:392
> #1  0x00000108f88cc284 in WasmTrapHandler(int, siginfo_t*, void*) () from 
> /usr/local/lib/firefox/libxul.so.129.0
> #2  0x000001095b1fd009 in ?? ()
> #3  0x000000000000000b in ?? ()
> #4  0x000077e8e8673730 in ?? ()
> #5  0x000077e8e8673640 in ?? ()
> #6  0x0000010901fbad70 in flh () from /usr/lib/libc.so.97.1
> #7  0x000001095907c3e0 in ?? ()
> #8  0x0000000000000000 in ?? ()
> (gdb) disassemble $rip
> Dump of assembler code for function __emutls_get_address:
>    0x00000109467034f0 <+0>:   endbr64
>    0x00000109467034f4 <+4>:   push   %rbp
>    0x00000109467034f5 <+5>:   mov    %rsp,%rbp
> => 0x00000109467034f8 <+8>:   push   %r15
>    0x00000109467034fa <+10>:  push   %r14
>    0x00000109467034fc <+12>:  push   %r13
> 
> The firefox package is farily recent (though not current):
> Sep 26 09:18:40 home pkg_add: Added firefox-117.0.1p0->117.0.1p0
> 
> The system is running a bit more recent snapshot:
> OpenBSD 7.4 (GENERIC.MP) #1382: Wed Sep 27 10:51:31 MDT 2023
> 
> FWIW, the system is fairly old Ryzen 7:
> 
> cpu0 at mainbus0: apid 0 (boot processor)
> cpu0: AMD Ryzen 7 5700G with Radeon Graphics, 3800.01 MHz, 19-50-00, patch 
> 0a50000d
> cpu0: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,FMA3,CX16,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,RDRAND,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,TCE,TOPEXT,CPCTR,DBKP,PCTRL3,MWAITX,HWPSTATE,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,PQM,RDSEED,ADX,SMAP,CLFLUSHOPT,CLWB,SHA,UMIP,PKU,IBPB,IBRS,STIBP,STIBP_ALL,IBRS_PREF,IBRS_SM,SSBD,XSAVEOPT,XSAVEC,XGETBV1,XSAVES
> cpu0: 32KB 64b/line 8-way D-cache, 32KB 64b/line 8-way I-cache, 512KB 
> 64b/line 8-way L2 cache, 16MB 64b/line 16-way L3 cache
> cpu0: smt 0, core 0, package 0
> cpu0: apic clock running at 100MHz
> cpu0: mwait min=64, max=64, C-substates=1.1, IBE
> acpicpu0 at acpi0: C3(0@350 io@0x415), C2(0@18 io@0x414), C1(0@1 mwait), PSS
> cpu0: 3800 MHz: speeds: 3800 1700 1400 MHz
> 
> 

Reply via email to