Bug: Thunderbird crashes when setting up gmail on a debug build.
Status: RESOLVED
Priority: --
Resolution: DUPLICATE
Created: 2023-11-15 10:21:29+00:00
Resolved: 2023-11-15 11:20:56+00:00

GetXOAuth2StringShutdownNotifier crashes because the runnable is just leaked.

```
(gdb) bt
#0  0x00007f950a6f37f5 in __GI___clock_nanosleep (clock_id=clock_id@entry=0, flags=flags@entry=0, req=req@entry=0x7f94dbe278f0, rem=rem@entry=0x7f94dbe278f0)
    at ../sysdeps/unix/sysv/linux/clock_nanosleep.c:48
#1  0x00007f950a7058c7 in __GI___nanosleep (req=req@entry=0x7f94dbe278f0, rem=rem@entry=0x7f94dbe278f0) at ../sysdeps/unix/sysv/linux/nanosleep.c:25
#2  0x00007f950a71682e in __sleep (seconds=0) at ../sysdeps/posix/sleep.c:55
#3  0x00007f94ffccff70 in common_crap_handler(int, void const*) (signum=11, aFirstFramePC=<optimized out>) at /home/emilio/src/moz/tb/toolkit/xre/nsSigHandlers.cpp:100
#4  0x00007f94ffcd005d in ah_crap_handler(int) (signum=0) at /home/emilio/src/moz/tb/toolkit/xre/nsSigHandlers.cpp:108
#5  0x00007f94ffca4101 in nsProfileLock::FatalSignalHandler(int, siginfo_t*, void*) (signo=11, info=0x7f94dbe27bf0, context=0x7f94dbe27ac0)
    at /home/emilio/src/moz/tb/toolkit/profile/nsProfileLock.cpp:183
#6  0x00007f950168ebd9 in WasmTrapHandler(int, siginfo_t*, void*) (signum=11, info=0x7f94dbe27bf0, context=0x7f94dbe27ac0) at /home/emilio/src/moz/tb/js/src/wasm/WasmSignalHandlers.cpp:794
#7  0x00007f950a65c710 in <signal handler called> () at /usr/lib/libc.so.6
#8  already_AddRefed<mozilla::Runnable>::~already_AddRefed() (this=<optimized out>) at /home/emilio/src/moz/tb/obj-debug/dist/include/mozilla/AlreadyAddRefed.h:136
#9  mozilla::mailnews::OAuth2ThreadHelper::GetXOAuth2String(nsTSubstring<char>&) (this=0x7f94d4e69fc0, base64Str=<optimized out>)
    at /home/emilio/src/moz/tb/comm/mailnews/imap/src/nsSyncRunnableHelpers.cpp:522
#10 0x00007f94fffed8f9 in nsImapProtocol::AuthLogin(char const*, nsTString<char16_t> const&, unsigned long)
    (this=this@entry=0x7f94ba4b1500, userName=0x7f94d1998268 "ecoal95@gmail.com", aPassword=u"", flag=<optimized out>) at /home/emilio/src/moz/tb/comm/mailnews/imap/src/nsImapProtocol.cpp:5929
#11 0x00007f94fffdc07c in nsImapProtocol::TryToLogon() (this=this@entry=0x7f94ba4b1500) at /home/emilio/src/moz/tb/comm/mailnews/imap/src/nsImapProtocol.cpp:8486
#12 0x00007f94fffdb1ba in nsImapProtocol::ProcessCurrentURL() (this=0x7f94ba4b1500) at /home/emilio/src/moz/tb/comm/mailnews/imap/src/nsImapProtocol.cpp:1987
#13 0x00007f94fffd5a78 in nsImapProtocol::ImapThreadMainLoop() (this=this@entry=0x7f94ba4b1500) at /home/emilio/src/moz/tb/comm/mailnews/imap/src/nsImapProtocol.cpp:1560
#14 0x00007f94fffd560f in nsImapProtocol::RunImapThreadMainLoop() (this=0x7f94ba4b1500) at /home/emilio/src/moz/tb/comm/mailnews/imap/src/nsImapProtocol.cpp:1154
#15 0x00007f94fffff908 in nsImapProtocolMainLoopRunnable::Run() (this=0x7f94d69aaa00) at /home/emilio/src/moz/tb/comm/mailnews/imap/src/nsImapProtocol.cpp:467
#16 0x00007f94f8fef05e in nsThread::ProcessNextEvent(bool, bool*) (this=0x7f94d6dab900, aMayWait=<optimized out>, aResult=0x7f94cf578abf) at /home/emilio/src/moz/tb/xpcom/threads/nsThread.cpp:1192
#17 0x00007f94f8ff536e in NS_ProcessNextEvent(nsIThread*, bool) (aThread=0x7f950a7f8700 <_IO_stdfile_2_lock>, aThread@entry=0x7f94d6dab900, aMayWait=false)
    at /home/emilio/src/moz/tb/xpcom/threads/nsThreadUtils.cpp:480
#18 0x00007f94f9b0ce87 in mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*) (this=0x7f94d90dadc0, aDelegate=0x7f94cf578b80)
    at /home/emilio/src/moz/tb/ipc/glue/MessagePump.cpp:300
#19 0x00007f94f9a4df32 in MessageLoop::RunHandler() (this=0x7f950a7f8700 <_IO_stdfile_2_lock>) at /home/emilio/src/moz/tb/ipc/chromium/src/base/message_loop.cc:363
#20 MessageLoop::Run() (this=0x7f950a7f8700 <_IO_stdfile_2_lock>) at /home/emilio/src/moz/tb/ipc/chromium/src/base/message_loop.cc:345
#21 0x00007f94f8fea4f4 in nsThread::ThreadFunc(void*) (aArg=0x7f94d19b9f40) at /home/emilio/src/moz/tb/xpcom/threads/nsThread.cpp:370
#22 0x00007f95080f96c0 in _pt_root (arg=arg@entry=0x7f94ccfb4b80) at /home/emilio/src/moz/tb/nsprpub/pr/src/pthreads/ptthread.c:201
#23 0x000055740224a79d in set_alt_signal_stack_and_start(PthreadCreateParams*) (params=<optimized out>) at /home/emilio/src/moz/tb/mozglue/interposers/pthread_create_interposer.cpp:81
#24 0x00007f950a6aa9eb in start_thread (arg=<optimized out>) at pthread_create.c:444
#25 0x00007f950a72e7cc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
```