Bug 1321864 - thunderbird eating cpu
Summary: thunderbird eating cpu
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: thunderbird
Version: 28
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Jan Horak
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-29 09:46 UTC by Jeremy Harris
Modified: 2022-02-03 09:10 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-05-28 23:36:11 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
perf capture (8.60 MB, application/octet-stream)
2016-07-11 08:45 UTC, Jeremy Harris
no flags Details
perf report output (2.56 MB, text/plain)
2018-10-30 21:24 UTC, Jeremy Harris
no flags Details
perf report output (1.57 MB, text/plain)
2018-11-01 20:36 UTC, Jeremy Harris
no flags Details
raw perf data (7.59 MB, application/octet-stream)
2018-11-01 20:40 UTC, Jeremy Harris
no flags Details

Description Jeremy Harris 2016-03-29 09:46:07 UTC
Description of problem:
 100% cpu use, continuous for 10 mins after startup


Version-Release number of selected component (if applicable):
 38.7.1


How reproducible:
 Seen once so far


Steps to Reproduce:
1. Start tbird
2. Listen to laptop fan
3. "top"

Actual results:
  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND                     
 2854 jgh       20   0 1531496 448732  89752 R 110.3  2.8  10:06.50 thunderbird                 
 2568 jgh       20   0  489216 109040  92664 S   2.3  0.7   0:28.39 Xorg                        



Expected results:
  Less fan.


Additional info:

 Extensions loaded:

Display Quota 0.97
Enigmail 1.9.1
Lightning 4.0.7.1
Toggle Word Wrap 1.10

DKIM Verifier 1.4.1 (disabled)


6 mail accounts configured, plus 1 news account.
XFCE auto-startup.  Mail read & delete appeared to be normal despite
the cpu load.

Shuts down cleanly on ctrl-Q.  New startup, seems quiet.

Comment 1 Zdenek Kabelac 2016-04-19 12:36:48 UTC
Yep - noticed myself - here is just cutoff from strace:

recvmsg(4, 0x7ffee42d1c20, 0)           = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(4, 0x7ffee42d1c20, 0)           = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=4, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=4, revents=POLLOUT}])
writev(4, [{"\24\0\6\0ZA\241\0J\1\0\0\6\0\0\0\0\0\0\0\4\0\0\0", 24}, {NULL, 0}, {"", 0}], 3) = 24
poll([{fd=4, events=POLLIN}], 1, -1)    = 1 ([{fd=4, revents=POLLIN}])
recvmsg(4, {msg_name(0)=NULL, msg_iov(1)=[{"\1\0@\261\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 4096}], msg_controllen=0, msg_flags=0}, 0) = 32
recvmsg(4, 0x7ffee42d1c20, 0)           = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(4, 0x7ffee42d1c20, 0)           = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=4, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=4, revents=POLLOUT}])
writev(4, [{"\24\0\6\0\257V\240\0J\1\0\0\6\0\0\0\0\0\0\0\4\0\0\0", 24}, {NULL, 0}, {"", 0}], 3) = 24
poll([{fd=4, events=POLLIN}], 1, -1)    = 1 ([{fd=4, revents=POLLIN}])
recvmsg(4, {msg_name(0)=NULL, msg_iov(1)=[{"\1\0A\261\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 4096}], msg_controllen=0, msg_flags=0}, 0) = 32
recvmsg(4, 0x7ffee42d1c20, 0)           = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(4, 0x7ffee42d1c20, 0)           = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=4, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=4, revents=POLLOUT}])
writev(4, [{"\24\0\6\0\260j\244\0J\1\0\0\6\0\0\0\0\0\0\0\4\0\0\0", 24}, {NULL, 0}, {"", 0}], 3) = 24
poll([{fd=4, events=POLLIN}], 1, -1)    = 1 ([{fd=4, revents=POLLIN}])
recvmsg(4, {msg_name(0)=NULL, msg_iov(1)=[{"\1\0B\261\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 4096}], msg_controllen=0, msg_flags=0}, 0) = 32
recvmsg(4, 0x7ffee42d1c20, 0)           = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(4, 0x7ffee42d1c20, 0)           = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=4, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=4, revents=POLLOUT}])
writev(4, [{"\24\0\6\0\221\0\240\0J\1\0\0\6\0\0\0\0\0\0\0\4\0\0\0", 24}, {NULL, 0}, {"", 0}], 3) = 24
poll([{fd=4, events=POLLIN}], 1, -1)    = 1 ([{fd=4, revents=POLLIN}])
recvmsg(4, {msg_name(0)=NULL, msg_iov(1)=[{"\1\0C\261\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 4096}], msg_controllen=0, msg_flags=0}, 0) = 32

Comment 2 Jan Horak 2016-05-23 09:30:10 UTC
First of all be sure you have thunderbird-debuginfo installed:
debuginfo-install thunderbird
And then please try to gather some profiling data by perf:
sudo perf record -g -p `pidof thunderbird` -o thunderbird.data sleep 20
and after that:
sudo perf report -s dso -i thunderbird.data
and browse the report of most cpu hungry calls.

Comment 3 Jeremy Harris 2016-07-06 09:34:03 UTC
The top end of the "perf report" output page looks like so:

Samples: 75K of event 'cycles:ppp', Event count (approx.): 61534849337
  Children      Self  Shared Object
+   74.07%     0.00%  [unknown]
+   68.42%    63.43%  libxul.so
+   13.62%    13.00%  thunderbird
+    6.58%     6.58%  [kernel.kallsyms]
+    6.01%     5.57%  libglib-2.0.so.0.4600.2
+    5.77%     4.08%  libpthread-2.22.so
+    4.99%     3.86%  libc-2.22.so

(but this looks like modules running at sample time to me, not calls?)

(now on tbird 45.1.1 ...  dnf shows libxul.so being possibly provided
by all sorts of packages, including thunderbird - either I asked the
wrong question (dnf provides */libxul.so) or I don't understand the
concepts of modularity and dependencies.  "top" is showing tbird at
75% + continuously; occasional bursts to 400% (laptop has 4 cores)

Comment 4 Jan Horak 2016-07-11 08:09:40 UTC
The libxul.so is from Thunderbird. We cannot share libxul library with Firefox for example because of technical reasons. 

What I meant by 'browse' is that you should use arrows and enter keys to open libxul.so and look for the most frequent called methods from it. Sorry for not mentioning that before. Could you please post that detailed view or the .data file itself?

Comment 5 Jeremy Harris 2016-07-11 08:45:16 UTC
Created attachment 1178291 [details]
perf capture

Comment 6 Jeremy Harris 2016-07-19 08:11:00 UTC
Possibly associated with a relatively large number of new mails dealt with
(imap access; filters run and distribute to folders) in one chunk (laptop
boot-and-login the morning after a day off work).

Comment 7 Jeremy Harris 2016-08-31 09:13:19 UTC
Issue still present:
Thunderbird 45.2.0

Comment 8 Fedora End Of Life 2016-11-24 16:16:50 UTC
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 9 Jeremy Harris 2016-12-03 10:15:45 UTC
Seen again on f24, thunderbird 45.4.0

Comment 10 John Henry Frankenhauser 2017-07-25 18:34:10 UTC
I'm also seeing this on RHEL7 with Thunderbird 52.0.1 and 52.2.1.

Is anyone still looking at this?

Comment 11 Fedora End Of Life 2017-07-25 20:25:12 UTC
This message is a reminder that Fedora 24 is nearing its end of life.
Approximately 2 (two) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 24. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '24'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 24 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 12 Jeremy Harris 2017-07-26 08:11:14 UTC
Still present with 52.2.1 on f25   (4.11.10-200.fc25.x86_64).

Comment 13 Mik 2017-08-02 20:20:50 UTC
I get the same problem with thunderbird 52.2.1 on f25 but this thing occurs for a very few moment (one-two days) 

after 10mn thunderbird takes 100% on one core of my processor. If I close it, it take a relative long time to stop and I get a mozilla bug report dialog after some times.

Comment 14 Mik 2017-08-26 14:41:00 UTC
Comes from a bad plugins fixed for me

Comment 15 Fedora End Of Life 2017-11-16 19:14:09 UTC
This message is a reminder that Fedora 25 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 25. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '25'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 25 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 16 Jeremy Harris 2017-11-20 09:28:48 UTC
Still occurs with thunderbird 52.4.0 on f27.

Comment 17 Douglas Summers 2018-03-25 16:46:21 UTC
No better with Thunderbird 52.6/Lightning 5.4.6 on F27.

Comment 18 Jeremy Harris 2018-05-18 08:05:07 UTC
Still present with 52.7.0

Comment 19 Wayne Mery (:wsmwk) 2018-10-23 08:44:31 UTC
Jeremy,
Does it happen with add-ons disabled, i.e. Thunderbird in safe mode?
With View > Toolbars > status bar disabled?

Comment 20 Jeremy Harris 2018-10-23 09:05:53 UTC
(In reply to Wayne Mery (:wsmwk) from comment #19)
> Does it happen with add-ons disabled, i.e. Thunderbird in safe mode?
> With View > Toolbars > status bar disabled?

That may be difficult to find out, since a restart always seems to clear the
issue.  I really don't want to run without those things all the time.

Comment 21 Wayne Mery (:wsmwk) 2018-10-23 09:51:09 UTC
>  100% cpu use, continuous for 10 mins after startup

Too bad it isn't highly reproducible. If there aren't reproducible steps, then without a pref profile with Thunderbird symbols it's going to be difficult to identify.


> Possibly associated with a relatively large number of new mails dealt with
(imap access; filters run and distribute to folders) in one chunk (laptop
boot-and-login the morning after a day off work).

Is there a particular reason you mentioned this, and do yo still think this is likely?

Comment 22 Jeremy Harris 2018-10-23 09:58:12 UTC
(In reply to Wayne Mery (:wsmwk) from comment #21)
> Is there a particular reason you mentioned this, and do yo still think this
> is likely?

Only that's what came to mind.  I think it's at least possible; I don't recall
getting the issue later in the work day.  Should I try to get a coredump?

Comment 23 Jeremy Harris 2018-10-24 15:20:15 UTC
One sample from this morning:

(gdb) bt
#0  0x00007f0a7cf4ea04 in nsTSubstring<char>::Capacity() const () from /usr/lib64/thunderbird/libxul.so
#1  0x00007f0a7cf4ea68 in nsTSubstring<char>::MutatePrep(unsigned int, char**, mozilla::detail::StringDataFlags*) ()
   from /usr/lib64/thunderbird/libxul.so
#2  0x00007f0a7cf4ee52 in nsTSubstring<char>::ReplacePrepInternal(unsigned int, unsigned int, unsigned int, unsigned int) ()
   from /usr/lib64/thunderbird/libxul.so
#3  0x00007f0a7cf50229 in nsTSubstring<char>::Assign(char const*, unsigned int, std::nothrow_t const&) () from /usr/lib64/thunderbird/libxul.so
#4  0x00007f0a7cf50304 in nsTSubstring<char>::Assign(char const*) () from /usr/lib64/thunderbird/libxul.so
#5  0x00007f0a7cff39e4 in mozilla::Preferences::GetCString(char const*, nsTSubstring<char>&, mozilla::PrefValueKind) ()
   from /usr/lib64/thunderbird/libxul.so
#6  0x00007f0a7cff3c50 in nsPrefBranch::GetCharPref(char const*, nsTSubstring<char>&) () from /usr/lib64/thunderbird/libxul.so
#7  0x00007f0a7ccf3b2b in nsMsgIncomingServer::GetCharValue(char const*, nsTSubstring<char>&) () from /usr/lib64/thunderbird/libxul.so
#8  0x00007f0a7ccf6051 in nsMsgIncomingServer::GetHostName(nsTSubstring<char>&) () from /usr/lib64/thunderbird/libxul.so
#9  0x00007f0a7ce09274 in nsImapProtocol::SetupWithUrl(nsIURI*, nsISupports*) () from /usr/lib64/thunderbird/libxul.so
#10 0x00007f0a7ce09f6d in nsImapProtocol::LoadImapUrl(nsIURI*, nsISupports*) () from /usr/lib64/thunderbird/libxul.so
#11 0x00007f0a7cdc5b2c in nsImapIncomingServer::LoadNextQueuedUrl(nsIImapProtocol*, bool*) () from /usr/lib64/thunderbird/libxul.so
#12 0x00007f0a7ce292d8 in (anonymous namespace)::SyncRunnable2<nsIImapServerSink, nsIImapProtocol*, bool*>::Run() ()
   from /usr/lib64/thunderbird/libxul.so
#13 0x00007f0a7cfd086b in nsThread::ProcessNextEvent(bool, bool*) () from /usr/lib64/thunderbird/libxul.so
#14 0x00007f0a7cfd91ec in NS_ProcessNextEvent(nsIThread*, bool) () from /usr/lib64/thunderbird/libxul.so
#15 0x00007f0a7d3fc46a in mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) () from /usr/lib64/thunderbird/libxul.so
#16 0x00007f0a7d3d0769 in MessageLoop::Run() () from /usr/lib64/thunderbird/libxul.so
#17 0x00007f0a7ee7984c in nsBaseAppShell::Run() () from /usr/lib64/thunderbird/libxul.so
#18 0x00007f0a7fcf1ade in nsAppStartup::Run() () from /usr/lib64/thunderbird/libxul.so
#19 0x00007f0a7fd8825f in XREMain::XRE_mainRun() () from /usr/lib64/thunderbird/libxul.so
#20 0x00007f0a7fd89069 in XREMain::XRE_main(int, char**, mozilla::BootstrapConfig const&) () from /usr/lib64/thunderbird/libxul.so
#21 0x00007f0a7fd89530 in XRE_main(int, char**, mozilla::BootstrapConfig const&) () from /usr/lib64/thunderbird/libxul.so
#22 0x000055a0f462e556 in do_main(int, char**, char**) ()
#23 0x000055a0f462dcad in main ()

Comment 24 Jan Horak 2018-10-26 09:30:56 UTC
Lets do another round of perf record:

# Run Thunderbird, wait for high cpu usage (or keep the current cpu hungry Thunderbird running)

# Call profiling tool:
perf record -g -p `pidof thunderbird` -- sleep 10

# Create file with report:
perf report --stdio -n >out.perf

# Feel free to attach to the bugreport following files:
perf.data
out.perf

Thank you.

Comment 25 Jeremy Harris 2018-10-30 21:24:49 UTC
Created attachment 1499112 [details]
perf report output

Comment 26 Jeremy Harris 2018-10-30 21:34:24 UTC
Annoyingly, bugzilla throws a fit when I try to attach the raw per capture,
either plain or compressed.

Comment 27 Jan Horak 2018-10-31 07:56:59 UTC
Thanks for the reply. From the perf report there seems to be a missing symbols for thunderbird, please make sure you have debuginfo installed for thunderbird by:

sudo dnf debuginfo-install thunderbird

Sorry I didn't mentioned that earlier.

Comment 28 Jeremy Harris 2018-11-01 20:36:31 UTC
Created attachment 1500200 [details]
perf report output

Comment 29 Jeremy Harris 2018-11-01 20:40:12 UTC
Created attachment 1500201 [details]
raw perf data

Comment 30 Ben Cotton 2018-11-27 13:41:21 UTC
This message is a reminder that Fedora 27 is nearing its end of life.
On 2018-Nov-30  Fedora will stop maintaining and issuing updates for
Fedora 27. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora  'version' of '27'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 27 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 31 Jeremy Harris 2018-11-27 13:44:22 UTC
Still current on f28.

Comment 32 Jeremy Harris 2019-01-22 09:35:59 UTC
Also getting regular crashes, always during this high-activity period symptom.  This in on thunderbird 60.4.0 / fedora 28.  See https://bugzilla.redhat.com/show_bug.cgi?id=1661891
The resulting dump information has recently been large enough that ABRT refuses to upload it, which might imply a memory leak.

The crashes tend to result in full re-downloads of some mail folders after restart, which is painful since I'm on a restricted-monthly-bytes connection.

Comment 33 Ben Cotton 2019-05-02 19:58:48 UTC
This message is a reminder that Fedora 28 is nearing its end of life.
On 2019-May-28 Fedora will stop maintaining and issuing updates for
Fedora 28. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora 'version' of '28'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 28 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 34 Ben Cotton 2019-05-28 23:36:11 UTC
Fedora 28 changed to end-of-life (EOL) status on 2019-05-28. Fedora 28 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 35 Andreas M. Kirchwitz 2020-10-18 16:12:15 UTC
Just for the records, the bug with Thunderbird using 100% still exists up to Fedora 32 with the latest thunderbird-78.3.1-1.fc32.x86_64 package. It has not been fixed.

No add-ons installed, all accounts freshly configured, after some time Thunderbird uses 100% CPU for no apparent reason. Goes on for hours. Don't know if it will ever end, my notebook is overheating and gets unusable. Thunderbird seems to operate fine, can be used as normal, just a little bit slower because it burns through 1 CPU core in background.

When I quit Thunderbird it continues for some time but then eventually ends.

No idea how to reproduce. It just happens after some time, sometimes sooner, sometimes later. Sometimes several times a day, sometimes not once for weeks.

Comment 36 Wayne Mery (:wsmwk) 2020-10-18 16:22:55 UTC
when you encounter the issue, while Thunderbird is still responsive, use https://github.com/thunderbird-conversations/thunderbird-conversations/wiki/Profiling-Conversation's-Performance to capture a profile.

You may need to use a Thunderbird provided download from https://www.thunderbird.net/

Comment 37 Andreas M. Kirchwitz 2020-10-29 02:57:08 UTC
Thank you very much for your response, I will try to do that. "Unfortunately", the bug hasn't occurred during the last 10 days. I totally understand that neither the Fedora nor the Mozilla people can do much as long as nobody who's affected can provide more information to track down this rare problem.

Comment 38 OlegM 2022-01-11 08:21:39 UTC
@vseerror ,

Unfortunately I see this issue daily on my laptop on Fedora 35. here is the requested profiling info from idle Thunderbird 91.4.0 from Fedora repo consuming almost 2 CPU cores https://share.firefox.dev/31K689w


Cheers, Oleg.

Comment 39 Wayne Mery (:wsmwk) 2022-01-18 02:46:57 UTC
@oleg.malashenko

More information please. For example, What are you doing during this period?  Moving the mouse?

Most of the wait, 58%, is under PollWrapper. Most of the rest is in graphics rending.

Comment 40 OlegM 2022-01-18 07:22:16 UTC
Hi Wayne,

Thank you for the quick response.


> More information please. For example, What are you doing during this period?  Moving the mouse?

I am doing absolutely nothing, not even touching the mouse. The reproducibility and symptoms are consistent with the other reports in this thread, thus I decided to post into a CLOSED EOL thread to keep the history.


> Most of the wait, 58%, is under PollWrapper. Most of the rest is in graphics rending.

And it total it takes about 2 full CPU cores of AMD Ryzen 9 5900HX (160-190%). Initially everything works fine when Thunderbird just started, but after a random period of time (sometimes minutes, sometimes hours) it turns into a CPU hog.

I am not familiar with Thunderbird rendering code, but maybe it has something to do with redraw being triggered too often? The following points are just my guesses:

* broken timer firing constantly
* redraw event arriving too often (maybe as a side effect of a previous redraw cycle?)
* some sort of invisible animation requiring constant and quick redraw
* unprotected access to 'redraw required' flag

I am happy to assist with more testing and debugging if needed.

Hope that helps.

Comment 41 tychokirchner 2022-01-29 22:04:29 UTC
For the record: I reported a similar bug with full perf/gdb/strace log upstream here, please feel free to join if appropriate:

https://bugzilla.mozilla.org/show_bug.cgi?id=1752641

Comment 42 Ralf Ertzinger 2022-02-02 14:49:05 UTC
I have reason to believe the (visible) culprit of this is the "progress bar" thing in the thunderbird status bar, which is showing a sort of moving color wave pattern whenever this condition occurs to me.

Hiding the status bar (View->Toolbars->Status bar) makes the TB CPU usage drop significantly.

This also vibes with the large amout of libxul calls seen in the perf traces, as xul is drawing the user interface.

Now, the real trigger might be that something in the actual mail fetching thread gets stuck somehow and never completes, thus keeping the status bar animation on, but the main driver of the CPU usage might be the status bar animation itself.

Comment 43 Wayne Mery (:wsmwk) 2022-02-03 09:03:12 UTC
OlegM, I think there is sufficient information in the various upstream bug reports.  If hiding the status bar helps your situation, then it is a match to those bugs and no further information is needed.

Comment 44 OlegM 2022-02-03 09:10:36 UTC
Thank you Wayne, I'll follow the upstream bug reported by tychokirchner.


Note You need to log in before you can comment on or make changes to this bug.