Bug 1121489 - thunderbird leaks a lot of memory over time
Summary: thunderbird leaks a lot of memory over time
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: thunderbird
Version: 24
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Gecko Maintainer
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-21 05:37 UTC by udayb
Modified: 2017-08-08 11:47 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-08-08 11:47:41 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Memory report (about:memory -> Measure and save...) (31.59 KB, application/x-gnome-theme-package)
2014-07-23 07:48 UTC, udayb
no flags Details
about:memory report - after unsubsribing all mail (after 8 days of running) (38.09 KB, application/x-gzip)
2014-10-09 04:50 UTC, udayb
no flags Details
Help -> Troubleshooting (26.27 KB, text/plain)
2015-07-06 11:40 UTC, udayb
no flags Details

Description udayb 2014-07-21 05:37:48 UTC
Description of problem:

Thunderbird leaks a lot of memory over time (few days). I have two email accounts set up on it (gmail/IMAP with SSL/TLS) and another SSL/TLS IMAP (server on local network). Over a period of time, it brings my system (that has 8 GB of RAM) to a crawl using nearly 73% of its memory (5.7 GB resident in RAM). 

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND 
13564 user      20   0 10.157g 5.677g  15372 S   0.0 73.4  77:43.66 thunderbird

I have "check for new messages" setup for every 1 min for the LAN IMAPs server and 15 min for gmail. 

Version-Release number of selected component (if applicable):
thunderbird-24.6.0-1.fc20.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Start thunderbird and let it run for a few days
2. Check its memory utilization

Actual results:
High memory utilization


Expected results:
I don't expect it to use 6 GB of my RAM.


Additional info:

Comment 1 udayb 2014-07-21 05:49:04 UTC
And this is the amount of memory thunderbird uses for me on a fresh start  
(~202 MB).


  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
29615 uday      20   0  966644 202924  40384 S   0.3  2.5   0:05.76 thunderbird

and after 77 hours,

13564 user      20   0 10.157g 5.677g  15372 S   0.0 73.4  77:43.66 thunderbird

Comment 2 udayb 2014-07-21 12:18:07 UTC
After after about 3 hours, it's about 1 GB.

29615 uday      20   0 1890756 904096  48684 S  11.0 11.1   2:46.99 thunderbird

It's steadily climbing.

Comment 3 udayb 2014-07-22 06:53:45 UTC
After 7 hours, it's 1.5 GB

29615 user      20   0 2684300 1.499g  44260 S   0.3 19.4   7:33.43 thunderbird

Comment 4 Jan Horak 2014-07-22 11:56:18 UTC
Please check Troubleshooting Information and then about:memory in Help menu. Attach 'Measure and save' file to this bug.

Comment 5 udayb 2014-07-23 07:48:13 UTC
Created attachment 920140 [details]
Memory report (about:memory -> Measure and save...)

Comment 6 udayb 2014-07-23 07:53:43 UTC
At the time I attached the report, I saw a 2.5 GB memory utilization (resident).

29615 user      20   0 3920120 2.560g  33968 S   0.0 33.1  15:11.74 thunderbird

Comment 7 udayb 2014-07-28 06:18:17 UTC
Any comments on the memory report? It looks like there's a huge leak in the way memory is being allocated to a large IMAP folder. I'll be happy to provide any more information. Any workaround suggestions are also welcome. The way it is right now, I can't keep thunderbird up for more than a day without exhausting all my memory.

Comment 8 udayb 2014-08-06 10:56:11 UTC
Any hints on this? I'm more than willing to provide more information.

Comment 9 Wayne Mery (:wsmwk) 2014-08-06 10:56:49 UTC
How large is the .msf file associated with 
- imap://uday.iisc.ernet.in/INBOX 
- imap://udayreddy.com/%5BGmail%5D/All%20Mail
- imap://udayreddy.com/%5BGmail%5D/Important

Does your rate of memory increase stop or reduce if you have started Thunderbird in safe mode?

Comment 10 udayb 2014-08-11 06:39:15 UTC
Here are the sizes of the .msf files:

imap://uday.iisc.ernet.in

2.5G	INBOX
23M	INBOX.msf

imap.gmail.com

270M	All Mail
43M	All Mail.msf
56M	Important
7.6M	Important.msf

I'll report its behavior in safe mode soon.

Comment 11 udayb 2014-08-12 06:55:07 UTC
I confirm that I see the same behavior in safe mode - memory utilization increases at the same rate (roughly 200 MB / hour).

Comment 12 udayb 2014-09-29 05:34:32 UTC
I continue to see the same problem with

thunderbird-31.1.0-1.fc20.x86_64

Anything further to hunt this down? It's really killing my desktop usability.

Comment 13 Wayne Mery (:wsmwk) 2014-09-29 13:36:15 UTC
1. suggest in Thunderbird you unsubscribe from "All Mail" folder. see https://support.mozillamessaging.com/en-US/kb/thunderbird-and-gmail

2. then measure after 6+ hours and post a new about:memory file

Comment 14 udayb 2014-10-09 04:50:08 UTC
It still leaks memory but not at the same rate. After about 8 days, it consumes about 3.63 GB (resident)

9775 user      20   0 5353160 3.635g  43896 S   1.0 47.0  57:16.48 thunderbird 

So it leaks at a rate 4 times less. about:memory report attached.

Comment 15 udayb 2014-10-09 04:50:53 UTC
Created attachment 945201 [details]
about:memory report - after unsubsribing all mail (after 8 days of running)

Comment 16 udayb 2014-11-06 05:26:26 UTC
Anything further on this? I provided all info requested. Memory leak appears to be there irrespective of specific mailboxes - just that it's higher when the subscribed folders are larger in size.

Comment 17 Wayne Mery (:wsmwk) 2014-12-01 13:40:34 UTC
Is it possible to run a few hours a a time, with different accounts disabled to getting new mail?  Perhaps then it could be narrowed to a specific account

Comment 18 udayb 2014-12-22 12:07:59 UTC
I see this with each of my two IMAP accounts and I only have IMAP accounts set up.

Comment 19 Wayne Mery (:wsmwk) 2015-02-23 05:19:25 UTC
Please try this...

In edit | Preferences (on Windows Tools|Options)->Advanced->Config editor, find these 2 preferences, hopefully with these values:
mail.db.idle_limit 300000
mail.db.max_open 30

1. Are they at those values?
2. Try to increase mail.db.max_open to 10000 or more than the number of your folders in total. Do you get better results?
3. If you do not have better results, please also post in this bug report, the contents of Help | Troubleshooting

Comment 20 Fedora End Of Life 2015-05-29 12:25:29 UTC
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. 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 '20'.

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 20 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 21 Fedora End Of Life 2015-06-29 21:40:25 UTC
Fedora 20 changed to end-of-life (EOL) status on 2015-06-23. Fedora 20 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 22 udayb 2015-07-06 11:39:19 UTC
(In reply to Wayne Mery (:wsmwk) from comment #19)
> Please try this...
> 
> In edit | Preferences (on Windows Tools|Options)->Advanced->Config editor,
> find these 2 preferences, hopefully with these values:
> mail.db.idle_limit 300000
> mail.db.max_open 30
> 
> 1. Are they at those values?

Yes.

> 2. Try to increase mail.db.max_open to 10000 or more than the number of your
> folders in total. Do you get better results?

I did this, and I still see the same results. 

> 3. If you do not have better results, please also post in this bug report,
> the contents of Help | Troubleshooting

help_troubleshooting.txt attached.

Comment 23 udayb 2015-07-06 11:40:13 UTC
Created attachment 1048799 [details]
Help -> Troubleshooting

Comment 24 Fedora End Of Life 2016-07-19 19:02:32 UTC
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 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 25 udayb 2017-05-02 09:25:53 UTC
This issue persists with Fedora 24, with thunderbird-45.8.0-1.fc24.x86_64.

Comment 26 Fedora End Of Life 2017-07-25 18:41:16 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 27 Fedora End Of Life 2017-08-08 11:47:41 UTC
Fedora 24 changed to end-of-life (EOL) status on 2017-08-08. Fedora 24 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.


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