Bug: Thunderbird crashes when opening the Preferences Window
Status: RESOLVED
Priority: --
Resolution: DUPLICATE
Created: 2020-09-09 09:01:19+00:00
Resolved: 2020-09-09 09:39:24+00:00

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0

Steps to reproduce:

I built TB as follows:

$ hg clone https://hg.mozilla.org/releases/mozilla-esr78 thunderbird-esr78
$ cd thunderbird-esr78
$ hg summary
parent: 600035:9c36779c658a tip
 Bug 1658563 - Backout bug 1466532 on ESR78 to fix LNK files on Windows. r=froydnj, a=RyanVM
branch: default
commit: (clean)
$ hg clone https://hg.mozilla.org/releases/comm-esr78 comm/
$ cd comm
 hg summary
parent: 39837:85fc86689124 tip
 Backed out changeset b7a660c8653e (bug 1661216) for Mochitest failures on win32. r=backout a=rjl
branch: default
commit: (clean)
$ cd ..

I then created thunderbird-esr78/mozconfig with the following content:

ac_add_options --enable-application=comm/mail
ac_add_options --with-app-basename=Thunderbird
ac_add_options --enable-debug
mk_add_options MOZ_OBJDIR=/tmp/thunderbird/obj-@CONFIG_GUESS@
mk_add_options MOZ_MAKE_FLAGS="-j8"

Then I did:

$ ./mach bootstrap
2. Firefox for Desktop
$ ./mach build
$ ./mach run

TB prompts me to enter my account details.  I do so.  Because I use a self-signed certificate, I need to go into preferences and the certificate manager to add my CA's certificate.  When I click on edit -> preferences, the window appears, but TB crashes.  On the terminal, I'm told I can attack to the process using gdb.  When I do, I run bt and I get the following backtrace:

(gdb) bt
#0  0x00007ffb009fe720 in __GI___nanosleep (requested_time=requested_time@entry=0x7fff42241aa0, remaining=remaining@entry=0x7fff42241aa0)
    at ../sysdeps/unix/sysv/linux/nanosleep.c:28
#1  0x00007ffb009fe62a in __sleep (seconds=0) at ../sysdeps/posix/sleep.c:55
#2  0x00007ffaf82338c8 in ah_crap_handler(int) (signum=11) at /home/us/tmp/thunderbird-esr78/toolkit/xre/nsSigHandlers.cpp:95
#3  0x00007ffaf821823e in nsProfileLock::FatalSignalHandler(int, siginfo_t*, void*) (signo=11, info=0x7fff42241d70, context=0x7fff42241c40)
    at /home/us/tmp/thunderbird-esr78/toolkit/profile/nsProfileLock.cpp:177
#4  0x00007ffaf92016f7 in WasmTrapHandler(int, siginfo_t*, void*) (signum=11, info=0x7fff42241d70, context=<optimized out>)
    at /home/us/tmp/thunderbird-esr78/js/src/wasm/WasmSignalHandlers.cpp:963
#5  0x00007ffb00e31730 in <signal handler called> () at /lib/x86_64-linux-gnu/libpthread.so.0
#6  0x00007ffaf6b9a2fa in DOMSecurityMonitor::AuditParsingOfHTMLXMLFragments(nsIPrincipal*, nsTSubstring<char16_t> const&)
    (aPrincipal=0x7ffb00af4680 <_IO_2_1_stderr_>, aFragment=...) at /home/us/tmp/thunderbird-esr78/dom/security/DOMSecurityMonitor.cpp:109
#7  0x00007ffaf55af833 in nsContentUtils::ParseFragmentHTML(nsTSubstring<char16_t> const&, nsIContent*, nsAtom*, int, bool, bool, int)
    (aSourceBuffer=..., aTargetNode=0x7ffae3c0d800, aContextLocalName=0x7ffafa3d2d04 <mozilla::detail::gGkAtoms+62116>, aContextNamespace=3, aQuirks=true, aPreventScriptExecution=false, aFlags=-1) at /home/us/tmp/thunderbird-esr78/dom/base/nsContentUtils.cpp:4811
#8  0x00007ffaf55af6c9 in nsContentUtils::CreateContextualFragment(nsINode*, nsTSubstring<char16_t> const&, bool, mozilla::ErrorResult&)
    (aContextNode=<optimized out>, aFragment=..., aPreventScriptExecution=false, aRv=...) at /home/us/tmp/thunderbird-esr78/dom/base/nsContentUtils.cpp:4654
#9  0x00007ffaf57fcc9d in nsRange::CreateContextualFragment(nsTSubstring<char16_t> const&, mozilla::ErrorResult&) const (this=<optimized out>, aFragment=..., aRv=...)
    at /home/us/tmp/thunderbird-esr78/dom/base/nsRange.cpp:2497
#10 0x00007ffaf5c166c7 in mozilla::dom::Range_Binding::createContextualFragment(JSContext*, JS::Handle<JSObject*>, void*, JSJitMethodCallArgs const&)
    (cx=0x7ffaf2132000, obj=..., void_self=0x7ffae3dc4580, args=...) at /tmp/thunderbird/obj-x86_64-pc-linux-gnu/dom/bindings/RangeBinding.cpp:1328
#11 0x00007ffaf63a2419 in mozilla::dom::binding_detail::GenericMethod<mozilla::dom::binding_detail::NormalThisPolicy, mozilla::dom::binding_detail::ThrowExceptions>(JSContext*, unsigned int, JS::Value*) (cx=0x7ffb00af4680 <_IO_2_1_stderr_>, argc=<optimized out>, vp=<optimized out>)
    at /home/us/tmp/thunderbird-esr78/dom/bindings/BindingUtils.cpp:3197
#12 0x00007ffaf833ecd2 in CallJSNative(JSContext*, bool (*)(JSContext*, unsigned int, JS::Value*), js::CallReason, JS::CallArgs const&)
    (cx=0x7ffaf2132000, native=0x7ffaf63a22e3 <mozilla::dom::binding_detail::GenericMethod<mozilla::dom::binding_detail::NormalThisPolicy, mozilla::dom::binding_detail::ThrowExceptions>(JSContext*, unsigned int, JS::Value*)>, reason=<optimized out>, args=...) at /home/us/tmp/thunderbird-esr78/js/src/vm/Interpreter.cpp:493
#13 0x00007ffaf833e596 in js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason)
    (cx=<optimized out>, args=..., construct=<optimized out>, reason=<optimized out>) at /home/us/tmp/thunderbird-esr78/js/src/vm/Interpreter.cpp:585
#14 0x00007ffaf8333c35 in js::CallFromStack(JSContext*, JS::CallArgs const&) (cx=0x7ffaf2132000, args=...)
    at /home/us/tmp/thunderbird-esr78/js/src/vm/Interpreter.cpp:652
#15 0x00007ffaf8333c35 in Interpret(JSContext*, js::RunState&) (cx=<optimized out>, state=...) at /home/us/tmp/thunderbird-esr78/js/src/vm/Interpreter.cpp:3312
#16 0x00007ffaf8329d50 in js::RunScript(JSContext*, js::RunState&) (cx=0x7ffaf2132000, state=...) at /home/us/tmp/thunderbird-esr78/js/src/vm/Interpreter.cpp:465
#17 0x00007ffaf833e4c9 in js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason)
    (cx=<optimized out>, args=..., construct=<optimized out>, reason=<optimized out>) at /home/us/tmp/thunderbird-esr78/js/src/vm/Interpreter.cpp:620
#18 0x00007ffaf8340200 in js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>, js::CallReason)
    (cx=0x7ffb00af4680 <_IO_2_1_stderr_>, fval=..., thisv=..., args=..., rval=..., reason=js::CallReason::Call)
    at /home/us/tmp/thunderbird-esr78/js/src/vm/Interpreter.cpp:665
#19 0x00007ffaf842519b in JS::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, JS::HandleValueArray const&, JS::MutableHandle<JS::Value>)
    (cx=0x7ffaf2132000, thisv=..., fval=..., args=..., rval=...) at /home/us/tmp/thunderbird-esr78/js/src/jsapi.cpp:2840
#20 0x00007ffaf5f3a7ad in mozilla::dom::IdleRequestCallback::Call(mozilla::dom::BindingCallContext&, JS::Handle<JS::Value>, mozilla::dom::IdleDeadline&, mozilla::ErrorResult&) (this=<optimized out>, cx=..., aThisVal=..., deadline=..., aRv=...) at /tmp/thunderbird/obj-x86_64-pc-linux-gnu/dom/bindings/WindowBinding.cpp:615
#21 0x00007ffaf5646788 in mozilla::dom::IdleRequestCallback::Call(mozilla::dom::IdleDeadline&, mozilla::ErrorResult&, char const*, mozilla::dom::CallbackObject::ExceptionHandling, JS::Realm*) (this=<optimized out>, deadline=..., aRv=..., aExecutionReason=<optimized out>, aExceptionHandling=<optimized out>, aRealm=<optimized out>)
    at /tmp/thunderbird/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/WindowBinding.h:492
#22 0x00007ffaf56f093c in mozilla::dom::IdleRequestCallback::Call(mozilla::dom::IdleDeadline&, char const*)
    (this=0x7ffae3dc8900, deadline=..., aExecutionReason=0x56104997c970 <gMozCrashReason> "\203-:\372\372\177")
    at /tmp/thunderbird/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/WindowBinding.h:505
#23 0x00007ffaf56f093c in mozilla::dom::IdleRequest::IdleRun(nsPIDOMWindowInner*, double, bool)
    (this=<optimized out>, aWindow=<optimized out>, aDeadline=1476.8845509999999, aDidTimeout=<optimized out>)
    at /home/us/tmp/thunderbird-esr78/dom/base/IdleRequest.cpp:62
#24 0x00007ffaf55e3629 in nsGlobalWindowInner::RunIdleRequest(mozilla::dom::IdleRequest*, double, bool)
    (this=<optimized out>, aRequest=<optimized out>, aDeadline=1476.8845509999999, aDidTimeout=false)
    at /home/us/tmp/thunderbird-esr78/dom/base/nsGlobalWindowInner.cpp:662
#25 0x00007ffaf55e2d21 in nsGlobalWindowInner::ExecuteIdleRequest(mozilla::TimeStamp) (this=0x7ffadb1c5c00, aDeadline=...)
    at /home/us/tmp/thunderbird-esr78/dom/base/nsGlobalWindowInner.cpp:690
#26 0x00007ffaf55e2b99 in IdleRequestExecutor::Run() (this=0x7ffae8e6f350) at /home/us/tmp/thunderbird-esr78/dom/base/nsGlobalWindowInner.cpp:531
#27 0x00007ffaf458132a in nsThread::ProcessNextEvent(bool, bool*) (this=<optimized out>, aMayWait=<optimized out>, aResult=0x7fff42243a37)
    at /home/us/tmp/thunderbird-esr78/xpcom/threads/nsThread.cpp:1211
#28 0x00007ffaf4584d45 in NS_ProcessNextEvent(nsIThread*, bool) (aThread=0x7ffb00af4680 <_IO_2_1_stderr_>, aMayWait=false)
    at /home/us/tmp/thunderbird-esr78/xpcom/threads/nsThreadUtils.cpp:501
#29 0x00007ffaf4b4ce52 in mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) (this=<optimized out>, aDelegate=<optimized out>)
    at /home/us/tmp/thunderbird-esr78/ipc/glue/MessagePump.cpp:87
#30 0x00007ffaf4b0096b in MessageLoop::RunInternal() (this=0x7ffaf222c020) at /home/us/tmp/thunderbird-esr78/ipc/chromium/src/base/message_loop.cc:315
#31 0x00007ffaf4b008c6 in MessageLoop::RunHandler() (this=0x7ffaf222c020) at /home/us/tmp/thunderbird-esr78/ipc/chromium/src/base/message_loop.cc:308
#32 0x00007ffaf4b008c6 in MessageLoop::Run() (this=0x7ffaf222c020) at /home/us/tmp/thunderbird-esr78/ipc/chromium/src/base/message_loop.cc:290
#33 0x00007ffaf71291dd in nsBaseAppShell::Run() (this=0x7ffaf226f350) at /home/us/tmp/thunderbird-esr78/widget/nsBaseAppShell.cpp:137
#34 0x00007ffaf814f647 in nsAppStartup::Run() (this=0x7ffaf22921a0) at /home/us/tmp/thunderbird-esr78/toolkit/components/startup/nsAppStartup.cpp:271
#35 0x00007ffaf822d636 in XREMain::XRE_mainRun() (this=<optimized out>) at /home/us/tmp/thunderbird-esr78/toolkit/xre/nsAppRunner.cpp:4665
#36 0x00007ffaf822e1f9 in XREMain::XRE_main(int, char**, mozilla::BootstrapConfig const&)
    (this=<optimized out>, argc=<optimized out>, argv=<optimized out>, aConfig=...) at /home/us/tmp/thunderbird-esr78/toolkit/xre/nsAppRunner.cpp:4812
#37 0x00007ffaf822e7a2 in XRE_main(int, char**, mozilla::BootstrapConfig const&) (argc=11491504, argv=0x0, aConfig=...)
    at /home/us/tmp/thunderbird-esr78/toolkit/xre/nsAppRunner.cpp:4866
#38 0x00005610498ced0c in do_main(int, char**, char**) (argc=11491504, argv=<optimized out>, envp=<optimized out>)
    at /home/us/tmp/thunderbird-esr78/comm/mail/app/nsMailApp.cpp:217
#39 0x00005610498ced0c in main(int, char**, char**) (argc=<optimized out>, argv=<optimized out>, envp=0x7fff42245090)
    at /home/us/tmp/thunderbird-esr78/comm/mail/app/nsMailApp.cpp:324

('bt full' is attached)




Actual results:

TB crashed.


Expected results:

TB should have shown the preferences dialog.