Bug 1022368

Summary: Thunderbird 24 is extremely slow on startup
Product: [Fedora] Fedora Reporter: Panos Kavalagios <Panos.Kavalagios>
Component: thunderbirdAssignee: Martin Stransky <stransky>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: abuse, collura, gecko-bugs-nobody, Panos.Kavalagios, stransky, vseerror
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-09 10:46:20 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Panos Kavalagios 2013-10-23 07:13:19 UTC
Description of problem: Thunderbird 24 needs about 1 minute to load on startup.


Version-Release number of selected component (if applicable): thunderbird-24.0-3.fc19.x86_64


How reproducible: Run thunderbird


Steps to Reproduce:
1. Run thunderbird
2.
3.

Actual results: Only the title of the window is displayed and you get a warning about an unresponsive JS script.


Expected results: Thunderbird should have started in few minutes like previous versions 17.


Additional info: Thunderbird was re-install and the issue persists. There is no McAfee or other antivirus software installed.

Comment 1 Martin Stransky 2013-10-23 07:14:52 UTC
Can you test it in safe mode and/or with new profile? (see https://fedoraproject.org/wiki/Firefox)

Comment 2 Panos Kavalagios 2013-10-23 07:37:56 UTC
Sorry, I forgot to mention that I have already tried safe mode without any addon loaded and the problem persists:

$ time thunderbird -safe-mode

(process:28286): GLib-CRITICAL **: g_slice_set_config: assertion `sys_page_size == 0' failed
4.847u 0.528s 1:03.09 8.4%      0+0k 3104+3272io 10pf+0w

The client was closed after it displayed the page and it needed again about 1 minute. I should mention that after the startup, the client works fine.

I have created a new profile and connected only 1 mailbox and it loads very fast as used to load. Losing all my mailboxes setup is not a valid solution, right?

Comment 3 Martin Stransky 2013-10-23 07:43:46 UTC
It may hit Bug 1014858 (or https://bugzilla.gnome.org/show_bug.cgi?id=687763) - try to launch TB with G_SLICE=always-malloc, so:

$export G_SLICE=always-malloc; thunderbird

Comment 4 Panos Kavalagios 2013-10-23 07:52:26 UTC
Negative. It still needs 58 seconds to load:

$ setenv G_SLICE always-malloc; time thunderbird

(process:28988): GLib-CRITICAL **: g_slice_set_config: assertion `sys_page_size == 0' failed
[calBackendLoader] Using libical backend at /home/panos/.thunderbird/ym3t97bn.default/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/libical.manifest
6.786u 0.528s 0:58.07 12.5%     0+0k 120+1144io 0pf+0w

Comment 5 Martin Stransky 2014-01-06 15:06:24 UTC
Can you please test an upstream package downloaded from mozilla.org?

Comment 6 Panos Kavalagios 2014-06-09 12:54:05 UTC
Hello Martin,

I have also made an upstream report and we have concluded that the problem was related on the many pop3 acconts. I have de-activated the option to check for new messages on startup on those accounts and the problem was resolved.

The upstream report URL is the following:

https://getsatisfaction.com/mozilla_messaging/topics/thunderbird_24_has_extremely_slow_startup_on_linux

but unfortunately it is not valid any more. So, the workaround is to remove the offending "Check for new messages at startup" in the Server Settings section of pop3 account settings.

The problem still persists in the latest thunderbird version of F20 package (thunderbird-24.5.0-1.fc20.x86_64):

$ time thunderbird

(process:23896): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed

(thunderbird:23896): GLib-GObject-WARNING **: Attempt to add property GnomeProgram::sm-connect after class was initialised

(thunderbird:23896): GLib-GObject-WARNING **: Attempt to add property GnomeProgram::show-crash-dialog after class was initialised

(thunderbird:23896): GLib-GObject-WARNING **: Attempt to add property GnomeProgram::display after class was initialised

(thunderbird:23896): GLib-GObject-WARNING **: Attempt to add property GnomeProgram::default-icon after class was initialised
[calBackendLoader] Using libical backend at /home/panos/.thunderbird/ym3t97bn.default/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/libical.manifest
7.589u 0.685s 1:01.30 13.4%     0+0k 113008+1104io 145pf+0w

Comment 7 Bas Mevissen 2014-06-17 09:36:16 UTC
FWIW: I also experienced a slow startup with two imap accounts (no pop) in Thunderbird since version 24.6.0. One of them has several GB's of (cached) mail.

What resolved the issue for me was to compact all folders (File -> Compact Folders). It did not do much to the size of ~/.thunderbird, but it reduced the start time to about 10 seconds, including mail check in all folders. That is comparable to what it used to be with older versions of Thunderbird.

Comment 8 Panos Kavalagios 2014-06-19 07:11:16 UTC
Negative! I have compacted all folders and then enabled the option to check for new messages on startup on the pop3 accounts. The 1 second gain is not considered a workaround. It still needs a minute for the Thunderbird to display the contents:

$ time thunderbird

(process:1424): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed

(thunderbird:1424): GLib-GObject-WARNING **: Attempt to add property GnomeProgram::sm-connect after class was initialised

(thunderbird:1424): GLib-GObject-WARNING **: Attempt to add property GnomeProgram::show-crash-dialog after class was initialised

(thunderbird:1424): GLib-GObject-WARNING **: Attempt to add property GnomeProgram::display after class was initialised

(thunderbird:1424): GLib-GObject-WARNING **: Attempt to add property GnomeProgram::default-icon after class was initialised
[calBackendLoader] Using libical backend at /home/panos/.thunderbird/ym3t97bn.default/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/libical.manifest
6.851u 0.474s 0:57.73 12.6%     0+0k 0+1136io 0pf+0w

Comment 9 collura 2014-07-12 00:10:05 UTC
0) please change bug version to fedora20

1) not complete fix but have you tried enabling pipelining in 'about:config' ?

     thunderbird-edit-preferences-advanced-general-config_editor:

        network.http.pipelining false -> true
        network.http.pipelining.ssl false -> true
        network.http.proxy.pipelining false -> true

   (tried on large imap account not pop and 
   havent timed and still slow but does seems little faster
   when enable pipelining for paralleling requests
   [similarly for firefox])

Comment 10 collura 2014-07-12 05:49:54 UTC
sed -e 's/not complete fix but/not actually a workaround but/;w Comment9' Comment9

Comment 11 Panos Kavalagios 2014-07-15 14:45:03 UTC
It takes with the proposed workaround 56 instead of 57 seconds.
Hooray! One more second was gained. I need 50 seconds more to go! :)

$ time thunderbird

(process:13977): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed

(thunderbird:13977): GLib-GObject-WARNING **: Attempt to add property GnomeProgram::sm-connect after class was initialised

(thunderbird:13977): GLib-GObject-WARNING **: Attempt to add property GnomeProgram::show-crash-dialog after class was initialised

(thunderbird:13977): GLib-GObject-WARNING **: Attempt to add property GnomeProgram::display after class was initialised

(thunderbird:13977): GLib-GObject-WARNING **: Attempt to add property GnomeProgram::default-icon after class was initialised
[calBackendLoader] Using libical backend at /home/panos/.thunderbird/ym3t97bn.default/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/libical.manifest
6.279u 0.488s 0:56.53 11.9%     0+0k 0+1136io 0pf+0w

Comment 12 Martin Stransky 2014-07-21 11:09:36 UTC
Can you test offline mode? Disable networking in NetworkManager and try to start TB. It should come in offline mode.

Comment 13 Martin Stransky 2014-07-21 11:11:43 UTC
Anyway, how big is your mail-box? Look at ~.thunderbird in your home dir.

Comment 14 Martin Stransky 2014-07-21 11:12:39 UTC
Just a quick check - I have 9GB mail data in my TB profile and I don't see this...

Comment 15 Panos Kavalagios 2014-07-29 15:19:38 UTC
Offline mode do not resolve the problem. The Network Manager was disconnected from wired ethernet and the result is the following:

$ time thunderbird

(process:14209): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed

(thunderbird:14209): GLib-GObject-WARNING **: Attempt to add property GnomeProgram::sm-connect after class was initialised

(thunderbird:14209): GLib-GObject-WARNING **: Attempt to add property GnomeProgram::show-crash-dialog after class was initialised

(thunderbird:14209): GLib-GObject-WARNING **: Attempt to add property GnomeProgram::display after class was initialised

(thunderbird:14209): GLib-GObject-WARNING **: Attempt to add property GnomeProgram::default-icon after class was initialised
[calBackendLoader] Using libical backend at /home/panos/.thunderbird/ym3t97bn.default/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/libical.manifest
6.342u 0.731s 0:59.66 11.8%     0+0k 75752+4616io 118pf+0w

The size is:

$ du -sh ~/.thunderbird/ym3t97bn.default
5.4G    /home/panos/.thunderbird/ym3t97bn.default

Comment 16 Martin Stransky 2014-07-30 06:38:38 UTC
Can you please test the new Firefox 31? I don't expect any difference but it's worth a try. You can get it at https://www.mozilla.org/en-US/thunderbird/

Comment 17 Account closed by the user 2014-07-30 17:57:46 UTC
(In reply to Martin Stransky from comment #16)

> Can you please test the new Firefox 31? I don't expect any difference but
> it's worth a try. You can get it at
> https://www.mozilla.org/en-US/thunderbird/

31 is ready in koji:

http://kojipkgs.fedoraproject.org//work/tasks/4503/7214503/thunderbird-31.0-2.fc20.x86_64.rpm

http://kojipkgs.fedoraproject.org//work/tasks/4505/7214505/thunderbird-31.0-2.fc20.i686.rpm

Comment 18 Account closed by the user 2014-07-30 18:01:52 UTC
(In reply to Xose Vazquez Perez from comment #17)

> 31 is ready in koji:
> 
> http://kojipkgs.fedoraproject.org//work/tasks/4503/7214503/thunderbird-31.0-
> 2.fc20.x86_64.rpm
> 
> http://kojipkgs.fedoraproject.org//work/tasks/4505/7214505/thunderbird-31.0-
> 2.fc20.i686.rpm

also for fc19 : http://koji.fedoraproject.org/koji/buildinfo?buildID=549112

Comment 19 Bas Mevissen 2014-07-30 20:47:40 UTC
Thunderbird 31 seems to be working normal again. Unfortunately, I had to uninstall thunderbird-lightning to test, so the test is not 100% clean.

Comment 20 Panos Kavalagios 2014-07-31 14:33:37 UTC
I have tried 31 to no avail:

$ time thunderbird

(process:15362): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed

(thunderbird:15362): GLib-GObject-WARNING **: Attempt to add property GnomeProgram::sm-connect after class was initialised

(thunderbird:15362): GLib-GObject-WARNING **: Attempt to add property GnomeProgram::show-crash-dialog after class was initialised

(thunderbird:15362): GLib-GObject-WARNING **: Attempt to add property GnomeProgram::display after class was initialised

(thunderbird:15362): GLib-GObject-WARNING **: Attempt to add property GnomeProgram::default-icon after class was initialised
[calBackendLoader] Using libical backend at /home/panos/.thunderbird/ym3t97bn.default/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/libical.manifest
7.362u 0.727s 1:01.53 13.1%     0+0k 85928+5240io 260pf+0w

Now it takes few seconds longer. So the only workaround so far is to stick with Thunderbird 17 if you want to check messages at startup.

Comment 21 Wayne Mery (:wsmwk) 2014-08-06 12:01:04 UTC
Please see https://wiki.mozilla.org/Thunderbird:Testing:Memory_Usage_Problems#Diagnosis_Steps (of course, ignore the MS-Windows related stuff), and comment accordingly.

Comment 22 Wayne Mery (:wsmwk) 2014-08-11 18:54:18 UTC
*slice* assertions and warnings may be ignored

might be related to https://bugzilla.mozilla.org/show_bug.cgi?id=799821

Comment 23 Panos Kavalagios 2014-08-13 10:30:27 UTC
No, it's not related to the mentioned issue, as the problem is caused due to POP3 and not IMAP accounts. 

The investigation is over. We have already identified the issue to be the check for new messages on the multiple POP3 accounts. It worked fine on Thunderbird 17 and not on the releases afterwards. The slowness is observed only during startup. It works fine when the client window is fully displayed.

I don't know why I have to go through the clean profile and no addons actions for once more. They are already tested and work fine. The numerous POP3 accounts is the issue with the specific option enabled.

Comment 24 Martin Stransky 2014-08-13 10:36:49 UTC
How many active POP3 accounts do you have?

Comment 25 Panos Kavalagios 2014-08-13 10:39:29 UTC
1 IMAP and 15 POP3

Comment 26 Wayne Mery (:wsmwk) 2014-09-09 13:51:52 UTC
I have linked this upstream to https://bugzilla.mozilla.org/show_bug.cgi?id=929281

I would prefer to continue the activity there.

Comment 27 Panos Kavalagios 2014-09-09 14:17:26 UTC
OK no problem. I have included a summary.

Comment 28 Martin Stransky 2015-02-09 10:46:20 UTC
Moving upstream per request in comment 26.