Summary: | KMailCVT leaks lots of memory when importing maildir | ||
---|---|---|---|
Product: | [Unmaintained] kmail | Reporter: | Alex Richardson <arichardson.kde> |
Component: | kmailcvt | Assignee: | kdepim bugs <kdepim-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | jtscsousa, lambdae2, montel |
Priority: | NOR | ||
Version: | SVN trunk (KDE 4) | ||
Target Milestone: | --- | ||
Platform: | Unlisted Binaries | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 4.8.2 | |
Sentry Crash Report: | |||
Attachments: |
compressed Valgrind output (tested with much smaller number of mails)
compressed massif output |
Description
Alex Richardson
2010-12-02 11:50:00 UTC
Created attachment 53973 [details]
compressed Valgrind output (tested with much smaller number of mails)
I can confirm this in kde4.7.1, from Kubuntu 11.10 importing my 700mb mail dir to kmail2 took several hours and the memory usage got up to 1.8gb. The memory was rising even after the task was completed, so I terminated the process. This can be a problem if kmail2's migration assistant fails, and you need to import stuff manually. Created attachment 65674 [details]
compressed massif output
It is still present with current master. May also happen when importing other formats, but I only tested with importing from KMail.
As you can see from the attached massif log the memory is probably not leaked since it is freed on exit, however it is kept way too long (until importing has finished). When importing my old emails kmailcvt used over 2 Gigabytes of memory!
IMO the memory should be freed at least after every dir if not after every mail.
Still present in KDE 4.8. I have about 7Gb of kmail archives, which I want to import in kmail2 for reference. The import progresses and by the time it reaches 11% consumes 5566Mb do Virtual memory and 2729M of resident memory. This is a 4Gb machine with 4Gb swap, so I expect the process will be killed soon, like the fist time I tried to convert the folder. you use a kmail mail dir import filter or maildir filter import ? I call kmailcvt directly from the terminal (no kmail nor kontact launched) and select "Import KMail Maildirs and Folder Structure". Then I select a local folder, press next and select my ~/Mail folder. It starts to run and at about 9-11% stalls and finally is killed by the kernel for filling up both ram and swap. The only notice on the terminal is a simple 'killed'. Superficial verification of imported mail and folders indicates the the process was progressing fine until killed. Git commit eafff41025775a8a2c15cd3f26233bd8d50cb277 by Montel Laurent. Committed on 05/03/2012 at 21:59. Pushed by mlaurent into branch 'master'. Fix Bug 258551 - KMailCVT leaks lots of memory when importing maildir Akonadi::ItemCreateJob was never delete during importing so memory used increase a lot. (for example during importing 2 Go it takes 2.5Go virtual memory before, after my fix it takes just 400Mo) Too bad that it's will not in 4.8.1 FIXED-IN: 4.8.2 M +2 -0 mailimporter/filters.cpp http://commits.kde.org/kdepim/eafff41025775a8a2c15cd3f26233bd8d50cb277 Git commit 7e4953c54752dca8a10ad29adf2e225a96f8669a by Montel Laurent. Committed on 05/03/2012 at 21:59. Pushed by mlaurent into branch 'KDE/4.8'. Fix Bug 258551 - KMailCVT leaks lots of memory when importing maildir Akonadi::ItemCreateJob was never delete during importing so memory used increase a lot. (for example during importing 2 Go it takes 2.5Go virtual memory before, after my fix it takes just 400Mo) Too bad that it's will not in 4.8.1 FIXED-IN: 4.8.2 (cherry picked from commit eafff41025775a8a2c15cd3f26233bd8d50cb277) If we can't update kdepim source please add this patch to your source please. CCMAIL: kde-packager@kde.org M +2 -0 kmailcvt/filters.cxx http://commits.kde.org/kdepim/7e4953c54752dca8a10ad29adf2e225a96f8669a |