Bug 209208 - Opening IMAP account throws many error messages
Summary: Opening IMAP account throws many error messages
Status: RESOLVED DUPLICATE of bug 232962
Alias: None
Product: kmail
Classification: Applications
Component: IMAP (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-02 14:17 UTC by David Jander
Modified: 2010-04-02 11:59 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Jander 2009-10-02 14:17:06 UTC
Version:            (using KDE 4.3.1)
Compiler:          gcc (Ubuntu 4.4.1-4ubuntu4) 4.4.1 Packaged by ubuntu team for ubuntu 9.10
OS:                Linux
Installed from:    Ubuntu Packages

OS/Version: (K)ubuntu karmic latest (1-oct-2009) alpha with KDE-4.3.1

When configuring an IMAP e-mail account in KMail, and opening one of the account folders, several things go wrong, which are probably related, hence I put them in one bug report:

1.- I get an error-message for every sub-folder saying:
 'Cannot open file "~/.kde/share/apps/kmail/imap/.286385175.directory/.XXX.directory/YYY":
No such file or directory'

If I check the mentioned directory from a terminal, before I click on "OK" in the message box, I can verify the file exists and has read and write access.

2.- In my case the IMAP account contains a tree of folders and sub-folders. There are probably more than 1000 directories. So after a long while holding down the [Enter] key to click through all the OK buttons in the almost endless storm of error messages, the error message text chages to:

'Cannot open file "~/.kde/share/apps/kmail/imap/.286385175.directory/.XXX.directory/YYY":
Too many open files'

And sometimes in between there is a shorter error message dialog saying:

'Error while creating file XXX: Too many open files'

Looking inside /proc/<pid of kmail>/fd/, there are indeed 1000 open file-descriptors. Apparently this is the pre-configured maximum on my system, but anyway, kmail should NEVER keep all those files open in the first place.

I cannot use KMail like this, and in fact I never made it through all the error messages, to see what happens then. Every time I restart KMail, and repeating the procedure, the directories previously created are removed again, and the pain starts over!

Could this be a race-condition between two threads?

Additional information: The home directory (~) is on an NFS mounted drive, and this has been working fine for years throughout the KDE-3.x series. Before running KDE4 for the first time, I removed my .kde directory just in case.
Comment 1 David Jander 2009-10-02 14:26:13 UTC
There is a bug-report on ubuntu lauchpad for this issue:

https://bugs.launchpad.net/ubuntu/+source/kdepim/+bug/427191
Comment 2 David Jander 2009-10-20 09:52:42 UTC
After more investigation, problem number 2 seems unrelated to problem number 1 (which was gone after rebuilding KMail (??)). Problem 2 (now declared unrelated by me) still remains, so I opened a separate bug-report for it here:
https://bugs.kde.org/show_bug.cgi?id=210774
Comment 3 Björn Ruberg 2010-04-02 11:59:31 UTC

*** This bug has been marked as a duplicate of bug 232962 ***