[Bug 258747] www/firefox and derivates SIGSEGV

From: <bugzilla-noreply_at_freebsd.org>
Date: Mon, 27 Sep 2021 14:34:02 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=258747

            Bug ID: 258747
           Summary: www/firefox and derivates SIGSEGV
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: gecko@FreeBSD.org
          Reporter: steew0x8@protonmail.com
          Assignee: gecko@FreeBSD.org
             Flags: maintainer-feedback?(gecko@FreeBSD.org)

Created attachment 228215
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=228215&action=edit
After many tries, it opens, but nothing works

Any version of firefox, whether compiled on poudriere, from pkg, thunderbird or
firefox-esr result in a segmentation fault when trying to execute.

My system is FreeBSD 13.0 STABLE, custom kernel (with freebsd11 compat enabled
as per other similar bugzillas), running under Wayland and root-on-zfs.

If I try to insist on opening firefox many many times it actually gets to open,
though absolutely no webpage loads, and I cannot get to about:config.

Usually the ouput is like this:

Segmentation fault (core dumped)

When I actually get it to run I get this error printed many times in the
console:
JavaScript error: , line 0: InternalError: too much recursion 

As commented, this error happens on any version of firefox, with/without dbus
(and with dbus running), and tried disabling and enabling a bunch of flags to
no avail. If it is of use, these are my current flags, compiled from Synth:

        ALSA           : off
        CANBERRA       : off
        DBUS           : on
        DEBUG          : off
        FFMPEG         : on
        JACK           : off
        LIBPROXY       : off
        LTO            : off
        OPTIMIZED_CFLAGS: on
        PROFILE        : off
        PULSEAUDIO     : off
        SNDIO          : on
        TEST           : off

This is the limited information I can get by running lldb:

(lldb) target create "/usr/local/bin/firefox" --core "firefox.core"
Core file '/home/rier/firefox.core' (x86_64) was loaded.

(lldb) bt all
This version of LLDB has no plugin for the mipsassem language. Inspection of
frame variables will be limited.
This version of LLDB has no plugin for the mipsassem language. Inspection of
frame variables will be limited.
* thread #1, name = 'MainThread', stop reason = signal SIGSEGV
  * frame #0: 0x00000cec616b407a libc.so.7`__sys_thr_kill at thr_kill.S:4
    frame #1: 0x00000cec6162bb84 libc.so.7`__raise(s=11) at raise.c:52:10
    frame #2: 0x00000cec952406b4
libxul.so`nsProfileLock::FatalSignalHandler(int, __siginfo*, void*) + 260
    frame #3: 0x00000cec95bcb80c libxul.so`WasmTrapHandler(int, __siginfo*,
void*) + 332
    frame #4: 0x00000cec62842bae
libthr.so.3`handle_signal(actp=0x00007fffffb9f4c0, sig=11,
info=0x00007fffffb9f8b0, ucp=0x00007fffffb9f540) at thr_sig.c:301:3
    frame #5: 0x00000cec628421fc libthr.so.3`thr_sighandler(sig=11,
info=0x00007fffffb9f8b0, _ucp=0x00007fffffb9f540) at thr_sig.c:246:2
    frame #6: 0x00007fffffffe003
    frame #7: 0x00000cec955409f3 libxul.so`JSLinearString*
js::NewStringCopyUTF8N<(js::AllowGC)1>(JSContext*, JS::UTF8Chars,
js::gc::InitialHeap) + 179
    frame #8: 0x00000cec9537f05d libxul.so`js::ErrorToException(JSContext*,
JSErrorReport*, JSErrorFormatString const* (*)(void*, unsigned int), void*) +
157
    frame #9: 0x00000cec95402702 libxul.so`js::ReportErrorNumberVA(JSContext*,
js::IsWarning, JSErrorFormatString const* (*)(void*, unsigned int), void*,
unsigned int, js::ErrorArgumentsType, __va_list_tag*) + 210
    frame #10: 0x00000cec95371f37
libxul.so`JS_ReportErrorNumberASCII(JSContext*, JSErrorFormatString const*
(*)(void*, unsigned int), void*, unsigned int, ...) + 151
    frame #11: 0x00000cec95491e16 libxul.so`js::ReportOverRecursed(JSContext*,
unsigned int) + 70
    frame #12: 0x00000cec956a9d25
libxul.so`js::frontend::GeneralParser<js::frontend::FullParseHandler,
mozilla::Utf8Unit>::statementList(js::frontend::YieldHandling) + 1445
    frame #13: 0x00000cec957098a6
libxul.so`js::frontend::Parser<js::frontend::FullParseHandler,
mozilla::Utf8Unit>::globalBody(js::frontend::GlobalSharedContext*) + 262
    frame #14: 0x00000cec9572bcd1 libxul.so`bool
CompileGlobalScriptToStencilAndMaybeInstantiate<mozilla::Utf8Unit>(JSContext*,
js::frontend::CompilationInput&, JS::SourceText<mozilla::Utf8Unit>&,
js::ScopeKind,
mozilla::Variant<mozilla::UniquePtr<js::frontend::ExtensibleCompilationStencil,
JS::DeletePolicy<js::frontend::ExtensibleCompilationStencil> >,
mozilla::UniquePtr<js::frontend::CompilationStencil,
JS::DeletePolicy<js::frontend::CompilationStencil> >,
js::frontend::CompilationGCOutput*>&) + 577
    frame #15: 0x00000cec95710e54
libxul.so`js::frontend::CompileGlobalScriptToStencil(JSContext*,
js::frontend::CompilationInput&, JS::SourceText<mozilla::Utf8Unit>&,
js::ScopeKind) + 68
    frame #16: 0x00000cec9551860c
libxul.so`JSRuntime::initSelfHosting(JSContext*, mozilla::Span<unsigned char
const, 18446744073709551615ul>, bool (*)(JSContext*, mozilla::Span<unsigned
char const, 18446744073709551615ul>)) + 1484
    frame #17: 0x00000cec9546838c libxul.so`JS::InitSelfHostedCode(JSContext*,
mozilla::Span<unsigned char const, 18446744073709551615ul>, bool
(*)(JSContext*, mozilla::Span<unsigned char const, 18446744073709551615ul>)) +
108
    frame #18: 0x00000cec92481555 libxul.so`XPCJSContext::NewXPCJSContext() +
2133
    frame #19: 0x00000cec924ad259 libxul.so`xpc::InitializeJSContext() + 9
    frame #20: 0x00000cec95252927 libxul.so`XREMain::XRE_main(int, char**,
mozilla::BootstrapConfig const&) + 12647
    frame #21: 0x00000cec952536ac libxul.so`XRE_main(int, char**,
mozilla::BootstrapConfig const&) + 172
    frame #22: 0x00000ce45eaf7149 firefox`main + 1801
    frame #23: 0x00000ce45eaf67c2 firefox`_start(ap=<unavailable>,
cleanup=<unavailable>) at crt1_c.c:75:7
  thread #2, name = 'pool-spawner', stop reason = signal SIGSEGV
    frame #0: 0x00000cec62836a7c libthr.so.3`_umtx_op_err at _umtx_op_err.S:40
    frame #1: 0x00000cec62846270
libthr.so.3`_thr_umtx_timedwait_uint(mtx=<unavailable>, id=0,
clockid=<unavailable>, abstime=<unavailable>, shared=<unavailable>) at
thr_umtx.c:236:10
    frame #2: 0x00000cec6283cf99
libthr.so.3`_thr_sleep(curthread=<unavailable>, clockid=<unavailable>,
abstime=<unavailable>) at thr_kern.c:199:9 [artificial]
    frame #3: 0x00000cec628385ff libthr.so.3`cond_wait_common [inlined]
cond_wait_user(cvp=0x00000cec647b6540, mp=0x00000cec6544d588,
abstime=0x0000000000000000, cancel=1) at thr_cond.c:320:11
    frame #4: 0x00000cec6283854a
libthr.so.3`cond_wait_common(cond=<unavailable>, mutex=<unavailable>,
abstime=0x0000000000000000, cancel=1) at thr_cond.c:380
    frame #5: 0x00000cec7b63f345 libglib-2.0.so.0`g_cond_wait + 37
    frame #6: 0x00000cec7b5b5055
libglib-2.0.so.0`___lldb_unnamed_symbol17$$libglib-2.0.so.0 + 133
    frame #7: 0x00000cec7b615018
libglib-2.0.so.0`___lldb_unnamed_symbol236$$libglib-2.0.so.0 + 72
    frame #8: 0x00000cec7b614a12
libglib-2.0.so.0`___lldb_unnamed_symbol231$$libglib-2.0.so.0 + 66
    frame #9: 0x00000cec62839778
libthr.so.3`thread_start(curthread=0x00000cec6474d700) at thr_create.c:292:16
  thread #3, name = 'gmain', stop reason = signal SIGSEGV
    frame #0: 0x00000cec616b533a libc.so.7`__sys_poll at _poll.S:4
    frame #1: 0x00000cec62844b56 libthr.so.3`__thr_poll(fds=<unavailable>,
nfds=<unavailable>, timeout=<unavailable>) at thr_syscalls.c:338:8
    frame #2: 0x00000cec7b5e9b31
libglib-2.0.so.0`___lldb_unnamed_symbol122$$libglib-2.0.so.0 + 449
    frame #3: 0x00000cec7b5e9c56 libglib-2.0.so.0`g_main_context_iteration +
102
    frame #4: 0x00000cec7b5ebc91
libglib-2.0.so.0`___lldb_unnamed_symbol127$$libglib-2.0.so.0 + 33
    frame #5: 0x00000cec7b614a12
libglib-2.0.so.0`___lldb_unnamed_symbol231$$libglib-2.0.so.0 + 66
    frame #6: 0x00000cec62839778
libthr.so.3`thread_start(curthread=0x00000cec6474de00) at thr_create.c:292:16
  thread #4, name = 'pool-firefox', stop reason = signal SIGSEGV
    frame #0: 0x00000cec62836a7c libthr.so.3`_umtx_op_err at _umtx_op_err.S:40
    frame #1: 0x00000cec62846270
libthr.so.3`_thr_umtx_timedwait_uint(mtx=<unavailable>, id=0,
clockid=<unavailable>, abstime=<unavailable>, shared=<unavailable>) at
thr_umtx.c:236:10
    frame #2: 0x00000cec6283cf99
libthr.so.3`_thr_sleep(curthread=<unavailable>, clockid=<unavailable>,
abstime=<unavailable>) at thr_kern.c:199:9 [artificial]
    frame #3: 0x00000cec628385ff libthr.so.3`cond_wait_common [inlined]
cond_wait_user(cvp=0x00000cec647b64e0, mp=0x00000cec6544d408,
abstime=0x0000000000604ee8, cancel=1) at thr_cond.c:320:11
    frame #4: 0x00000cec6283854a
libthr.so.3`cond_wait_common(cond=<unavailable>, mutex=<unavailable>,
abstime=0x0000000000604ee8, cancel=1) at thr_cond.c:380
    frame #5: 0x00000cec7b63f4f7 libglib-2.0.so.0`g_cond_wait_until + 119
    frame #6: 0x00000cec7b5b5076
libglib-2.0.so.0`___lldb_unnamed_symbol17$$libglib-2.0.so.0 + 166
    frame #7: 0x00000cec7b615c3a
libglib-2.0.so.0`___lldb_unnamed_symbol239$$libglib-2.0.so.0 + 106
    frame #8: 0x00000cec7b614a12
libglib-2.0.so.0`___lldb_unnamed_symbol231$$libglib-2.0.so.0 + 66
    frame #9: 0x00000cec62839778
libthr.so.3`thread_start(curthread=0x00000ceca4d3a000) at thr_create.c:292:16
  thread #5, name = 'gdbus', stop reason = signal SIGSEGV
    frame #0: 0x00000cec616b533a libc.so.7`__sys_poll at _poll.S:4
    frame #1: 0x00000cec62844b56 libthr.so.3`__thr_poll(fds=<unavailable>,
nfds=<unavailable>, timeout=<unavailable>) at thr_syscalls.c:338:8
    frame #2: 0x00000cec7b5e9b31
libglib-2.0.so.0`___lldb_unnamed_symbol122$$libglib-2.0.so.0 + 449
    frame #3: 0x00000cec7b5e9eda libglib-2.0.so.0`g_main_loop_run + 234
    frame #4: 0x00000cec78aa3e0b
libgio-2.0.so.0`___lldb_unnamed_symbol2764$$libgio-2.0.so.0 + 27
    frame #5: 0x00000cec7b614a12
libglib-2.0.so.0`___lldb_unnamed_symbol231$$libglib-2.0.so.0 + 66
    frame #6: 0x00000cec62839778
libthr.so.3`thread_start(curthread=0x00000ceca92c9000) at thr_create.c:292:16
  thread #6, name = 'dconf worker', stop reason = signal SIGSEGV
    frame #0: 0x00000cec616b533a libc.so.7`__sys_poll at _poll.S:4
    frame #1: 0x00000cec62844b56 libthr.so.3`__thr_poll(fds=<unavailable>,
nfds=<unavailable>, timeout=<unavailable>) at thr_syscalls.c:338:8
    frame #2: 0x00000cec7b5e9b31
libglib-2.0.so.0`___lldb_unnamed_symbol122$$libglib-2.0.so.0 + 449
    frame #3: 0x00000cec7b5e9c56 libglib-2.0.so.0`g_main_context_iteration +
102
    frame #4: 0x00000cecaa03e2bd
libdconfsettings.so`___lldb_unnamed_symbol78$$libdconfsettings.so + 29
    frame #5: 0x00000cec7b614a12
libglib-2.0.so.0`___lldb_unnamed_symbol231$$libglib-2.0.so.0 + 66
    frame #6: 0x00000cec62839778
libthr.so.3`thread_start(curthread=0x00000cec6474e500) at thr_create.c:292:16
  thread #7, name = 'IPC I/O Parent', stop reason = signal SIGSEGV
    frame #0: 0x00000cec616b529a libc.so.7`__sys_kevent at _kevent.S:4
    frame #1: 0x00000cec628450f3 libthr.so.3`__thr_kevent(kq=15,
changelist=0x00000cecb07db000, nchanges=1, eventlist=0x00000cecb07dc000,
nevents=64, timeout=<unavailable>) at thr_syscalls.c:400:8
    frame #2: 0x00000cec9ffb9d5f
libevent-2.1.so.7`___lldb_unnamed_symbol98$$libevent-2.1.so.7 + 847
    frame #3: 0x00000cec9ffadf93 libevent-2.1.so.7`event_base_loop + 963
    frame #4: 0x00000cec920d9840
libxul.so`base::MessagePumpLibevent::Run(base::MessagePump::Delegate*) + 368
    frame #5: 0x00000cec920d7de8 libxul.so`MessageLoop::Run() + 88
    frame #6: 0x00000cec920e147a libxul.so`base::Thread::ThreadMain() + 522
    frame #7: 0x00000cec920de6aa libxul.so`ThreadFunc(void*) + 10
    frame #8: 0x00000cec62839778
libthr.so.3`thread_start(curthread=0x00000cec6474f300) at thr_create.c:292:16
  thread #8, name = 'Timer', stop reason = signal SIGSEGV
    frame #0: 0x00000cec62836a7c libthr.so.3`_umtx_op_err at _umtx_op_err.S:40
    frame #1: 0x00000cec62846270
libthr.so.3`_thr_umtx_timedwait_uint(mtx=<unavailable>, id=0,
clockid=<unavailable>, abstime=<unavailable>, shared=<unavailable>) at
thr_umtx.c:236:10
    frame #2: 0x00000cec6283cf99
libthr.so.3`_thr_sleep(curthread=<unavailable>, clockid=<unavailable>,
abstime=<unavailable>) at thr_kern.c:199:9 [artificial]
    frame #3: 0x00000cec628385ff libthr.so.3`cond_wait_common [inlined]
cond_wait_user(cvp=0x00000cec6489f880, mp=0x00000cec6545de88,
abstime=0x0000000000a88b60, cancel=1) at thr_cond.c:320:11
    frame #4: 0x00000cec6283854a
libthr.so.3`cond_wait_common(cond=<unavailable>, mutex=<unavailable>,
abstime=0x0000000000a88b60, cancel=1) at thr_cond.c:380
    frame #5: 0x00000ce45eb27774
firefox`mozilla::detail::ConditionVariableImpl::wait_for(mozilla::detail::MutexImpl&,
mozilla::BaseTimeDuration<mozilla::TimeDurationValueCalculator> const&) + 356
    frame #6: 0x00000cec91cc260c libxul.so`TimerThread::Run() + 316
    frame #7: 0x00000cec91cc7df7 libxul.so`nsThread::ProcessNextEvent(bool,
bool*) + 2199
    frame #8: 0x00000cec91ccc5eb libxul.so`NS_ProcessNextEvent(nsIThread*,
bool) + 75
    frame #9: 0x00000cec921210d8
libxul.so`mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*)
+ 136
    frame #10: 0x00000cec920d7de8 libxul.so`MessageLoop::Run() + 88
    frame #11: 0x00000cec91cc5a19 libxul.so`nsThread::ThreadFunc(void*) + 297
    frame #12: 0x00000cec9b28719d
libnspr4.so`___lldb_unnamed_symbol183$$libnspr4.so + 221
    frame #13: 0x00000cec62839778
libthr.so.3`thread_start(curthread=0x00000cec64750100) at thr_create.c:292:16
  thread #9, name = 'Socket Thread', stop reason = signal SIGSEGV
    frame #0: 0x00000cec616b533a libc.so.7`__sys_poll at _poll.S:4
    frame #1: 0x00000cec62844b56 libthr.so.3`__thr_poll(fds=<unavailable>,
nfds=<unavailable>, timeout=<unavailable>) at thr_syscalls.c:338:8
    frame #2: 0x00000cec9b281c82 libnspr4.so`PR_Poll + 1202
    frame #3: 0x00000cec91deaacb
libxul.so`mozilla::net::nsSocketTransportService::Run() + 6011
    frame #4: 0x00000cec91deb47d libxul.so`non-virtual thunk to
mozilla::net::nsSocketTransportService::Run() + 13
    frame #5: 0x00000cec91cc7df7 libxul.so`nsThread::ProcessNextEvent(bool,
bool*) + 2199
    frame #6: 0x00000cec91ccc5eb libxul.so`NS_ProcessNextEvent(nsIThread*,
bool) + 75
    frame #7: 0x00000cec921210d8
libxul.so`mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*)
+ 136
    frame #8: 0x00000cec920d7de8 libxul.so`MessageLoop::Run() + 88
    frame #9: 0x00000cec91cc5a19 libxul.so`nsThread::ThreadFunc(void*) + 297
    frame #10: 0x00000cec9b28719d
libnspr4.so`___lldb_unnamed_symbol183$$libnspr4.so + 221
    frame #11: 0x00000cec62839778
libthr.so.3`thread_start(curthread=0x00000cec64750800) at thr_create.c:292:16
  thread #10, name = 'Permission', stop reason = signal SIGSEGV
    frame #0: 0x00000cec62836a7c libthr.so.3`_umtx_op_err at _umtx_op_err.S:40
    frame #1: 0x00000cec62846270
libthr.so.3`_thr_umtx_timedwait_uint(mtx=<unavailable>, id=0,
clockid=<unavailable>, abstime=<unavailable>, shared=<unavailable>) at
thr_umtx.c:236:10
    frame #2: 0x00000cec6283cf99
libthr.so.3`_thr_sleep(curthread=<unavailable>, clockid=<unavailable>,
abstime=<unavailable>) at thr_kern.c:199:9 [artificial]
    frame #3: 0x00000cec628385ff libthr.so.3`cond_wait_common [inlined]
cond_wait_user(cvp=0x00000cecaf17e760, mp=0x00000cec65461c88,
abstime=0x0000000000000000, cancel=1) at thr_cond.c:320:11
    frame #4: 0x00000cec6283854a
libthr.so.3`cond_wait_common(cond=<unavailable>, mutex=<unavailable>,
abstime=0x0000000000000000, cancel=1) at thr_cond.c:380
    frame #5: 0x00000ce45eb275e9
firefox`mozilla::detail::ConditionVariableImpl::wait(mozilla::detail::MutexImpl&)
+ 9
    frame #6: 0x00000cec91cc0009
libxul.so`mozilla::ThreadEventQueue::GetEvent(bool,
mozilla::BaseTimeDuration<mozilla::TimeDurationValueCalculator>*) + 281
    frame #7: 0x00000cec91cc7996 libxul.so`nsThread::ProcessNextEvent(bool,
bool*) + 1078
    frame #8: 0x00000cec91ccc5eb libxul.so`NS_ProcessNextEvent(nsIThread*,
bool) + 75
    frame #9: 0x00000cec9212114c
libxul.so`mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*)
+ 252
    frame #10: 0x00000cec920d7de8 libxul.so`MessageLoop::Run() + 88
    frame #11: 0x00000cec91cc5a19 libxul.so`nsThread::ThreadFunc(void*) + 297
    frame #12: 0x00000cec9b28719d
libnspr4.so`___lldb_unnamed_symbol183$$libnspr4.so + 221
    frame #13: 0x00000cec62839778
libthr.so.3`thread_start(curthread=0x00000cec64751600) at thr_create.c:292:16
  thread #11, name = 'JS Watchdog', stop reason = signal SIGSEGV
    frame #0: 0x00000cec62836a7c libthr.so.3`_umtx_op_err at _umtx_op_err.S:40
    frame #1: 0x00000cec62846270
libthr.so.3`_thr_umtx_timedwait_uint(mtx=<unavailable>, id=0,
clockid=<unavailable>, abstime=<unavailable>, shared=<unavailable>) at
thr_umtx.c:236:10
    frame #2: 0x00000cec6283cf99
libthr.so.3`_thr_sleep(curthread=<unavailable>, clockid=<unavailable>,
abstime=<unavailable>) at thr_kern.c:199:9 [artificial]
    frame #3: 0x00000cec628385ff libthr.so.3`cond_wait_common [inlined]
cond_wait_user(cvp=0x00000cec64891e20, mp=0x00000cec65468e88,
abstime=0x0000000000b13ed0, cancel=1) at thr_cond.c:320:11
    frame #4: 0x00000cec6283854a
libthr.so.3`cond_wait_common(cond=<unavailable>, mutex=<unavailable>,
abstime=0x0000000000b13ed0, cancel=1) at thr_cond.c:380
    frame #5: 0x00000cec9b27f90a libnspr4.so`PR_WaitCondVar + 234
    frame #6: 0x00000cec92491dba libxul.so`WatchdogMain(void*) + 250
    frame #7: 0x00000cec9b28719d
libnspr4.so`___lldb_unnamed_symbol183$$libnspr4.so + 221
    frame #8: 0x00000cec62839778
libthr.so.3`thread_start(curthread=0x00000cec64752400) at thr_create.c:292:16

-- 
You are receiving this mail because:
You are the assignee for the bug.