Thunderbird consuming 3% CPU, sometimes 100% for up to a minute on linux (fedora) with language packs installed
Categories
(Thunderbird :: OS Integration, defect)
Tracking
(thunderbird_esr91+ affected)
People
(Reporter: pfpschneider, Unassigned)
References
Details
(Keywords: perf)
User Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0
Steps to reproduce:
I run thunderbird as my normal email client. It consumes too much CPU. Sometimes it consumes an entire thread for minutes. This wastes energy and reduces battery life.
Actual results:
Output from top
top - 19:50:25 up 22:17, 1 user, load average: 1.61, 1.63, 1.25
Tasks: 321 total, 1 running, 320 sleeping, 0 stopped, 0 zombie
top - 19:55:32 up 22:22, 1 user, load average: 0.66, 1.26, 1.22
Tasks: 324 total, 1 running, 323 sleeping, 0 stopped, 0 zombie
%Cpu(s): 1.3 us, 1.0 sy, 0.0 ni, 96.9 id, 0.2 wa, 0.4 hi, 0.1 si, 0.0 st
MiB Mem : 15546.4 total, 6242.7 free, 3635.1 used, 5668.7 buff/cache
MiB Swap: 8192.0 total, 8192.0 free, 0.0 used. 10201.2 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1988 pfps 9 -11 302680 55000 7088 S 5.3 0.3 25:27.06 /usr/bin/pipewire-pulse
1313 root 20 0 1541260 164604 111192 S 4.3 1.0 62:03.92 /usr/libexec/Xorg -core -noreset :0 -seat seat0 -auth /run/lightdm/roo+
4371 pfps 20 0 4396008 703380 214076 S 3.3 4.4 268:20.10 /usr/lib64/thunderbird/thunderbird
1987 pfps 9 -11 366648 23016 8904 S 3.0 0.1 14:45.07 /usr/bin/pipewire
Expected results:
Thunderbird should be consuming at least an order of magnitude less CPU.
Comment 1•3 years ago
|
||
Happens after Help > troubleshoot mode ?
Do you have a language pack installed?
Reporter | ||
Comment 2•3 years ago
|
||
I don't have any language packs installed, as far as I know, but there are a lot of language packs that are enabled (and cannot be removed). I don't have any extensions installed, as far as I can tell from the Extensions screen.
I haven't been running in troubleshoot mode but I just turned it on and I'll see what happens.
As far as I can tell Thunderbird consumes lots of CPU at random times. Presumably it is doing some housekeeping or communication but I don't know how to figure out what Thunderbird is doing when it consumes most of a CPU thread. If there were some tools that would tell me what Thunderbird is doing I could try to figure out why Thunderbird is consuming so much CPU.
Reporter | ||
Comment 3•3 years ago
|
||
I ran a simple test. I started Thunderbird and immediately iconified its window. After one hour thunderbird had consumed over 5 minutes of CPU time. Top reported that Thunderbird was continuously consuming a small but definitely non-trival amount of CPU. How can I find out what Thunderbird is doing? Ideally in this situation Thunderbird should mostly be completely idle, on waking up every few minutes to check for new mail.
Reporter | ||
Comment 4•3 years ago
|
||
I also did a one-hour test with Thunderbird in troubleshooting mode and looked at the CPU time regularly. Thunderbird was consuming around 3% of a core every second. After one hour Thunderbird had consumed just over two minutes of CPU.
Although 3% is not a lot, there is no reason that Thunderbird should be consuming any CPU when nothing is happening. How can I find out why Thunderbird is doing this?
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
81376 pfps 20 0 3284272 596424 156904 S 3.7 3.7 2:14.34 /usr/lib64/thunderbird/thunderbird
64468 pfps 20 0 759812 44296 33012 S 4.3 0.3 1:50.20 xfce4-terminal --geometry 90x60
Comment 5•3 years ago
|
||
Thanks for the update
Reporter | ||
Comment 6•3 years ago
|
||
There are actually two problems here.
The low-level continual consumption of CPU. I would at least like to know what Thunderbird is doing. (I'm starting to worry that this is some sort of malware that has been injected into Thunderbird.) This occurs even in troubleshooting mode.
The high-level repeating consumption of CPU. I don't understand why Thunderbird consumes close to 100% of a CPU for multiple seconds on a semi-regular basis. I haven't yet seen this in troubleshooting mode. About the only thing I can think of is that this is some sort of indexing, but indexing shouldn't take multiple seconds of CPU.
It would be nice to be able to get some sort of information on that Thunderbird is doing so that problems like these can be diagnosed.
Comment 7•3 years ago
|
||
I missed the couple minutes aspect of it. I doubt it is indexing, unless you are seeing indicates of such in tools > activity manager. It's also not likely malware.
https://wiki.mozilla.org/Thunderbird:Testing:Memory_Usage_Problems lists steps you can review - of course ignore windows specific items. You might also see if https://mzl.la/3Bjxb7f has any matches to your situation?
Is this pop or imap accounts?
Reporter | ||
Comment 8•3 years ago
|
||
I have two accounts under Thunderbird - gmail (IMAP) and AOL (POP).
Going offline does not affect the low-level consumption.
Turning off global search does not affect the low-level consumption.
I don't have any folders larger than 2GB.
I only check for messages every 10 minutes.
I'm running a modern Linux - Fedora 34 - on a modern laptop - Yoga C940 with 16GB of memory.
There doesn't seem to be anything else on the checklist that is appropriate.
So, even in offline mode and with global indexing turned off and with Troubleshooting turned on, Thunderbird is constantly consuming a small amount of CPU.
Reporter | ||
Updated•3 years ago
|
Comment 9•3 years ago
|
||
Try turning off status bar.
Nothing in tools > activity manager or tools > developer > error console?
Reporter | ||
Comment 10•3 years ago
|
||
If Thunderbird starts up with the status bar on, it settles down to a steady consumption of about 3% of CPU. If the status bar is turned off the CPU consumption drops by over an order of magnitude, with CPU consumption mostly 0 but jumping to 1-2% every few seconds. If the status bar is turned on again CPU consumption stays at this low level and does not go back to the steady 3%.
If Thunderbird starts up with the status bar off it settles down to the lower CPU consumption. Toggling the status bar does not affect the CPU consumption level.
I tested this out three times. Each time starting with the status bar on results in the higher CPU consumption but toggling the status bar or starting with it off results in the lower CPU consumption.
The activity logs show nothing unusual, just email messages arriving.
The developer log does show some errors
15:22:09.161 Unexpected event profile-after-change URLQueryStrippingListService.jsm:224
15:22:10.030 Unknown Collection "thunderbird/query-stripping" RemoteSettingsClient.jsm:160
15:22:13.771 Trying to load /usr/lib64/thunderbird/libotr.so OTRLib.jsm:64:11
15:22:13.771 Trying to load libotr.so from system's standard library locations OTRLib.jsm:64:11
15:22:13.771 Trying to load libotr.so.5 from system's standard library locations OTRLib.jsm:64:11
15:22:13.771 Trying to load libotr.so from system's standard library locations OTRLib.jsm:64:11
15:22:13.772 Error: Cannot load required OTR library
loadExternalOTRLib resource:///modules/OTRLib.jsm:109
init resource:///modules/OTRLib.jsm:115
once resource:///modules/OTR.jsm:117
init resource:///modules/OTR.jsm:138
init resource:///modules/OTRUI.jsm:265
OTR.jsm:126:15
15:22:13.915 Successfully loaded OpenPGP library librnp.so version 0.15.2+git20210806.dd923a4e.MZLA from /usr/lib64/thunderbird/librnp.so RNPLib.jsm:92:15
15:22:14.067 Found 0 public keys and 0 secret keys (0 protected, 0 unprotected) RNPLib.jsm:288:15
15:22:14.308 tb.account.size_on_disk - Truncating float/double number. 2
15:22:14.353 services.settings: thunderbird/hijack-blocklists has signature disabled RemoteSettingsClient.jsm:1027
15:22:15.189 Calendar: Couldn't find (GMT-08.00) Pacific Time (US & Canada) CalTimezoneService.jsm:206
15:22:15.415 Calendar: Couldn't find /freeassociation.sourceforge.net/America/New_York CalTimezoneService.jsm:206
15:22:15.660 NS_ERROR_FAILURE: Couldn't decrypt string crypto-SDR.js:200
15:22:15.661 NS_ERROR_FAILURE: Couldn't decrypt string crypto-SDR.js:200
15:22:15.913 Calendar: recurrenceInfo::addException: item with null recurrenceId! CalRecurrenceInfo.jsm:745
15:22:15.914 Calendar:
Exception { name: "NS_ERROR_ILLEGAL_VALUE", message: "", result: 2147942487, filename: "resource:///modules/CalRecurrenceInfo.jsm", lineNumber: 746, columnNumber: 0, data: null, stack: "modifyException@resource:///modules/CalRecurrenceInfo.jsm:746:24\n_assureRecurringItemCaches/<@resource:///modules/CalStorageCalendar.jsm:1853:11\n", location: XPCWrappedNative_NoHelper }
CalStorageCalendar.jsm:323
15:22:15.916 Calendar: recurrenceInfo::addException: item with null recurrenceId! CalRecurrenceInfo.jsm:745
15:22:15.916 Calendar:
Exception { name: "NS_ERROR_ILLEGAL_VALUE", message: "", result: 2147942487, filename: "resource:///modules/CalRecurrenceInfo.jsm", lineNumber: 746, columnNumber: 0, data: null, stack: "modifyException@resource:///modules/CalRecurrenceInfo.jsm:746:24\n_assureRecurringItemCaches/<@resource:///modules/CalStorageCalendar.jsm:1853:11\n", location: XPCWrappedNative_NoHelper }
CalStorageCalendar.jsm:323
15:22:15.923 Calendar: recurrenceInfo::addException: item with null recurrenceId! CalRecurrenceInfo.jsm:745
15:22:15.924 Calendar:
Exception { name: "NS_ERROR_ILLEGAL_VALUE", message: "", result: 2147942487, filename: "resource:///modules/CalRecurrenceInfo.jsm", lineNumber: 746, columnNumber: 0, data: null, stack: "modifyException@resource:///modules/CalRecurrenceInfo.jsm:746:24\n_assureRecurringItemCaches/<@resource:///modules/CalStorageCalendar.jsm:1853:11\n", location: XPCWrappedNative_NoHelper }
CalStorageCalendar.jsm:323
15:22:15.926 Calendar: recurrenceInfo::addException: item with null recurrenceId! CalRecurrenceInfo.jsm:745
15:22:15.927 Calendar:
Exception { name: "NS_ERROR_ILLEGAL_VALUE", message: "", result: 2147942487, filename: "resource:///modules/CalRecurrenceInfo.jsm", lineNumber: 746, columnNumber: 0, data: null, stack: "modifyException@resource:///modules/CalRecurrenceInfo.jsm:746:24\n_assureRecurringItemCaches/<@resource:///modules/CalStorageCalendar.jsm:1853:11\n", location: XPCWrappedNative_NoHelper }
CalStorageCalendar.jsm:323
15:22:15.929 Calendar: recurrenceInfo::addException: item with null recurrenceId! CalRecurrenceInfo.jsm:745
15:22:15.929 Calendar:
Exception { name: "NS_ERROR_ILLEGAL_VALUE", message: "", result: 2147942487, filename: "resource:///modules/CalRecurrenceInfo.jsm", lineNumber: 746, columnNumber: 0, data: null, stack: "modifyException@resource:///modules/CalRecurrenceInfo.jsm:746:24\n_assureRecurringItemCaches/<@resource:///modules/CalStorageCalendar.jsm:1853:11\n", location: XPCWrappedNative_NoHelper }
CalStorageCalendar.jsm:323
15:22:15.931 Calendar: recurrenceInfo::addException: item with null recurrenceId! CalRecurrenceInfo.jsm:745
15:22:15.932 Calendar:
Exception { name: "NS_ERROR_ILLEGAL_VALUE", message: "", result: 2147942487, filename: "resource:///modules/CalRecurrenceInfo.jsm", lineNumber: 746, columnNumber: 0, data: null, stack: "modifyException@resource:///modules/CalRecurrenceInfo.jsm:746:24\n_assureRecurringItemCaches/<@resource:///modules/CalStorageCalendar.jsm:1853:11\n", location: XPCWrappedNative_NoHelper }
CalStorageCalendar.jsm:323
15:22:15.950 NS_ERROR_FAILURE: Couldn't decrypt string crypto-SDR.js:200
15:22:17.990 Calendar: Couldn't find (GMT-08.00) Pacific Time (US & Canada) 8 CalTimezoneService.jsm:206
15:22:18.390 Calendar: Couldn't find /freeassociation.sourceforge.net/America/New_York 26 CalTimezoneService.jsm:206
15:22:35.512 NS_ERROR_FAILURE: Couldn't decrypt string crypto-SDR.js:200
15:22:35.516 NS_ERROR_FAILURE: Couldn't decrypt string crypto-SDR.js:200
15:22:35.522 XHRPOSThttps://www.googleapis.com/oauth2/v3/token
[HTTP/3 200 OK 43ms]
Comment 11•3 years ago
|
||
Fedora 34 Workstation, Gnome 40 desktop, one POP3, five IMAP accounts, three network calendars and two local calendars.
My Thunderbird 92.1.0 from Fedora has more than 30 language packs (stopped counting at Korean) installed in Add-ons and Themes > Languages. All enabled.
Using top
in a Terminal session, it appears that Thunderbird idles around 3% CPU.
Using the System Monitor app, it is 0.89% CPU.
Both fluctuate, no difference in Troubleshoot Mode, and I don't use it on a laptop so can't determine if it has any bearing on battery usage.
Reporter | ||
Comment 12•3 years ago
|
||
What changed CPU usage for me not showing (or toggling) the Status bar - View -> Toolbars -> Status Bar.
Comment 13•3 years ago
|
||
(In reply to Peter F. Patel-Schneider from comment #2)
I don't have any language packs installed, as far as I know, but there are a lot of language packs that are enabled (and cannot be removed).
Is that odd?
Reporter | ||
Comment 14•3 years ago
|
||
I have no idea whether non-removable language packs are odd. Clicking on the "Why?" button next to the message saying that a pack cannot be removed gets me to https://support.mozilla.org/en-US/kb/policies-extensions-locked but I don't know why Thunderbird on Fedora is set up in this way.
Comment 15•3 years ago
|
||
(In reply to Wayne Mery (:wsmwk) from comment #13)
(In reply to Peter F. Patel-Schneider from comment #2)
I don't have any language packs installed, as far as I know, but there are a lot of language packs that are enabled (and cannot be removed).
Is that odd?
All the language packs are installed by Fedora, along with the Thunderbird from Fedora, as I stated in comment 11.
They do have a Remove
option in the three dot menu, but after using it, I get "Can't Be Removed Why?" when it reappears, and I click the three dot menu again.
So it looks like a Fedora policy.
Updated•3 years ago
|
Updated•3 years ago
|
Comment 16•3 years ago
|
||
Highly likely to be fixed by bug 1728744 for Thunderbird 91.4.0.
Description
•