Last Comment Bug 542234 - Thunderbird 3 - memory increases about 12MB on each check for new mail / get new messages. all add-ons are disabled [pop]
: Thunderbird 3 - memory increases about 12MB on each check for new mail / get ...
Status: RESOLVED FIXED
[has msgdb log][gs][gssolved]
: mlk, perf, regression
Product: MailNews Core
Classification: Components
Component: Backend (show other bugs)
: 1.9.1 Branch
: x86_64 Windows XP
: -- critical (vote)
: Thunderbird 3.3a1
Assigned To: David :Bienvenu
:
:
Mentors:
http://getsatisfaction.com/mozilla_me...
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-01-26 08:11 PST by val3ntin
Modified: 2010-11-11 12:37 PST (History)
9 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
.5-fixed
.9-fixed


Attachments
BATCh file with LOGS parameters (264 bytes, text/plain)
2010-01-26 08:13 PST, val3ntin
no flags Details
LOGS of DB (16.10 KB, text/plain)
2010-01-26 08:13 PST, val3ntin
no flags Details
LOGS of DB using 3.0.2pre (33.64 KB, text/plain)
2010-02-16 07:09 PST, val3ntin
no flags Details
List of folders and files with their sizes in My TB profile (all folder's names are changed by security purposes, i.e. not to receive spam ;) ) (7.72 KB, text/plain)
2010-02-17 00:47 PST, val3ntin
no flags Details
proposed fix (2.83 KB, patch)
2010-09-17 16:25 PDT, David :Bienvenu
neil: review+
Details | Diff | Splinter Review
patch with PR_Free (2.84 KB, patch)
2010-09-20 06:56 PDT, David :Bienvenu
mozilla: review+
standard8: approval‑thunderbird3.0.9+
standard8: approval‑thunderbird3.1.5+
Details | Diff | Splinter Review

Description val3ntin 2010-01-26 08:11:20 PST
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.8 (KHTML, like Gecko) Chrome/4.0.302.3 Safari/532.8
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.7) Gecko/20100111 Thunderbird/3.0.1

happens always in Windows 7, Windows XP.
Tried http://s3.mozillamessaging.com/build/try-server/2010-01-14_08:10-bienvenu@nventure.com-1263484981/bienvenu@nventure.com-1263484981-mail-try-win32.installer.exe build with logs that are attached.

Reproducible: Always

Steps to Reproduce:
1. Run thunderbird 3.0.1 in Windows XP (x86) or Windows 7 (x64)
2. Start receiving mails.
3. Leave Thunderbird to works about 30 minutes (or check for new mails everytime)
Actual Results:  
Mem usage is always growing up.


Expected Results:  
Application doesn't have memory leak

I've set up DB logging and used http://s3.mozillamessaging.com/build/try-server/2010-01-14_08:10-bienvenu@nventure.com-1263484981/bienvenu@nventure.com-1263484981-mail-try-win32.installer.exe     build with logs. 

LOGS below:
===============================================================================
0[9726140]: nsMsgDatabase::Open(C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\smart mailboxes\Drafts.msf, FALSE, b8a6580, TRUE) 
0[9726140]: 0 open DB's
0[9726140]: nsMsgDatabase::Open(C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\smart mailboxes\Inbox.msf, FALSE, bc08ac0, TRUE) 
0[9726140]: 1 open DB's
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\smart mailboxes\Drafts.msf - 0 hdrs in use 
0[9726140]: nsMsgDatabase::Open(C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\smart mailboxes\Sent.msf, FALSE, bc09de0, TRUE) 
0[9726140]: 2 open DB's
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\smart mailboxes\Drafts.msf - 0 hdrs in use 
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\smart mailboxes\Inbox.msf - 0 hdrs in use 
0[9726140]: nsMsgDatabase::Open(C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\smart mailboxes\Trash.msf, FALSE, bc09ef0, TRUE) 
0[9726140]: 3 open DB's
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\smart mailboxes\Drafts.msf - 0 hdrs in use 
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\smart mailboxes\Inbox.msf - 0 hdrs in use 
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\smart mailboxes\Sent.msf - 0 hdrs in use 
0[9726140]: nsMsgDatabase::Open(C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\mail.MyMailTEST\Redmine projects.sbd\Dragon.msf, FALSE, c8878c0, TRUE) 
0[9726140]: 4 open DB's
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\smart mailboxes\Drafts.msf - 0 hdrs in use 
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\smart mailboxes\Inbox.msf - 0 hdrs in use 
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\smart mailboxes\Sent.msf - 0 hdrs in use 
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\smart mailboxes\Trash.msf - 0 hdrs in use 
0[9726140]: nsMsgDatabase::Open(C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\mail.MyMailTEST\Inbox.msf, FALSE, 9774370, TRUE) 
0[9726140]: 5 open DB's
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\smart mailboxes\Drafts.msf - 0 hdrs in use 
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\smart mailboxes\Inbox.msf - 0 hdrs in use 
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\smart mailboxes\Sent.msf - 0 hdrs in use 
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\smart mailboxes\Trash.msf - 0 hdrs in use 
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\mail.MyMailTEST\Redmine projects.sbd\Dragon.msf - 222 hdrs in use 
0[9726140]: nsMsgDatabase::Open(C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\mail.MyMailTEST2\Inbox.msf, FALSE, c887bf0, TRUE) 
0[9726140]: 6 open DB's
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\smart mailboxes\Drafts.msf - 0 hdrs in use 
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\smart mailboxes\Inbox.msf - 0 hdrs in use 
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\smart mailboxes\Sent.msf - 0 hdrs in use 
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\smart mailboxes\Trash.msf - 0 hdrs in use 
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\mail.MyMailTEST\Redmine projects.sbd\Dragon.msf - 1 hdrs in use 
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\mail.MyMailTEST\Inbox.msf - 446 hdrs in use 
0[9726140]: nsMsgDatabase::Open(C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\pop.gmail-1.com\Inbox.msf, FALSE, 97749d0, TRUE) 
0[9726140]: 7 open DB's
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\smart mailboxes\Drafts.msf - 0 hdrs in use 
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\smart mailboxes\Inbox.msf - 0 hdrs in use 
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\smart mailboxes\Sent.msf - 0 hdrs in use 
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\smart mailboxes\Trash.msf - 0 hdrs in use 
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\mail.MyMailTEST\Redmine projects.sbd\Dragon.msf - 1 hdrs in use 
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\mail.MyMailTEST\Inbox.msf - 446 hdrs in use 
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\mail.MyMailTEST2\Inbox.msf - 0 hdrs in use 
0[9726140]: nsMsgDatabase::Open(C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\mail.MyMailTEST\Drafts.msf, FALSE, c88a230, TRUE) 
0[9726140]: 8 open DB's
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\smart mailboxes\Drafts.msf - 0 hdrs in use 
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\smart mailboxes\Inbox.msf - 0 hdrs in use 
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\smart mailboxes\Sent.msf - 0 hdrs in use 
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\smart mailboxes\Trash.msf - 0 hdrs in use 
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\mail.MyMailTEST\Redmine projects.sbd\Dragon.msf - 1 hdrs in use 
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\mail.MyMailTEST\Inbox.msf - 446 hdrs in use 
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\mail.MyMailTEST2\Inbox.msf - 0 hdrs in use 
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\pop.gmail-1.com\Inbox.msf - 0 hdrs in use 
0[9726140]: closing database    C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\mail.MyMailTEST\Drafts.msf 
0[9726140]: nsMsgDatabase::Open(C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\mail.MyMailTEST\Drafts.msf, FALSE, 97747b0, TRUE) 
0[9726140]: 8 open DB's
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\smart mailboxes\Drafts.msf - 0 hdrs in use 
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\smart mailboxes\Inbox.msf - 0 hdrs in use 
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\smart mailboxes\Sent.msf - 0 hdrs in use 
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\smart mailboxes\Trash.msf - 0 hdrs in use 
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\mail.MyMailTEST\Redmine projects.sbd\Dragon.msf - 1 hdrs in use 
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\mail.MyMailTEST\Inbox.msf - 154 hdrs in use 
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\mail.MyMailTEST2\Inbox.msf - 0 hdrs in use 
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\pop.gmail-1.com\Inbox.msf - 0 hdrs in use 
0[9726140]: closing database    C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\mail.MyMailTEST\Drafts.msf 
0[9726140]: nsMsgDatabase::Open(C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\Local Folders\Unsent Messages.msf, FALSE, 9774480, TRUE) 
0[9726140]: 8 open DB's
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\smart mailboxes\Drafts.msf - 0 hdrs in use 
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\smart mailboxes\Inbox.msf - 0 hdrs in use 
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\smart mailboxes\Sent.msf - 0 hdrs in use 
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\smart mailboxes\Trash.msf - 0 hdrs in use 
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\mail.MyMailTEST\Redmine projects.sbd\Dragon.msf - 1 hdrs in use 
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\mail.MyMailTEST\Inbox.msf - 162 hdrs in use 
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\mail.MyMailTEST2\Inbox.msf - 0 hdrs in use 
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\pop.gmail-1.com\Inbox.msf - 0 hdrs in use 
0[9726140]: closing database    C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\Local Folders\Unsent Messages.msf 
0[9726140]: nsMsgDatabase::Open(C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\mail.MyMailTEST2\Drafts.msf, FALSE, 9774480, TRUE) 
0[9726140]: 8 open DB's
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\smart mailboxes\Drafts.msf - 0 hdrs in use 
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\smart mailboxes\Inbox.msf - 0 hdrs in use 
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\smart mailboxes\Sent.msf - 0 hdrs in use 
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\smart mailboxes\Trash.msf - 0 hdrs in use 
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\mail.MyMailTEST\Redmine projects.sbd\Dragon.msf - 1 hdrs in use 
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\mail.MyMailTEST\Inbox.msf - 162 hdrs in use 
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\mail.MyMailTEST2\Inbox.msf - 0 hdrs in use 
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\pop.gmail-1.com\Inbox.msf - 0 hdrs in use 
0[9726140]: closing database    C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\mail.MyMailTEST2\Drafts.msf 
0[9726140]: nsMsgDatabase::Open(C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\mail.MyMailTEST\Drafts.msf, FALSE, 9774480, TRUE) 
0[9726140]: 8 open DB's
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\smart mailboxes\Drafts.msf - 0 hdrs in use 
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\smart mailboxes\Inbox.msf - 0 hdrs in use 
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\smart mailboxes\Sent.msf - 0 hdrs in use 
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\smart mailboxes\Trash.msf - 0 hdrs in use 
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\mail.MyMailTEST\Redmine projects.sbd\Dragon.msf - 1 hdrs in use 
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\mail.MyMailTEST\Inbox.msf - 162 hdrs in use 
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\mail.MyMailTEST2\Inbox.msf - 0 hdrs in use 
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\pop.gmail-1.com\Inbox.msf - 0 hdrs in use 
0[9726140]: closing database    C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\mail.MyMailTEST\Drafts.msf 
0[9726140]: nsMsgDatabase::Open(C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\ImapMail\imap.MyMailTEST3\Drafts.msf, FALSE, c204b80, FALSE) 
0[9726140]: 8 open DB's
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\smart mailboxes\Drafts.msf - 0 hdrs in use 
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\smart mailboxes\Inbox.msf - 0 hdrs in use 
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\smart mailboxes\Sent.msf - 0 hdrs in use 
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\smart mailboxes\Trash.msf - 0 hdrs in use 
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\mail.MyMailTEST\Redmine projects.sbd\Dragon.msf - 1 hdrs in use 
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\mail.MyMailTEST\Inbox.msf - 162 hdrs in use 
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\mail.MyMailTEST2\Inbox.msf - 0 hdrs in use 
0[9726140]: C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\pop.gmail-1.com\Inbox.msf - 0 hdrs in use 
0[9726140]: closing database    C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\ImapMail\imap.MyMailTEST3\Drafts.msf 
0[9726140]: closing database    C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\pop.gmail-1.com\Inbox.msf 
0[9726140]: closing database    C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\mail.MyMailTEST2\Inbox.msf 
0[9726140]: closing database    C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\mail.MyMailTEST\Inbox.msf 
0[9726140]: closing database    C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\smart mailboxes\Drafts.msf 
0[9726140]: closing database    C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\smart mailboxes\Inbox.msf 
0[9726140]: closing database    C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\smart mailboxes\Sent.msf 
0[9726140]: closing database    C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\smart mailboxes\Trash.msf 
0[9726140]: closing database    C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\Mail\mail.MyMailTEST\Redmine projects.sbd\Dragon.msf
Comment 1 val3ntin 2010-01-26 08:13:03 PST
Created attachment 423531 [details]
BATCh file with LOGS parameters
Comment 2 val3ntin 2010-01-26 08:13:53 PST
Created attachment 423532 [details]
LOGS of DB
Comment 3 Wayne Mery (:wsmwk, NI for questions) 2010-01-26 09:08:03 PST
Thanks for the bug report. 
which comment(s) in "Thunderbird 3 - Memory Drainer ?" are yours?
how much memory is being used?
Comment 4 val3ntin 2010-01-26 11:48:06 PST
Hi, Wayne.
I'm "mygreader" , from that comment you can see how much memory were used in "Thunderbird 3.0.1" in Windows 7 x64;
At this bug was used about 320Mbytes of RAM, but it always rises up if I check for a new mail (was verified with Shredder build )

I predict that this bug is connected with system (read processor) architecture, because at home I have Intel 2Quard x64 and Windows 7x64, and at work I have AMD x64 processor and Windows XP sp3 x86.
All systems are up to date.
If you need some dumps of running Thunderbird.exe I can attach them if it'll help you with solving the problem.
Comment 5 Wayne Mery (:wsmwk, NI for questions) 2010-02-16 06:00:03 PST
val3ntin, can you try 3.0.2pre from ftp://ftp.mozilla.org/pub/thunderbird/nightly/latest-comm-1.9.1/ and report results?  TIA
Comment 6 val3ntin 2010-02-16 07:09:10 PST
Created attachment 427107 [details]
LOGS of DB using 3.0.2pre

Logs using 3.0.2pre version.
Comment 7 val3ntin 2010-02-16 07:12:14 PST
Hi, Wayne.
It's still reproduced with 3.0.2pre version.
Logs are attached.

Thunderbird memory usage grows up all the time I check for a new e-mails OR send new e-mails.

P.S. It grows up to ~12Mbytes each time I check for new e-mails.
Comment 8 David :Bienvenu 2010-02-16 07:38:22 PST
It does not seem to be opening a lot of db's, and these are pop3 accounts, not IMAP, so this is not related to the IMAP status issue or fix.
Comment 9 David :Bienvenu 2010-02-16 08:05:53 PST
How big are the .msf files in your user profile directory, in particular, the Inbox and Sent.msf files for your accounts?

Do you check the same accounts on both home and work machines?
Comment 10 Wayne Mery (:wsmwk, NI for questions) 2010-02-16 08:27:18 PST
[note: so nothing revealing in the msgdb log]
Comment 11 David :Bienvenu 2010-02-16 08:35:56 PST
Oh, any extensions installed?
Comment 12 David :Bienvenu 2010-02-16 08:46:49 PST
ah, I see in the summary that all add-ons are disabled.
Comment 13 val3ntin 2010-02-17 00:47:34 PST
Created attachment 427288 [details]
List of folders and files with their sizes in My TB profile (all folder's names are changed by security purposes, i.e. not to receive spam ;) )

Note:
to receive list of folders and files use " dir /s " command in folder with your TB profile in Windows .
Comment 14 val3ntin 2010-02-17 00:50:10 PST
(In reply to comment #9)
> How big are the .msf files in your user profile directory, in particular, the
> Inbox and Sent.msf files for your accounts?
> 
> Do you check the same accounts on both home and work machines?

I've had time only to check on work PC, but I have 2 accounts which I'm using also at home PC.
Comment 15 Wayne Mery (:wsmwk, NI for questions) 2010-02-23 22:09:08 PST
a user at https://wiki.mozilla.org/Talk:Thunderbird:Testing:Memory_Usage_Problems reports 30MB per check of new messages
Comment 16 Wayne Mery (:wsmwk, NI for questions) 2010-03-25 06:16:06 PDT
val3ntin, do you still see this problem with v3.0.3?

xref imap bug 526568 (imap), bug 548784 (pop?)
Comment 17 val3ntin 2010-03-25 07:45:05 PDT
Hi Wayne.
Yes, unfortunately I still have this problem :(
Memory increases on 12Mb on each check for a new mail at my POP3 account.

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3
Comment 18 David :Bienvenu 2010-03-25 08:37:01 PDT
How big is your popstate.dat file? It's in the pop3 server sub-directory of your user profile directory. I'm wondering if we're having some error dealing with popstate.dat, and leaking the contents on every check for new mail because of bad error handling.
Comment 19 val3ntin 2010-03-25 08:53:05 PDT
Hi David,
popstate.dat is only 158 KB (162 226 bytes)
it has 5234 lines inside.
Comment 20 Wayne Mery (:wsmwk, NI for questions) 2010-05-26 14:13:07 PDT
(In reply to comment #18)
> How big is your popstate.dat file? It's in the pop3 server sub-directory of
> your user profile directory. I'm wondering if we're having some error dealing
> with popstate.dat, and leaking the contents on every check for new mail because
> of bad error handling.
...
>popstate.dat is only 158 KB (162 226 bytes)

bienvenu, what's your diagnostic prescription?
Comment 21 David :Bienvenu 2010-05-26 15:28:38 PDT
I really don't know. One strange thing I didn't notice before is these odd folder names:

0[9726140]: closing database    C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\ImapMail\imap.MYPOP3account2\[Gmail].sbd\&BCEEPwQwBDw-.msf 
0[9726140]: nsMsgDatabase::Open(C:\Documents and Settings\admin\Application Data\Thunderbird\Profiles\ckdzl8ws.default\ImapMail\imap.MYPOP3account2\&BB4EQgQ,BEAEMAQyBDsENQQ9BD0ESwQ1-.msf, FALSE, bcdad20, FALSE) 

which is an imap account with non-latin characters in the folder names. I notice them getting opened and closed a few times. But what I don't see is a correspondence between that and the get new mails.
Comment 22 Wayne Mery (:wsmwk, NI for questions) 2010-06-14 11:08:51 PDT
perhaps this needs a closer look with the people where this is also reported in http://gsfn.us/t/psgh
Comment 23 Alasdair 2010-06-14 13:29:32 PDT
Hi, I am getting a more extreme manifestation of the same problem:

I am using TB 3.04 on Windows 7 64 bit. My laptop is a Dell Core i7 with 4Gb RAM.

TB consumes around 200Mb at startup which is just about acceptable. Each time I click "Get Mail" TB consumes an additional 150mb of memory until it maxes out and crashes at 1800mb (1.8Gb !)

TB is set to check my mail every 2 minutes so I get around 20 minutes use before it crashes out. Configuring it to connect less often isn't really a solution or an option.

I do have a large amount of messages stored both locally and on the server (18,000 in my inbox alone). I suspect that has something to do with it although it was never a problem with TB 2.x.  I am collecting mail from a single POP3 account.

I have followed this Mozilla wiki post to the letter, with no improvement or change:

https://wiki.mozilla.org/Thunderbird:Testing:Memory_Usage_Problems

I can provide logs as defined in the above link if required.

This issue is consistently reproduceable every time I run TB.
Comment 24 David :Bienvenu 2010-06-14 15:30:50 PDT
Alasdair, if you look in your user profile directory, how big are the various popstate.dat files? I still think it's most likely that the leak has to do with the pop3 state data...
Comment 25 WADA 2010-06-14 17:11:22 PDT
(In reply to comment #0)
> happens always in Windows 7, Windows XP.
> Reproducible: Always
> Actual Results:  
> Mem usage is always growing up.
> Expected Results:  
> Application doesn't have memory leak

What value do you mean by "Mem usage"?
If value shown at "Mem Usage" column of Task Manager of MS Win-XP(or "Private Bytes" of MS Win Vista/7), growth of the column value only can not be evidence of "Memory Leak".
See bug 503108 comment #34 and Bug 381950, and read thru documents pointed in bug 503108 comment #34 and Bug 381950, please.
On MS Win, each "getmain 1MB then freemain 1MB" can produce as-if-infinite increase of "Mem Usage" column value for a while, due to MS Win's memory managemen mechanism and MS Win's Task Manager's spec.
i.e. report of memory leak merely by "Mem Usage" column value is nonsense.
Comment 26 Alasdair 2010-06-14 17:28:43 PDT
(In reply to comment #24)
> Alasdair, if you look in your user profile directory, how big are the various
> popstate.dat files? I still think it's most likely that the leak has to do with
> the pop3 state data...

I just have the one popstate.dat which is 1.8Mb

C:\Users\Alasdair\AppData\Roaming\Thunderbird\Profiles\we76nvja.default\Mail\my.mailserver.net\popstate.dat
Comment 27 David :Bienvenu 2010-06-14 18:07:05 PDT
If the app is crashing with OOM, I doubt it has to do with with a false increase in memory usage. Alasdair, do you get crash incidents reported when you crash? If so, do you happen to know any of the crash-ids?
Comment 28 WADA 2010-06-14 18:50:50 PDT
Alasdair, can you check Performance Counter log for "Virtual Bytes" and "Private Bytes" of Tb while "Mem Usage" is increasing by 12MB?
See attachment 444840 [details] which is attached to bug 559676 for example of CPU usage log for Tb's each thread.
Process Explorer of Sysinternals may be better to watch memory related data than Task Manager, because column name is same as data name of Performace Counter log.
> http://technet.microsoft.com/en-us/sysinternals/bb545027.aspx
Comment 29 Alasdair 2010-06-15 07:08:56 PDT
(In reply to comment #27)
> If the app is crashing with OOM, I doubt it has to do with with a false
> increase in memory usage. Alasdair, do you get crash incidents reported when
> you crash? If so, do you happen to know any of the crash-ids?

I get a Mozilla crash report each time, here's the last one:

Add-ons: {a300a000-5e21-4ee0-a115-9ec8f4eaa92b}:0.3.3,{972ce4c6-7e08-4474-a285-3208198ce6fd}:3.0.4
BuildID: 20100317103207
CrashTime: 1276593981
Email: alasdair.keddie@gmail.com
InstallTime: 1273088759
ProductName: Thunderbird
SecondsSinceLastCrash: 35763
StartupTime: 1276562735
Theme: classic/1.0
Throttleable: 1
URL: 
Vendor: 
Version: 3.0.4

I have dozens of these in the ../Crash Reports/Pending folder as well.

Incidently the crash reporter is never able to submit the reports to Mozilla, it always comes back with "There was a problem submitting your report".
Comment 30 Alasdair 2010-06-15 07:43:21 PDT
(In reply to comment #28)
> Alasdair, can you check Performance Counter log for "Virtual Bytes" and
> "Private Bytes" of Tb while "Mem Usage" is increasing by 12MB?
> See attachment 444840 [details] which is attached to bug 559676 for example of CPU usage
> log for Tb's each thread.
> Process Explorer of Sysinternals may be better to watch memory related data
> than Task Manager, because column name is same as data name of Performace
> Counter log.
> > http://technet.microsoft.com/en-us/sysinternals/bb545027.aspx

Hi WADA,

In my case, memory consumption is increasing by around 150Mb with every Send/Receive.

Using Sysinternals Process Explorer, first entry below is directly after startup, additional entries are after each manual Send / Receive:

Virtual         Private          Working Set
  365,036K        226,408K         237,048K
  507,672K        376,712K         387,048K
  653,048         523,536          533,960 
  798,884         668,820          679,240
  943,268         812,488          823,168
1,088,676         957,732          968,400
1,235,692       1,104,200         1,114,532
1,380,492       1,247,860         1,258,508
1,522,852       1,394,528         1,404,944
1,664,664       1,539,616         1,550,020
1,810,936       1,684,808         1,695,252
1,952,228       1,811,048         1,821,656

Crash.
Comment 31 Alasdair 2010-06-18 02:11:26 PDT
FYI, I upgraded to TB 3.0.5 this morning and I can still reproduce this behavior.
Comment 32 WADA 2010-06-18 02:41:49 PDT
(In reply to comment #30)
> In my case, memory consumption is increasing by around 150Mb with every Send/Receive.

Alasdair, can you reproduce your problem with new profile(if POP3, check with "Leave messaes on server") or Tb's safe mode(thunderbird.exe -safe-mode)?
Comment 33 olszus 2010-07-05 13:49:19 PDT
Hi, as i wrote on http://getsatisfaction.com/mozilla_messaging/topics/thunderbird_3_high_memory_usage_then_crash#reply_2629863 I have also such problem.

Wind 7, 
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.4) Gecko/20100608 Thunderbird/3.1
laptop Lenovo g550.

As you can see my post there I am having problem only with my POP3 account (@interia.pl). details of the account:
number of messages in inbox - 2300. around 800 downloaded and rest only headers. Every new message since I installed TH3 is being downloaded to local disk and copy stays on server ("Leave messages on server").

I have also gmail account with similiar size (fully synchronized, IMAP) - there is no memory dumb when I click Send/Receive.
Another POP3 account - only few messages, quite new and empty does cause any problems, few RSS and also new hotmail account neither.

I didn't have any crash - 15MB per download is not much -I setup POP3 account to check for messages every 30 minutes -  workaround :)

With safe mode the same. I won't create new profile (sorry :)).

Regards,
olszus
Comment 34 WADA 2010-07-05 19:56:46 PDT
To val3ntin(bug opener):
Please answer to my comment #25.

To olszus(comment #33):
Same question as comment #25. How about "Virtual Memory Size" increase?
Comment 35 WADA 2010-07-07 18:16:36 PDT
To Alasdair:
Please answer to my comment #32.
Comment 36 Alasdair 2010-07-22 09:21:09 PDT
After about a week of running 3.0.6, the crashes have stopped and Thunderbird is now stable using ~ 215Mb RAM - That's fine by me.

I'll keep an eye on TB but it looks like 3.0.6 has fixed the issue for me.

Thanks for your help WADA et al :)
Comment 37 Wayne Mery (:wsmwk, NI for questions) 2010-08-24 04:24:25 PDT
(In reply to comment #36)
> After about a week of running 3.0.6, the crashes have stopped and Thunderbird
> is now stable using ~ 215Mb RAM - That's fine by me.

Alasdair, that improvement is odd, I don't see anything fixed in 3.0.6 [2] that might explain it. And it doesn't jive with other people saying they still see a problem. So I'm wondering 
a) if you are still doing OK?
b) it would be helpful to know, if you reinstall v3.0.5 do you see the problem again [1] (backup your profile first, and after testing you can reinstall v3.0.6)  
c) What addons do you run? 

[1] v3.0.5 at ftp://ftp.mozilla.org/pub/thunderbird/releases/3.0.5/win32/en-US/

[2] v3.0.6 fixes https://bugzilla.mozilla.org/buglist.cgi?field0-0-0=cf_status_thunderbird30;query_format=advanced;type0-0-0=equals;value0-0-0=.6-fixed
    gecko 1.9.1.11 fixes https://bugzilla.mozilla.org/buglist.cgi?quicksearch=ALL+status1.9.1:.11-fixed
Comment 38 Gerome 2010-09-08 14:33:42 PDT
Hi,

I was having the exact same problem since updating from TB2 to TB3.
Looks like I finally figured out what the problem was:

The messages which are not completely downloaded yet (headers only) somehow caused the memoryleak.

In TB2 I had around 2.000 mails with only headers downloaded and 5.000 mails completely downloaded.
After the update everytime checking for mails, the memory increased by 15MB until it maxed out.
After manually downloading all the remaining 2.000 mails from the provider it seems to be perfectly stable at below 100MB.

To verify this assumption, I created a second Profile for exactly the same email-account. This time I used the option to download headers only.
Every recheck for mails on this profile caused a memory-increase by over 50MB (this time all 7.000+ mails where header-only).

I hope that helps you to get the leak fixed.

Cheers
Comment 39 David :Bienvenu 2010-09-08 15:04:02 PDT
hmm, the code that looks at the header only downloads could be leaking, I suppose. I'll look at that, thx.
Comment 40 John Doe 2010-09-16 09:42:39 PDT
I have had this same problem with Thunderbird 3 on Ubuntu 9.10 (64-bit).  I have two email accounts.  One email account is close to 4 GB; anyone else here have a mailbox close to the 4 GB limit for this bug?
Comment 41 Wayne Mery (:wsmwk, NI for questions) 2010-09-16 17:12:28 PDT
(In reply to comment #40)
> I have had this same problem with Thunderbird 3 on Ubuntu 9.10 (64-bit).  I
> have two email accounts.  One email account is close to 4 GB; anyone else here
> have a mailbox close to the 4 GB limit for this bug?

John Doe, are your 2 accounts pop-based or imap?  
and how much memory do you lose per click of  "get new mail"?
Comment 42 David :Bienvenu 2010-09-16 17:14:23 PDT
Does the leak correspond to how many messages are left on server in general, or does it specifically have to do with header-only messages?
Comment 43 Wayne Mery (:wsmwk, NI for questions) 2010-09-16 17:42:27 PDT
I lose 1MB per get new messages with fetch headers only.
I lose 1.5-2.x MB per get new messages with fetch headers only disabled.
557 messages in the account
number of new messages does not appear to have any impact.
(not tested in safe mode)
Comment 44 Alasdair 2010-09-17 02:52:40 PDT
@Wayne, Comment #37

1) I'm still good after 3.06, TB is the most stable it's ever been.  Memory footprint is now around 125mb.

2) Will setup a 3.05 test when I get a moment

3) Running no addons, I stripped the config right down when I started having the problems and haven't re-enabled any yet.

What Gerome posted makes some sense to me, around 2/3 of my mail was headers only, TB also had some problems opening the full message from the header stub when I searched through old messages.
Comment 45 Wayne Mery (:wsmwk, NI for questions) 2010-09-17 06:20:08 PDT
added http://gsfn.us/t/1bqcj to the list  (with http://gsfn.us/t/o2l6 )

@ Alasdair don't fuss too much - it's part curiosity on my part - however, a) from your perspective it would be good to confirm both that you have a *permanent* improvement and b)from our perspective it would be useful to know  what provided the improvement - it might not be caused by thunderbird
Comment 46 Wayne Mery (:wsmwk, NI for questions) 2010-09-17 07:02:55 PDT
reproduced in safe mode. i used symantec endpoint AV, with thunderbird folders excluded from scanning.

so confirming
Comment 47 David :Bienvenu 2010-09-17 14:48:58 PDT
I think I see where this is leaking - nsPop3Sink's m_partialMsgsArray is an nsVoidArray, which means it does not know how to free its members. I'll try to come up with a fix that I can generate a try server build with, once our builds work again.
Comment 48 David :Bienvenu 2010-09-17 15:00:16 PDT
Never mind; those objects are deleted...
Comment 49 David :Bienvenu 2010-09-17 16:25:39 PDT
Created attachment 476427 [details] [diff] [review]
proposed fix

this is against comm-central 1.9.2, but I suspect it applies against the trunk as well. There are probably a few error cases where we'll leak nsLineBuffer, but this is a big improvement.

Wayne, I've requested a try server build with this patch for you. I'll let you know if and when it succeeds.
Comment 50 David :Bienvenu 2010-09-17 16:26:12 PDT
Wayne, I meant to say, the leak is proportional to the number of partially downloaded messages you have in your inbox.
Comment 51 neil@parkwaycc.co.uk 2010-09-17 16:53:52 PDT
Comment on attachment 476427 [details] [diff] [review]
proposed fix

What a horrible API. But please use PR_Free like the nice header tells you to. r=me with that fixed.
Comment 52 Wayne Mery (:wsmwk, NI for questions) 2010-09-18 18:22:34 PDT
these maybe stupid questions, but i don't routinely use pop now for about 3 years:
1. is this a v3 regression?  (and if not, /me wonders why this hasn't been previousl yreported)
2. is this only seen when doing manual Get New Messages?  (that's the only way I see it)
3. do we still have some bugs that pop doesn't check for new mail on interval?  (there was at least one, but I'm not finding - https://bugzilla.mozilla.org/buglist.cgi?type1-0-0=anywords&short_desc=get%20new&field0-0-0=short_desc&type1-0-1=substring&resolution=---&resolution=FIXED&resolution=DUPLICATE&value1-0-1=pop&classification=Client%20Software&classification=Components&chfieldto=Now&query_format=advanced&chfieldfrom=2y&value1-0-0=pop%20pop3&short_desc_type=allwordssubstr&longdesc=interval%20minutes&type0-0-0=nowords&value0-0-0=count%20counts&field1-0-0=short_desc&longdesc_type=anywordssubstr&product=MailNews%20Core&product=Thunderbird&field1-0-1=component
Comment 53 David :Bienvenu 2010-09-18 18:30:02 PDT
(In reply to comment #52)
> these maybe stupid questions, but i don't routinely use pop now for about 3
> years:
> 1. is this a v3 regression?
It is a 3.0 regression
> 2. is this only seen when doing manual Get New Messages?  (that's the only way
> I see it)
No, automatic check for new mail should cause it as well, I think.
> 3. do we still have some bugs that pop doesn't check for new mail on interval? 
this is unrelated.
Comment 54 Wayne Mery (:wsmwk, NI for questions) 2010-09-18 20:43:18 PDT
the reason I asked about 2+3 together, is my auto check doesn't appear to be working. guess I'll have to track that down.
Comment 55 WADA 2010-09-18 21:14:56 PDT
(In reply to comment #54)
> my auto check doesn't appear to be working.

Bug 529364 exists. If proxy is used, Bug 575915 may occur.
Comment 56 Wayne Mery (:wsmwk, NI for questions) 2010-09-19 07:07:46 PDT
(In reply to comment #55)
> (In reply to comment #54)
> > my auto check doesn't appear to be working.
> 
> Bug 529364 exists. If proxy is used, Bug 575915 may occur.

(no proxy) it seems in my case it's not 529364 - I'm totally unable to get pop to auto get new mail.
Comment 57 David :Bienvenu 2010-09-20 06:56:40 PDT
Created attachment 476792 [details] [diff] [review]
patch with PR_Free
Comment 58 Wayne Mery (:wsmwk, NI for questions) 2010-09-25 06:52:56 PDT
(In reply to comment #57)
> Created attachment 476792 [details] [diff] [review]
> patch with PR_Free

another tryserver build for reporter/others to try? Or land on trunk?
Comment 59 David :Bienvenu 2010-09-25 11:26:10 PDT
try server keeps failing - I'll land this on trunk when the tree is open and I have time to land it.
Comment 60 Mark Banner (:standard8) 2010-09-27 00:08:40 PDT
(In reply to comment #59)
> try server keeps failing

If try server is really that bad, please let us know, we should fix it (unless it was due to trunk bustage at the time).
Comment 61 David :Bienvenu 2010-09-27 10:01:05 PDT
fixed on trunk. the try server builds were failing in different places on each platform, and were 3.1.x builds, so trunk bustage shouldn't be involved.
Comment 62 David :Bienvenu 2010-09-27 10:02:02 PDT
Comment on attachment 476792 [details] [diff] [review]
patch with PR_Free

I'd recommend this for 3.1.5 for sure, and potentially 3.0.9, since it can be a pretty good sized memory leak if you partially download some or all of your pop3 messages.
Comment 63 David :Bienvenu 2010-09-29 09:41:43 PDT
fixed for 3.1.5 and 3.0.9

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