A use has many mail folders, when he launch thunderbird, he got an error which says that "too many files open". I found that user's .msf files are opened without closing.
Created attachment 430230 [details] [diff] [review] proposed fix with unit test This should fix the issue, which was that if you have subscription turned off, verifying the existence of sub-folders caused us to leave db's open. Writing the unit test for the fix exposed several other issues, which I've fixed, but I need to verify the fixes for tomorrow.
Assignee: nobody → bienvenu
Status: NEW → ASSIGNED
I've got confirm from the user, the patch does fix the bug. Thanks
Created attachment 430388 [details] [diff] [review] proposed fix with unit test The main fix is to close the msg database after doing a list folder url. We only do this if imap subscription is turned off, so to make the unit test work, I had to fix an issue trying to turn off imap subscription - the prev attempt to move to frozen linkage continues to be the gift that keeps giving! And I noticed an unrelated issue introduced at the same time, so I fixed that as well. The unit test creates a 4 level folder hierarchy, which causes us to ListFolders to verify existence. I think there's a separate issue w/ escaping of folder uris in this mode, but fixing that is scary and shouldn't block this fix.
Comment on attachment 430388 [details] [diff] [review] proposed fix with unit test - if (serverKey.IsEmpty()) + if (!serverKey.IsEmpty()) Oh dear! (I don't know about the rest of the patch but even if it doesn't belong on the branch then I would have thought that these do.) >+ if (!m_verifiedAsOnlineFolder) The logic might be slightly easier to read if you either a) reversed this condition and switched the blocks or b) unconditionally cleared the database, assuming this won't have a detrimental effect on removing the subfolder.
fix checked in - I did unconditionally clear the database; that should be fine. The serverKey empty stuff mostly just means we need to restart to change from subscription to non-subscription, or vice versa, afaict, so I don't think it's a huge deal.
Status: ASSIGNED → RESOLVED
Last Resolved: 9 years ago
OS: Solaris → All
Hardware: x86 → All
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 3.1b2
Comment on attachment 430388 [details] [diff] [review] proposed fix with unit test I think the fix would be fine for 3.04, but not absolutely required. imap subscription is the default, and this patch only affects the case where you're not using imap subscription. That being said, a surprising number of users/enterprises turn off subscription, from what I can tell.
Attachment #430388 - Flags: approval-thunderbird3.0.4?
User wants to get it fixed in 3.0.4, so I suggest to fix it in 3.0.4 if possible.
(In reply to comment #6) > (From update of attachment 430388 [details] [diff] [review]) > I think the fix would be fine for 3.04, but not absolutely required. imap > subscription is the default, a Might this cause big performance issues similar to what has been fixed in other cases where dbs aren't closed? And this is "show only subscribed folders"? I have it unchecked :) for reasons I no longer remember.
Assignee: bienvenu → nobody
Component: General → Backend
Product: Thunderbird → MailNews Core
QA Contact: general → backend
Target Milestone: Thunderbird 3.1b2 → ---
(In reply to comment #8) > (In reply to comment #6) > > (From update of attachment 430388 [details] [diff] [review] [details]) > > I think the fix would be fine for 3.04, but not absolutely required. imap > > subscription is the default, a > > Might this cause big performance issues similar to what has been fixed in other > cases where dbs aren't closed? Well, only with third level folders, and beyond, so of somewhat limited scope. > > And this is "show only subscribed folders"? This is if you don't have it checked. The default is that it should be checked... > I have it unchecked :) for reasons I no longer remember. Some enterprise deployments tell there users to uncheck it, usually because they also deploy other apps that talk to the server (e.g., webmail) that don't maintain subscription.
Attachment #430388 - Flags: approval-thunderbird3.0.4? → approval-thunderbird3.0.4+
fixed for 3.0.4
status-thunderbird3.0: --- → .4-fixed
Summary: Too many .msf file open → Too many .msf file open with many third level folders and Show only subscribed folders unchecked/disabled
Whiteboard: [has patch for review]
You need to log in before you can comment on or make changes to this bug.