Version: (using KDE 4.1.3) OS: Linux Installed from: SuSE RPMs kontact - kmail 4.1.0 crash - copying some 10000 mails allocates all memory, then it crashes, no bugtrack possible
wrong number - KMail Version 1.10.3
If you can reproduce the crash at will, may you read http://techbase.kde.org/Development/Tutorials/Debugging/How_to_create_useful_crash_reports and post a complete backtrace here? Thanks :) Also, you were copying the mails from (local|imap|dimap) to (local|imap|dimap)?
it allocates memory and swap, it crashes only if all memory and swap is allocated, if there is no memory there is no backtrace. copying the mails from local to imap (imap local, same computer) reproduceable test it and watch the memory
Confirmed in kmail 1.11.0 (kde 4.2.0) "release 102" (opensuse 64-bits).
Have the same problem with high mem usage while drag'n'dropping mails. For one mail it is about 60 mb allocated.
Just tried to copy some thousands mails to an dIMAP folder - kmail started up eating RAM
So this is still a problem in KDE 4.3.3
This will not be a problem in KDE SC 4.4. I've run kmail (from trunk, revision 1066898) using valgrind, and there are no memory leaks related to copying messages.
*** Bug 219652 has been marked as a duplicate of this bug. ***
*** Bug 221998 has been marked as a duplicate of this bug. ***
*** Bug 199266 has been marked as a duplicate of this bug. ***
Found some duplicates of this. Would be nice if someone could check whether the problem still exists in KDE 4.4
I'm not sure to which extent "my" bug (#199266) is a dupe, but the described event does not occur any longer. Hence #199266 is fixed from my observations. M.
sorry, bad news. A short test confirms that this issue still exists in KDE4.4: I'm using the kubuntu-ppa packages at http://ppa.launchpad.net/kubuntu-ppa/ppa/ubuntu kmail reports v1.13.0, kontact 4.4 copying one folder of ~1000 mails of ~318MB in total from one IMAPS server to another IMAPS made memory consumption raise incredibly: top tells: beginning: VIRT=190M RES=73M after: VIRT=2267M RES=1.4G memory is not freed after operation finishes. btw: a first test with a folder with subfolders resulted in an segfault most probably because one folder name includes a dot (root/a.b) which is the folder separator on the destination imap server. This should be checked by kmail in advance IMHO. Nevertheless some mails have been copied to a sub-sub-folder (root/a/b) but not all.
Jaime made sure, that there is no memory leak. But probably allocated memory is freed after the whole copy process. One of the duplicates even suggested that. The result is no memory leak, but it though can kill machines if the folders are big enough.
@Björn: I don't know what "made sure" means in this context but in my test the copy operation was completed and I waited some minutes more but the memory consumption did not change. This might happen only if copying from one server to another but the result is quite clear to me. Maybe you or someone else could try a similar test? Another comment: a mail client should be be able to copy or move folders much bigger than the memory available since only the mails currently being moved have to be kept in memory. So IMHO even if the memory would be freed after some time this behaviour is not acceptable and would be a bug. I really would appreciate if you could do a similar test with two imap servers. I had this problem since long with kmail and therefore always use Thunderbird or Outlook to move mails to my archive-account because of this defiency.
I do not remember if I copied them from one server to another or in the same server, or from one sever to local folders, sorry. But I'm actually so busy with work that I can no check it again in a near future.
I experienced this issue on 1.13.2 (KDE 4.4.2) copying ~12,000 messages (425MB) from a local to imap (not disconnected). It kept using memory until the linux out-of-memory killer killed the process, so no stack trace. It used at least more than 1GB of memory used before it was killed. In the end, it didn't copy any of the messages over at all, which makes me suspect that it's trying to load all messages into memory before copying any.
I experience the same issue here (Version 1.13.6). In top, the process grow up to 2G of VIRT size then crash. It is probably not a true memory leak because copying the same files in chunck of 100 mails worked without crash.
Can you try KMail2 from KDE 4.10 ?
Thank you for taking the time to file a bug report. KMail2 was released in 2011, and the entire code base went through significant changes. We are currently in the process of porting to Qt5 and KF5. It is unlikely that these bugs are still valid in KMail2. We welcome you to try out KMail 2 with the KDE 4.14 release and give your feedback.