Thunderbird frequently freezing, "Not responding" for about 10-20 seconds, then starts working again
Hello,
I'm using Thunderbird in Debian GNU/Linux 13 (trixie).
Version: Mozilla Thunderbird 140.4.0esr
apt package: thunderbird/stable-security,now 1:140.4.0esr-1~deb13u1 amd64 [installed]
The last few weeks I started getting the problem that Thunderbird freezes, it stops responding and Debian (with the default gnome UI) shows a popup window saying "Thunderbird is not responding", then I wait for about 10 or 20 seconds, and then Thunderbird becomes responsive again.
Apparently Thunderbird is doing something that takes a long time (perhaps going through messages to index them for quicker search or something like that, I don't know), something that should be done in a background thread so that the program can remain responsive, but for some reason that heavy work is done by the main UI thread causing Thunderbird to become unresponsive.
This problem has gotten worse over the past few weeks, so I really want to do something about it before Thunderbird becomes completely useless. (At the moment I can still use Thunderbird for like 10 minutes in between the freezing, so it's not yet critical.)
How can I find out what Thunderbird is doing while the "Thunderbird is not responding" is shown?
For example, is it possible to configure some logging or performance profiling that would output to a file some information about where the program spends its time?
Other ideas about how to troubleshoot this?
All Replies (4)
Please create a performance profile according to the instructions at https://support.mozilla.org/en-US/kb/profiling-thunderbird-performance
Wayne Mery said
Please create a performance profile according to the instructions at https://support.mozilla.org/en-US/kb/profiling-thunderbird-performance
Thanks!
I created a performance profile and was able to capture the freezing happening.
In the profiler tool I could select the timeframe (about 20 seconds) when the freeze had happened, and it seems that Thunderbird during that time spent 100% of its time in the following place:
calculateDates
resource:///modules/CalRecurrenceInfo.sys.mjs:472:17
See attached screenshot.
Apparently it was repeating that 19322 times during those 20 seconds, so about 1000 times every second.
So the problem seems related to the calendar functionality, and specifically "CalRecurrenceInfo", which I assume has to do with recurring calendar events.
I have a CALDAV calendar configured and that does have some recurring events, including some events that are recurring "forever", for example one hour every Thursday from 8 to 9, without any "until" so there is no end date. I can easily imagine how that can give trouble depending on how it's implemented, for example if the program tries to make a list of all future recurrencies for a given calendar event, then that would be infinite so there would need to be limited to some time window, and if that window is too large then things would get slow. All this is just me speculating of course, I don't know how it's implemented.
Should this be reported as a bug and if so, where would be the right place to report it?
Wayne Mery said
Please file a bug report https://bugzilla.mozilla.org/enter_bug.cgi?product=Calendar