Closed Bug 1882214 Opened 7 months ago Closed 4 months ago

100% CPU and hang when launching on Mac (startup) with primary password enabled and security.prompt_for_master_password_on_startup=true

Categories

(Core :: Widget: Cocoa, defect, P1)

x86_64
macOS
defect

Tracking

()

RESOLVED FIXED
129 Branch
Tracking Status
thunderbird_esr128 --- fixed
firefox128 + fixed
firefox129 + fixed

People

(Reporter: wsmwk, Assigned: aleca)

References

(Regression)

Details

(Keywords: hang, regression)

Attachments

(2 files)

+++ This bug was initially created as a clone of Bug #1768344 +++

This is reported to be happening again on beta. And I can reproduce this with a recent nightly build. security.prompt_for_master_password_on_startup false works. True fails.

A regression range using nightly builds would be very helpful. https://mozilla.github.io/mozregression/

See Also: → 1866098

i had trouble figuring out how to do it with mozregression, so i did the old fashioned way and tried nightlies. Using a newly created profile that works in the january dailies:
2024-01-30-10-28-44-comm-central build works (and many others before that date)
2024-01-31-10-15-54-comm-central build fails

(In reply to Chris Andrichak from comment #1)

i had trouble figuring out how to do it with mozregression, so i did the old fashioned way and tried nightlies. Using a newly created profile that works in the january dailies:
2024-01-30-10-28-44-comm-central build works (and many others before that date)
2024-01-31-10-15-54-comm-central build fails

whoops, it's late and i'm tired. What I really meant is:
2024-01-29-09-44-33-comm-central build works
2024-01-30-10-28-44-comm-central build fails

Bug 1876059 - https://hg.mozilla.org/mozilla-central/rev/144947296f544d85f69a35a8f3d29c2382a3ce14 - looks very suspicious for that. Someone with a mac should try backing out locally to check.
Kai, are you able to check if its that?

Flags: needinfo?(mkmelin+mozilla) → needinfo?(kaie)

(In reply to Magnus Melin [:mkmelin] from comment #4)

Kai, are you able to check if its that?

I've started a local mac build and will test soon.

I can reproduce this bug with my local build.

I can confirm Magnus' theory, backing out
https://hg.mozilla.org/mozilla-central/rev/144947296f544d85f69a35a8f3d29c2382a3ce14
fixes the hang, and allows TB to start.

Flags: needinfo?(kaie)
Regressed by: 1876059
Attached file stack-1882214.txt
Duplicate of this bug: 1881967

A bit off topic, but I've seen various reports lately that security.prompt_for_master_password_on_startup=false doesn't fully work for its intended purpose either (e.g. bug 1881878).

(In reply to Magnus Melin [:mkmelin] from comment #9)

A bit off topic, but I've seen various reports lately that security.prompt_for_master_password_on_startup=~~~false~~~true doesn't fully work for its intended purpose either (e.g. bug 1881878).

I agree

See Also: → 1881878
Summary: 100% CPU and hang when launching on Mac (startup) with primary password enabled and security.prompt_for_master_password_on_startup=false → 100% CPU and hang when launching on Mac (startup) with primary password enabled and security.prompt_for_master_password_on_startup=true

Any progress on this, are Mac users likely to be able to continue beta testing TB in the near future?

We're discussing some options for how to get this fixed in a way that it doesn't keep causing problems.
For testing, as a workaround you can set security.prompt_for_master_password_on_startup false in the prefs.js file

Any updates on this bug? I'd like to keep using my master password. Setting the pref to false allows me to start TB, but for whatever reason causes me to have to re-auth my google account calendar connection twice on startup every time also. I've held back on updates due to that annoyance, but now i'm a couple versions behind.

Alessandro on matrix wrote "I'm currently investigating that from the m-c side, hoping I can find a solution there to accommodate our code in c-c. I will assign someone to that bug with a path forward once I know more."

Blocks: 1843744

I'm investigating a potential solution for this.
NI myself since I'm not sure I can fix it, but at least I don't lose track of it.

Flags: needinfo?(alessandro)

This is necessary for Thunderbird when using a master password on startup.
Per eeejay notes in D199786.

calling InitializeMacApp more than once does nothing.

Assignee: nobody → alessandro
Status: NEW → ASSIGNED
Flags: needinfo?(alessandro)
Attachment #9407137 - Attachment description: Bug 1882214 - Ensure initializeMacApp is called before doStartup for Thunderbird. r=kaie,eeejay → Bug 1882214 - Ensure initializeMacApp is called before the prompt for master password on startup for Thunderbird. r=kaie,eeejay,wsmwk

Alex, will need a try build.

Flags: needinfo?(alessandro)

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

Alex, will need a try build.

A comm-beta 128 build is running here:
https://treeherder.mozilla.org/jobs?repo=try-comm-central&revision=3b5df1d183db04c3165e5864d775365a5e0599c4

Flags: needinfo?(alessandro)

Chris, Brian, Albert,
Would you be able to do a quick check of the try build linked in comment 18?

Flags: needinfo?(chris)
Flags: needinfo?(blmatthews)
Flags: needinfo?(albert)

not clear where i actually download the build from by following that link...
Am going away for a couple weeks soon so if I can't figure out in the next half hour won't be able to for a bit, sorry

Flags: needinfo?(chris)

Intel https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/Z51hm-9ISm6WXV99_FJpVg/runs/0/artifacts/public/build/target.dmg

Wayne, I successfully tested the intel build with a primary password, and I can't reproduce the bug anymore (still occurring with TB 129.0a1 build 20240613101205)
I don't have an Arm mac, so I can't test the other build.

Wayne, I can not reproduce on an Arm mac either.

Flags: needinfo?(albert)

Thanks everyone for testing.

Try build also works for me with security.prompt_for_master_password_on_startup = true, using https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/Z51hm-9ISm6WXV99_FJpVg/runs/0/artifacts/public/build/target.dmg - which is in fact the unified build.

So we have solid testing results and this can land.

This should be landed through lando. I'll do that now

Pushed by mkmelin@iki.fi: https://hg.mozilla.org/integration/autoland/rev/dd427ba7922a Ensure initializeMacApp is called before the prompt for master password on startup for Thunderbird. r=kaie,eeejay,wsmwk

I know I'm late, but I tested on an Intel Mac and couldn't reproduce the problem either.

Flags: needinfo?(blmatthews)
Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → 129 Branch

Hello, we would like to have this fix in Thunderbird 128 ESR.
Would it be possible to uplift this fix tot he 128 beta so we don't miss that train?

Flags: needinfo?(smolnar)
Flags: needinfo?(eitan)

I think mkmelin needs to request an uplift

Flags: needinfo?(eitan) → needinfo?(mkmelin+mozilla)

Comment on attachment 9407137 [details]
Bug 1882214 - Ensure initializeMacApp is called before the prompt for master password on startup for Thunderbird. r=kaie,eeejay,wsmwk

Beta/Release Uplift Approval Request

  • User impact if declined: (I am standing in for Magnus who is PTO)

Mac user with primary password hangs on startup.

  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce: (Thunderbird QA will retest after it lands on beta)
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): 1. Multiple Thunderbird users successfully tested on nightly with no problems found.
  1. ifdefed to Thunderbird, so no impact to Firefox.
  • String changes made/needed:
  • Is Android affected?: No
Attachment #9407137 - Flags: approval-mozilla-beta?
Flags: needinfo?(mkmelin+mozilla)
Flags: needinfo?(smolnar)

Comment on attachment 9407137 [details]
Bug 1882214 - Ensure initializeMacApp is called before the prompt for master password on startup for Thunderbird. r=kaie,eeejay,wsmwk

Approved for 128.0b8

Attachment #9407137 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Component: General → Widget: Cocoa
Product: Thunderbird → Core
Version: Thunderbird 124 → unspecified
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: