Closed Bug 1551317 Opened 5 years ago Closed 5 years ago

Thunderbird often locks on Mac just after sending an email

Categories

(Thunderbird :: General, defect)

x86_64
macOS
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1381485

People

(Reporter: ludovic.rousseau, Unassigned)

Details

(Keywords: hang)

Attachments

(1 file)

Attached file logs.txt

Thunderbird 60.6.1 on macOS Mojave 10.14.4

Just after sending an email I have thunderbird that is completely locked.
This happens in 20% to 50% of cases. I then get the macOS color wheel and can't do anything except a "force quit" of the program.
The email is correctly sent so at least no data is lost.

I don't know exactly when this problem started to appear. Maybe after an upgrade of Thunderbird or an upgrade of macOS. Sorry.

I used lldb to examine the process when locked.
It looks like Thunderbird is blocked my a mutex used by OpenGL.

I will install Thunderbird 67.0b3 to see I still get the problem.

If you want me to run specific lldb commands or something else on a locked thunderbird just tell me.

$ lldb -p 1434
(lldb) process attach --pid 1434
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py", line 52, in <module>
import weakref
File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/weakref.py", line 14, in <module>
from _weakref import (
ImportError: cannot import name _remove_dead_weakref
Process 1434 stopped

  • thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
    frame #0: 0x00007fff7ac23f06 libsystem_kernel.dylib__psynch_mutexwait + 10 libsystem_kernel.dylib__psynch_mutexwait:
    -> 0x7fff7ac23f06 <+10>: jae 0x7fff7ac23f10 ; <+20>
    0x7fff7ac23f08 <+12>: movq %rax, %rdi
    0x7fff7ac23f0b <+15>: jmp 0x7fff7ac21457 ; cerror_nocancel
    0x7fff7ac23f10 <+20>: retq
    Target 0: (thunderbird) stopped.

Executable module set to "/Applications/Thunderbird.app/Contents/MacOS/thunderbird".
Architecture set to: x86_64h-apple-macosx-.
(lldb) bt

  • thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
    • frame #0: 0x00007fff7ac23f06 libsystem_kernel.dylib__psynch_mutexwait + 10 frame #1: 0x00007fff7acdad52 libsystem_pthread.dylib_pthread_mutex_firstfit_lock_wait + 96
      frame #2: 0x00007fff7acd84cd libsystem_pthread.dylib_pthread_mutex_firstfit_lock_slow + 222 frame #3: 0x00007fff582a0f61 OpenGLCGLClearDrawable + 44
      frame #4: 0x00007fff4e6d6af6 CoreFoundation__CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12 frame #5: 0x00007fff4e6d6a70 CoreFoundation___CFXRegistrationPost_block_invoke + 63
      frame #6: 0x00007fff4e6d69da CoreFoundation_CFXRegistrationPost + 404 frame #7: 0x00007fff4e6dee88 CoreFoundation___CFXNotificationPost_block_invoke + 87
      frame #8: 0x00007fff4e6478d4 CoreFoundation-[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1642 frame #9: 0x00007fff4e646c87 CoreFoundation_CFXNotificationPost + 732
      frame #10: 0x00007fff508bf217 Foundation-[NSNotificationCenter postNotificationName:object:userInfo:] + 66 frame #11: 0x00007fff4c02c737 AppKit-[NSSurface _disposeSurface] + 132
      frame #12: 0x00007fff4c02c3b4 AppKit-[NSSurface setWindow:] + 50 frame #13: 0x00007fff4bd72a62 AppKit-[NSView _setWindow:] + 2309
      frame #14: 0x00007fff4bd73741 AppKit-[NSView removeFromSuperview] + 164 frame #15: 0x000000010de9fc11 XUL___lldb_unnamed_symbol150319$$XUL + 17
      frame #16: 0x00007fff5095d972 Foundation__NSThreadPerformPerform + 328 frame #17: 0x00007fff4e6905e3 CoreFoundationCFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17
      frame #18: 0x00007fff4e690589 CoreFoundation__CFRunLoopDoSource0 + 108 frame #19: 0x00007fff4e673f3b CoreFoundation__CFRunLoopDoSources0 + 195
      frame #20: 0x00007fff4e673505 CoreFoundation__CFRunLoopRun + 1189 frame #21: 0x00007fff4e672e0e CoreFoundationCFRunLoopRunSpecific + 455
      frame #22: 0x00007fff4d95f9db HIToolboxRunCurrentEventLoopInMode + 292 frame #23: 0x00007fff4d95f715 HIToolboxReceiveNextEventCommon + 603
      frame #24: 0x00007fff4d95f4a6 HIToolbox_BlockUntilNextEventMatchingListInModeWithFilter + 64 frame #25: 0x00007fff4bcf9ffb AppKit_DPSNextEvent + 965
      frame #26: 0x00007fff4bcf8d93 AppKit-[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1361 frame #27: 0x000000010deced01 XUL___lldb_unnamed_symbol150765$$XUL + 81
      frame #28: 0x00007fff4bcf2eb0 AppKit-[NSApplication run] + 699 frame #29: 0x000000010decfb7c XUL___lldb_unnamed_symbol150780$$XUL + 236
      frame #30: 0x000000010ef293bf XUL___lldb_unnamed_symbol201223$$XUL + 63 frame #31: 0x000000010efd1875 XUL___lldb_unnamed_symbol203910$$XUL + 3477
      frame #32: 0x000000010efd214e XUL___lldb_unnamed_symbol203912$$XUL + 1150 frame #33: 0x000000010efd2838 XUL___lldb_unnamed_symbol203915$$XUL + 200
      frame #34: 0x0000000105584078 thunderbird___lldb_unnamed_symbol2$$thunderbird + 792 frame #35: 0x0000000105583d34 thunderbirdstart + 52

A complete list of running threads and thread backtraces is also attached.

Sounds like bug 1381485 and bug 1525001 (where running beta helped)

Nomis, you are running Mohave - have you seen such problems? Running beta on a daily basis?

Flags: needinfo?(Nomis101)

(In reply to Wayne Mery (:wsmwk) from comment #1)

Nomis, you are running Mohave - have you seen such problems? Running beta on a daily basis?

I use Thunderbird 67.0b3 on Mojave at a daily basis and have never seen this. But I use POP3, not IMAP.

Flags: needinfo?(Nomis101)

The problem is when I send an email.
I configured Thunderbird to Bcc me and store a copy in Sent of my local folder. So IMAP should not be involved when sending an email.

After reading bug 1525001, the fact that I put another application in foreground (and then TB in background) may be linked to the problem. I will try to keep TB in foreground when sending email to see if I can still reproduce the problem.

That is perfect if the problem is not present in the current 67.0b3 beta version.
I will wait for the release of a new stable Thunderbird.

See Also: → 1381485

Hi,
version 60.7.0 (64-bit) using gmail account - pop
It has happen a number of times in the last few months. Trying to pay more attention lately. Today's crash I know for sure I was replying to an email, and rather certain that has always been the case for me. When I hit sent, I went back to the main window to selection another message to read and got the threaded circling wheel. MacBookPro Mojave 10.14.5. The update to 10.14.5 was last week. This happen before the update, possible before my upgrade to Mohave. I do know it was always after a send, almost certain each time the send was regarding a reply, and the send did not indicate it had finished before I got the not responding wheel. The email however, and I will check today to verify with the to-person, but almost sure messages always send before crash.

Thanks to the team for your work. I have used Thunderbird forever.

ReferenceError: assignment to undeclared variable msgHdr[Learn More] SpotlightIntegration.js:805:9
TypeError: this.chromeUtilsWindow.openUILinkIn is not a function[Learn More] hudservice.js:387:7
uncaught exception: 2147746065 autosync.js:206:13

Thunderbird locked again today. Same circumstance as before. I did a reply to a message in my inbox, when I sent it, it locked up. Not sure what to look for in the logs, I did manage to get the above from error logs.

If there is something else that I can do to get more information please let me know. This is not a huge problem, today was the first lock up since my last post 22 days ago.

Ludovic above wrote this, I have the exact same configuration.
I configured Thunderbird to Bcc me and store a copy in Sent of my local folder.

The email does sent.

Hmm, some problem with Spotlight integration. Can you switch that off?
In the Advanced Options, under General, System Integration: Allow Spotlight to search messages.
Sorry, I'm not on a Mac, so I don't know the exact location/wording.

Flags: needinfo?(benc)

I did as suggested. then went to email Jorg a note about it. When I hit send it locked up again! I did not expect that for a few weeks.

Note in System preferences I turned off spotlight for messages but I did not re-start Thunderbird.
Here is what I copied out of the log this time:

While creating services from category 'profile-after-change', could not create service for entry 'calendar-backend-loader', contract ID 'service,@mozilla.org/calendar/backend-loader;1'
TypeError: IETprefs.getBranch is not a function[Learn More] menufunctions.js:46:15
Use of Mutation Events is deprecated. Use MutationObserver instead. calendar-widgets.xml:512:20
ReferenceError: assignment to undeclared variable msgHdr[Learn More] SpotlightIntegration.js:805:9
uncaught exception: 2147746065 autosync.js:206:13

Well, the suggestion with the search integration was just a shot in the dark. If you turned it off, I wonder why we still see an error in SpotlightIntegration.js.

Also, menufunctions.js is not TB source code, looks like some add-on is interfering here. Can you try with all add-ons switched off, see Help menu. What's IET?

I had two add-ons. Have no idea why I have them.

ImportExportTools and Lightening

I gladly disabled both.

Enable Spotlight for messages again.

I started Thunderbird (60.7.1) from a Terminal window to get some log.
I got the lock problem but nothing interesting in the logs:

$ /Applications/Thunderbird.app/Contents/MacOS/thunderbird
2019-06-18 18:13:50.949 thunderbird[2611:41724] [Accounts] Failed to update account with identifier C5DCE0C3-4F25-48B0-84EF-1857F2B395AD, error: Error Domain=ABAddressBookErrorDomain Code=1002 "(null)"
2019-06-18 18:13:50.955 thunderbird[2611:41724] [Accounts] Failed to update account with identifier EF34560A-39AC-4866-AEE9-E6CA66C40BF3, error: Error Domain=ABAddressBookErrorDomain Code=1002 "(null)"
2019-06-18 18:13:50.961 thunderbird[2611:41724] [Accounts] Failed to update account with identifier C6FC956A-968A-4799-AF6E-36DDD4410AF4, error: Error Domain=ABAddressBookErrorDomain Code=1002 "(null)"
Terminated: 15

I have only 1 extension enabled: "Mail Redirect". And no plugin.

As I said in comment #8, menufunctions.js is not part of the TB source code, so it must be an add-on, IETprefs is from the Import/Export Tools add-on.

The string ABAddressBookErrorDomain is not in the TB code base:
https://searchfox.org/comm-central/search?q=ABAddressBookErrorDomain&case=false&regexp=false&path=
so maybe that's from "Mail Redirect".

Does it lock up with the add-on disabled?

ABAddressBookErrorDomain is a macOS error code.
https://developer.apple.com/documentation/addressbook/abaddressbookerrordomain?language=objc

I disabled the "Mail Redirect" for now.

I disabled the "Mail Redirect" extension but I still get the lock sometimes.
Same problem:

(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
  * frame #0: 0x00007fff70f71f06 libsystem_kernel.dylib`__psynch_mutexwait + 10
    frame #1: 0x00007fff7102ed52 libsystem_pthread.dylib`_pthread_mutex_firstfit_lock_wait + 96
    frame #2: 0x00007fff7102c4cd libsystem_pthread.dylib`_pthread_mutex_firstfit_lock_slow + 222
    frame #3: 0x00007fff4eb6af61 OpenGL`CGLClearDrawable + 44
    frame #4: 0x00007fff44f6f596 CoreFoundation`__CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
    frame #5: 0x00007fff44f6f510 CoreFoundation`___CFXRegistrationPost_block_invoke + 63
    frame #6: 0x00007fff44f6f47a CoreFoundation`_CFXRegistrationPost + 404
    frame #7: 0x00007fff44f77928 CoreFoundation`___CFXNotificationPost_block_invoke + 87
    frame #8: 0x00007fff44ee0384 CoreFoundation`-[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1642
    frame #9: 0x00007fff44edf737 CoreFoundation`_CFXNotificationPost + 732
    frame #10: 0x00007fff4716506b Foundation`-[NSNotificationCenter postNotificationName:object:userInfo:] + 66
    frame #11: 0x00007fff428c40fb AppKit`-[NSSurface _disposeSurface] + 132
    frame #12: 0x00007fff428c3d78 AppKit`-[NSSurface setWindow:] + 50
    frame #13: 0x00007fff4260a3e6 AppKit`-[NSView _setWindow:] + 2309
    frame #14: 0x00007fff4260b0c9 AppKit`-[NSView removeFromSuperview] + 164
    frame #15: 0x0000000109596851 XUL`___lldb_unnamed_symbol150331$$XUL + 17
    frame #16: 0x00007fff472037f2 Foundation`__NSThreadPerformPerform + 328
    frame #17: 0x00007fff44f29083 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
    frame #18: 0x00007fff44f29029 CoreFoundation`__CFRunLoopDoSource0 + 108
    frame #19: 0x00007fff44f0c9eb CoreFoundation`__CFRunLoopDoSources0 + 195
    frame #20: 0x00007fff44f0bfb5 CoreFoundation`__CFRunLoopRun + 1189
    frame #21: 0x00007fff44f0b8be CoreFoundation`CFRunLoopRunSpecific + 455
    frame #22: 0x00007fff441f796b HIToolbox`RunCurrentEventLoopInMode + 292
    frame #23: 0x00007fff441f76a5 HIToolbox`ReceiveNextEventCommon + 603
    frame #24: 0x00007fff441f7436 HIToolbox`_BlockUntilNextEventMatchingListInModeWithFilter + 64
    frame #25: 0x00007fff42591987 AppKit`_DPSNextEvent + 965
    frame #26: 0x00007fff4259071f AppKit`-[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1361
    frame #27: 0x00000001095c5941 XUL`___lldb_unnamed_symbol150777$$XUL + 81
    frame #28: 0x00007fff4258a83c AppKit`-[NSApplication run] + 699
    frame #29: 0x00000001095c67bc XUL`___lldb_unnamed_symbol150792$$XUL + 236
    frame #30: 0x000000010a62035f XUL`___lldb_unnamed_symbol201235$$XUL + 63
    frame #31: 0x000000010a6c88b5 XUL`___lldb_unnamed_symbol203922$$XUL + 3477
    frame #32: 0x000000010a6c918e XUL`___lldb_unnamed_symbol203924$$XUL + 1150
    frame #33: 0x000000010a6c9878 XUL`___lldb_unnamed_symbol203927$$XUL + 200
    frame #34: 0x00000001033a6078 thunderbird`___lldb_unnamed_symbol2$$thunderbird + 792
    frame #35: 0x00000001033a5d34 thunderbird`start + 52
(lldb) 

Maybe I get the problem more often or at all if I switch to another window/application while Thunderbird is sending the email.

Sorry, I'm not on Mac either, but starting at ABAddressBookErrorDomain, I did notice that TB does seem to have some integration with the MacOS AddressBook framework (eg, see comm/mailnews/addrbook/src/nsAbOSXDirectory.mm). Which you'd expect.

That framework seems to be deprecated on MacOS 10.11 and above (Mojave is 10.14).
From https://developer.apple.com/documentation/addressbook :

Important

Do not use the AddressBook framework in macOS 10.11 and later. Use the APIs defined in the Contacts framework instead.

Could that be a factor?
I can't find any concrete references to the old AddressBook framework being killed off completely though (and I'd imagine if they did there'd be a lot of disruption).

(And to the mac folk on here: should we be following that advice and moving to the Contacts framework?)

Flags: needinfo?(benc)

Do not use the AddressBook framework in macOS 10.11 and later. Use the APIs defined in the Contacts framework instead.

If that includes Bug 1332246 ** (which I remember well), then certainly could be a factor. ** Crash with MacOS 10.11 when attempting to update Mac OS X address book [ @libsystem_kernel.dylib@0x16f06] via nsAbOSXCard::Update - among other Mac issues in recent versions

Severity: normal → critical
Keywords: hang
Summary: Thunderbird often locks just after sending an email → Thunderbird often locks on Mac just after sending an email

I know I brought up the issue of possible badness with the addressbook framework, but I'd take my warning with a grain of salt ;-)

I don't think it's even officially "Deprecated", there's just a warning saying to use the contacts framework instead for newer OSes (I'm assuming it's part macOS/iOS unification efforts).
I can't see how they'd get away screwing up the addressbook framework so that a whole bunch of existing addressbook-using apps suddenly start crashing.
And if the addressbook framework was completely gone, then TB wouldn't even start up, right?

There's a list of system frameworks here - the deprecated ones seem to be well marked as such:
https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/OSX_Technology_Overview/SystemFrameworks/SystemFrameworks.html

I have been running without a crash for 1 or 2 months. Today it crash when I selected a message in the INBOX and in the Message window selected EDIT AS New. I made changes only in the body and hit send. It then locked up. The message did get sent however.

One thing comes to mind. Some where about the same time of my last crash, but after, I removed the Sophos free app that I have run for years. Last week, about 2 days ago, download it again, and started using the free 30 day trial version.

Is that a clue? I do not know, but I did go about 2 months since my last crash.
This is from my last input 2 months back:
I had two add-ons. Have no idea why I have them.
ImportExportTools and Lightening
I gladly disabled both.
Enable Spotlight for messages again.

I forgot what log I might could get from the system for you. If it would help to dump some log for you, let me know.

It looks like Thunderbird is blocked my a mutex used by OpenGL.

This is bug 1381485.

Ben, can you weigh in on bug 1381485 ?

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE
See Also: 1381485
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: