Closed Bug 1662759 Opened 4 years ago Closed 1 year ago

[Mac] When updating from 68.12.0 to 78.2.1, thunderbird hangs high memory about 2 seconds after startup while reading from the Mac system address-book

Categories

(Thunderbird :: Address Book, defect)

Unspecified
macOS
defect

Tracking

(thunderbird_esr78+ affected)

RESOLVED INCOMPLETE
Tracking Status
thunderbird_esr78 + affected

People

(Reporter: spamfaenger, Unassigned)

References

()

Details

(5 keywords, Whiteboard: [workaround: comment 28][dupetome])

Attachments

(10 files)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.2 Safari/605.1.15

Steps to reproduce:

Update from 68.12.0 to 78.2.1 as the gpg integration is now productive.
After installing the update I started Thunderbird.

Actual results:

Shortly after the start (enough time to launch one action like opening the adressbook via a shortcut) Thunderbird hangs and doesn't react to any more input.

From observing it it slowly starts to gobble up more RAM - I have waited until it used about 150GB RAM, then I had to kill it as my system was becoming unresponsive. (This took probably about half an hour).

Observing its stack traces during that time it looked as if Thunderbird was reading from the system adressbook with pretty much all threads.

I was able to reproduce this behaviour reliably.

Expected results:

Thunderbird should just start, and not hang reading the system adressbook. Not sure what kind of accidental exponential behaviour it has while reading addresses, but that should be fixed.

If I can help by providing additional debugging information - I'd like to help.

we do get reports of Mac address book issues.
We fixed such an issue in 78.1.0 in bug 1655685

Dossy, are you running 78, and see this when using 78.2.0 or newer ?

Severity: -- → S2
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(dossy)
OS: Unspecified → macOS
Summary: [Mac] When updating from 68.12.0 to 78.2.1, thunderbird hangs about 2 seconds after start-up while reading from the system address-book → [Mac] When updating from 68.12.0 to 78.2.1, thunderbird hangs high memory about 2 seconds after start-up while reading from the system address-book
Version: 79 → 78

I'm still on 68.12.0 as my daily driver TB, staying on the release update channel.

It looks like the latest beta channel release is 81.0b2? Martin, could you try updating to TB 81 and see if you still see the symptoms you observed?

Flags: needinfo?(dossy)

Andy, are you able to reproduce using 78.something?

Yes, 81.0b2 is the latest beta, but not sure it's a good option for the user. A quicker option may be to set Thunderbird to temporarily not use the Mac address book. Martin, can you find prefs.js in your Thunderbird profile, edit with Thunderbird not running and change ldap_2.servers.osx.dirType to "-1" (-1 is ineffective)

Perhaps another example https://support.mozilla.org/en-US/questions/1302498

Flags: needinfo?(spamfaenger)
Flags: needinfo?(acdp)

I currently have this setting:

-- snip --
ldap_2.servers.osx.dirType;-1
-- snap --

However, when opening the address book window and looking at the file menu it is shown like this (see attached screenshot)

I.e. it indicates that the Adress book is enabled (this is TB 68.12.0)

Updating to the current release 78.2.1 with that setting in the state it is, Thunderbird still hangs with stack traces looking like this (see attached text file and screenshot).

Flags: needinfo?(spamfaenger)
Attached file Analyse von „Thunderbird“.txt (deleted) —

stack traces as text file

Attached image stack-traces.png (deleted) —

stack traces as screenshot

Attached image menu.png (deleted) —

Menu entry showing that TB (old) is undecided about the Mac OS X Address Book

Does anything interesting show in terminal or the error console, starting Thunderbird in terminal with -jsconsole

example -jsconsole output

example -jsconsole output

example -jsconsole output

These are from three separate starts of TB 78.2.1 - sorry I can only provide the screenshots, as the app itself hangs completely.

Today I woke up to Thunderbird 78.4.0 being released and having auto downloaded for me. Now I'm stuck on the same bug, but it's harder (/ impossible?) to go back.

Same symptoms, after start it hangs, looking at what the process is doing, I still see lots of computation loading addresses from system address book, ram Is still slowly being eaten away (at about 1 gigabyte / minute while it is just frozen.

So, what to do? This is a total blocker for Thunderbird usage (for me at least) if ever I've seen one.

Starting TB with -jsconsole now shows this:

Not sure what to make of it, I can reliably reproduce it though.

I'd like to test disabling address book integration from a config file / a config option, but couldn't yet find a suitable option. Could somebody please advise?

Just tried the latest nightly I could find (Thunderbird Daily 84.0a1) and it shows the same behaviour.

Attached file thunderbird-daily-2.txt (deleted) —

Here are some stack traces from 'Activity Monitor' to get some insight into what is going on.

Attached file thunderbird-daily-3.txt (deleted) —

Here are some stack traces from 'Activity Monitor' to get some insight into what is going on.

Attached file thunderbird-daily-1.txt.zip (deleted) —

Here are some stack traces from 'Activity Monitor' to get some insight into what is going on.

Diffing profiles where system address book integration was enabled / disabled found me this setting in prefs.js

-- snip --
user_pref("ldap_2.servers.osx.dirType", -1);
-- snap --

which seems to only be present when adress book integration is disabled.

Adding that to my profile however does not change TBs behaviour. It still hangs.

(In reply to Martin Häcker from comment #16)

I'd like to test disabling address book integration from a config file / a config option, but couldn't yet find a suitable option. Could somebody please advise?

You could try to go into Mac "Systemeinstellungen / Sicherheit / Datenschutz" and then untick Thunderbird on "Kontakte".

Sometimes workarounds are that easy. That worked! Thanks

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

Andy, are you able to reproduce using 78.something?

Yes, 81.0b2 is the latest beta, but not sure it's a good option for the user. A quicker option may be to set Thunderbird to temporarily not use the Mac address book. Martin, can you find prefs.js in your Thunderbird profile, edit with Thunderbird not running and change ldap_2.servers.osx.dirType to "-1"

Perhaps another example https://support.mozilla.org/en-US/questions/1302498

I tested the link to the MAC OS address book, was not working before or would hang TB on start-up, since the fix, think as noted in a version above, it worked with issue after. I have disconnected from this Address book now as dont use it anyway, the MAC version

Flags: needinfo?(acdp)

I confirm this bug. Shortly after starting thunderbird on Mac OS Mojave, I get a spinning beachball and RAM usage starts ballooning, eventually making the whole system unresponsive if I do not kill the process.

Starting Thunderbird from the Terminal, I got this:

2020-11-24 15:50:09.621 thunderbird-bin[16773:338898] [Accounts] Failed to update account with identifier 16248F8A-88C9-4F4A-9D25-65047757F00D, error: Error Domain=ABAddressBookErrorDomain Code=1002 "(null)"

I disabled Thunderbird access to the system address book, as suggested above, and so far it does seem to stop the problem.

Thanks everyone for testing.

To recap, it is Thunderbird-macOS AB initialization/interaction that causes the problem. Settings possibilities are:

  • Changing ldap_2.servers.osx.dirType from 3 to -3, this "disables" the Mac OS X Address Book in Thunderbird, preventing it from displaying and also prevents Thunderbird-macOS AB initialization
  • Changing Contacts privacy settings in macOS preferences (listed below) prevents Thunderbird-macOS AB initialization and is an effective workaround
  • Unchecking "Local Address Books" in Thunderbird preferences, BUT that only affects the use non-ldap address books for compose compose and does not prevent Thunderbird-macOS AB initialization

macOS preferences workaround:

  1. open macOS System preferences
  2. type "privacy"
  3. click privacy settings
  4. click contacts
  5. at the bottom click the lock and provide your password
  6. uncheck the box for thunderbird
  7. restart thunderbird

Geoff,
It is unclear why some Mac users are affected and others not. However, see terminal info in comment 25, and attachments in comment 18 - 20. Is there enough information for you to divine the cause and solution?

Flags: needinfo?(geoff)
Summary: [Mac] When updating from 68.12.0 to 78.2.1, thunderbird hangs high memory about 2 seconds after start-up while reading from the system address-book → [Mac] When updating from 68.12.0 to 78.2.1, thunderbird hangs high memory about 2 seconds after start-up while reading from the Mac system address-book

Sorry I've not managed to figure anything out yet. It looks like the problem is on the OS side of things, rather than ours.

Changing the dirType pref to anything below zero should definitely prevent interaction with the OS address book. It has to be 3 for the code to initialise it to run.

Flags: needinfo?(geoff)

I take it then, no lessons in bug 1655685. :(
Fortunately, not widely reported.

Maybe this can help: Before I saw this bug, when I was using Thunderbird for a long time without restarting it, I saw an increasing number of copies of the system address book in the Adress-Book list.

Also adress lookup became increasingly slower. I am not sure I remember this correctly, but in my memory a restart of Thunderbird fixed that.

Maybe that can be a clue to help find why that happens?

Other than that, I am a programmer by trade - though my C++ days are long gone. Still, if I can help narrow this down? I am pretty sure I can still reliably reproduce this.

By removing the link with the address book, it looks like this is resolved. Thank you

Whiteboard: [workaround: comment 28]
Summary: [Mac] When updating from 68.12.0 to 78.2.1, thunderbird hangs high memory about 2 seconds after start-up while reading from the Mac system address-book → [Mac] When updating from 68.12.0 to 78.2.1, thunderbird hangs high memory about 2 seconds after startup while reading from the Mac system address-book

(In reply to Devuyst Philippe from comment #36)

By removing the link with the address book, it looks like this is resolved. Thank you

Martin is this true for you?
And if the Mac addressbook is linked, you still see high memory?

Flags: needinfo?(spamfaenger)
Status: NEW → RESOLVED
Closed: 1 year ago
Flags: needinfo?(spamfaenger)
Resolution: --- → INCOMPLETE
Whiteboard: [workaround: comment 28] → [workaround: comment 28][dupetome]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: