Thunderbird >100% cpu load after being in background for around 20 minutes [macos]
Categories
(Calendar :: General, defect)
Tracking
(thunderbird_esr115 wontfix)
Tracking | Status | |
---|---|---|
thunderbird_esr115 | --- | wontfix |
People
(Reporter: hirayasar, Assigned: mkmelin)
References
Details
(Keywords: perf)
Attachments
(1 file)
Steps to reproduce:
macos sonoma 14.2.1 on M3 max macbook. Thunderbird 115.6.1
Whenever i leave Thunderbird open in the background but with its window closed (default behaviour when you click the close button) it waits for some time then burns through the battery and considerably warms up my laptop. Moment i bring it in foreground power consumption becomes negligible.
I'm syncing 4 inboxes. 2 gmail, 1 outlook, 1 icloud. Only notable thing about them is i dont delete emails so they are pretty large. My personal gmail has been saying 95% of storage used(out of 25 gb afaik) since some time.
Actual results:
You can just about see when it decides to burn power in the battery graph of Activity Monitor.
https://i.imgur.com/Wdw3ERT.png
This is 3 screenshots of "Activity Monitor" as it happens. Coconutbattery shows 24 watts of power use. Also its using 30 gbs of memory.
This is a 100 ms sampling rate profiling over 40 minutes capturing when it happens (around 23 minute mark)
https://share.firefox.dev/47CjsZD
This is a 1 ms sampling rate profiling taken as it happened.
https://share.firefox.dev/3Hpk1Lt
Expected results:
Thunderbird should have idled away in the background.
Comment 1•10 months ago
|
||
julienw indicates we should look at https://searchfox.org/comm-central/source/calendar/providers/caldav/modules/CalDavSession.sys.mjs#85-87
"if there's no window it keeps rescheduling something
it seems to be the case here, as the last window is closed
(the flamegraph in javascript mode pointed to this function)"
Assignee | ||
Comment 2•9 months ago
|
||
I think we can just remove this old workaround.
Nowdays we (normally) prompt for primary password before any window (security.prompt_for_master_password_on_startup).
That has its own issues (see bug 1882214).
But, even so, CalDAV requests do not seem to trigger before we have any window.
Updated•9 months ago
|
Assignee | ||
Updated•9 months ago
|
Comment 3•9 months ago
|
||
(In reply to Magnus Melin [:mkmelin] from comment #2)
Created attachment 9395528 [details]
Bug 1877142 - Avoid 100% CPU trying to get non-existant window. r=#thunderbird-reviewersI think we can just remove this old workaround.
Nowdays we (normally) prompt for primary password before any window (security.prompt_for_master_password_on_startup).
That has its own issues (see bug 1882214).
But, even so, CalDAV requests do not seem to trigger before we have any window.
I'm unclear. Are you fixing the issue of this bug without changing the current default security.prompt_for_master_password_on_startup=true, and the problem of bug 1882214 remains?
Or are you changing the default to false?
Assignee | ||
Comment 4•9 months ago
|
||
I'm was just mentioning this for reference.
This patch just avoids (trying) to wait for a window, which was done to prevent rendering issues in PP dialog for non-window cases 11yrs ago.
The issues it does have at the moment on Mac are unchanged.
Assignee | ||
Updated•9 months ago
|
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/0ba3ac5e8e7d
Avoid 100% CPU trying to get non-existant window. r=leftmostcat
Comment 6•9 months ago
|
||
This breaks calendar/test/browser/browser_calDAV_oAuth.js quite badly. I'll be backing it out at the next merge.
Assignee | ||
Comment 7•9 months ago
|
||
Got the wrong "this". I'll land a bustage-fix.
(In reply to Magnus Melin [:mkmelin] from comment #7)
Got the wrong "this". I'll land a bustage-fix.
Hi, sorry for bothering you. Im not familiar with the language here, could you tell me if the issue is fixed in some current build or is it planned for future? I just tried thunderbird daily 126.0a1 (2024-04-09) and issue persisted. Is there a more granular build i can try?
Thanks in advance
Comment 10•9 months ago
|
||
(In reply to hirayasar from comment #9)
Hi, sorry for bothering you. Im not familiar with the language here, could you tell me if the issue is fixed in some current build ... I just tried thunderbird daily 126.0a1 (2024-04-09) and issue persisted. Is there a more granular build i can try?
Daily builds are created every morning from comm-central. So https://hg.mozilla.org/comm-central/rev/374cc563e54b would have been in daily build 20240411.
So perhaps file a new bug report with a new profile. Thanks.
Assignee | ||
Comment 11•9 months ago
|
||
The fix would be in daily 2024-04-11 and beyond. Note that dailies are disabled atm due to a crash issue.
Reporter | ||
Comment 12•9 months ago
|
||
(In reply to Magnus Melin [:mkmelin] from comment #11)
The fix would be in daily 2024-04-11 and beyond. Note that dailies are disabled atm due to a crash issue.
Thank you, ill try again in a couple days
Description
•