Bug 375445 - KMail2 hangs with 100% CPU usage when trying to preview or read large emails from IMAP server
Summary: KMail2 hangs with 100% CPU usage when trying to preview or read large emails ...
Status: RESOLVED DUPLICATE of bug 387061
Alias: None
Product: kmail2
Classification: Applications
Component: commands and actions (show other bugs)
Version: 5.10.3
Platform: OpenSUSE Linux
: NOR major with 20 votes (vote)
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-23 11:56 UTC by Rodney Baker
Modified: 2019-04-22 17:35 UTC (History)
4 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 Rodney Baker 2017-01-23 11:56:12 UTC
KMail2 hangs when trying to read large text-based emails (~22MB Log files) from a Dovecot IMAP server. The emails are never shown in the preview window and KMail2 becomes unresponsive. CPU Usage for the KMail2 process goes to 100% and stays there. Memory usage gradually increases as the email is presumably parsed but the preview is never displayed, even after CPU usage eventually returns to normal and KMail again becomes responsive (takes >5 minutes). 

At the same time, none of the akonadi processes show unusual CPU or memory usage (if anything, perhaps unusually low, as if it is not actually doing a whole lot). 

By comparison, Mozilla Thunderbird can read the same emails from the same IMAP server and account without issues. The initial preview is shown immediately as the rest of the message is parsed (which does take some time, but Thunderbird remains responsive).
Comment 1 George L. Emigh 2017-02-11 22:28:13 UTC
I have the exact same problem with Kmail and Dovecot IMAP Server 

After this version of Kmail came out, I thought I'd give it another try, it's been a few years since Kmail stopped being usable for me, and I would really like to return to it, this problem is still a blocker, I have hundreds of large emails, and Thunderbird opens them fine, and quickly I might add, but Kmail can't even get a 1.2 Meg email open, Have not found the lower limit yet, I'll try and test it when I can get Kmail to actually start again.

Software
KDE Plasma Version: 5.9.1
KDE Frameworks Version: 5.30.0
QT Version: 5.7.1
Kernel Version: 4.9.9-gentoo
OS Type: 64-bit

Hardware
Processors: 4 x AMD Phenom(tm) II X4 970 Processor
Memory: 15.7 GiB of RAM
Comment 2 Rodney Baker 2017-03-13 15:06:26 UTC
In version 5.4.2 this behaviour has now changed. The message is still never displayed, but at least KMail does not hang, and if I open the message and select "View Source" I can view the entire message (and it loads very quickly). Nothing I can do, however, makes it display in the preview window or by opening the message, except when viewing the message source.
Comment 3 George L. Emigh 2017-04-25 22:04:19 UTC
(In reply to Rodney Baker from comment #2)
> In version 5.4.2 this behaviour has now changed. The message is still never
> displayed, but at least KMail does not hang, and if I open the message and
> select "View Source" I can view the entire message (and it loads very
> quickly). Nothing I can do, however, makes it display in the preview window
> or by opening the message, except when viewing the message source.

In KMail Versiom 5.5.0 it is still working as you are describing accept viewing source is not very fast, but my machine may be slower than yours, also in the 1.2 MiB email size some are readable in the normal way, others are not, and a 9.5 MiB email took 3 minutes 44 seconds to view source, and like most large emails, never show in the preview pane. Also view source consumes 100% of one CPU until the view source loads.
Comment 4 George L. Emigh 2017-04-25 22:14:07 UTC
Oh and just an FYI, Thunderbird reads the 9.5 MiB email in the preview pane from my local Imap server in only 3 seconds.
Comment 5 Karsten Künne 2017-08-08 14:20:05 UTC
I have the same problem with kmail 17.04.2 (openSUSE Leap 42.3). I haven't figured out the limit yet, it seems to be around 1.2 MB. Every message larger than that is not displayed in the preview window. I have to use "View Source" in order to see it. This is only one of the annoying bugs of kmail besides the ugly scrollbar and the flickering of the preview window caused by the html sidebar, the non-printing support, and others. I'm very close to the breaking point in giving up on kmail. It seems to getting worse with every release. (Sorry for the rant)
Comment 6 Rodney Baker 2017-08-08 14:56:20 UTC
Version 5.5.3, I now cannot even use View Source to display large messages. The log file messages I'm speaking of are ~22MB. They are plain text messages and show the "No HMTL Message" side bar but the messages are never displayed, even with View Source. I concur - this is getting worse, not better.
Comment 7 George L. Emigh 2017-12-15 23:12:50 UTC
Platform: Gentoo
Qt: 5.9.3
KDE Frameworks: 5.41.0
plasmashell 5.11.4
kmail2 5.7.0

Decided to try again after upgrading to kde-apps 17.12.0, Still cannot read large emails, thus kmail is still useless, will try again on the next update.
Comment 8 Rodney Baker 2017-12-16 00:59:53 UTC
Likewise - is anyone actually working on this bug?
Comment 9 Rodney Baker 2018-01-12 15:52:12 UTC
The silence is deafening...
Comment 10 George L. Emigh 2018-01-13 21:00:09 UTC
After the most recent update kmail2 5.7.1 still broken for large emails here.
Comment 11 George L. Emigh 2018-03-06 00:17:17 UTC
Kmail2 5.7.2 still broken for large emails here.
Comment 12 George L. Emigh 2019-03-02 22:11:01 UTC
Well I thought it was about time to try again, and the problem still exists, what is really odd if I select View Source from the message drop down window it can viewed in there, (Using Thunderbird I just opened a 8.5MB email in about 3 seconds) Kmail Preview and opening the email in it's own window cannot even  manage a ~1.1MB email.

So all that work they have put into Kmail and I still cant use it.

Please FIX it so that it can read large emails.

plasmashell 5.15.2
Qt: 5.12.1
KDE Frameworks: 5.55.0
kmail2 5.10.2
Comment 13 George L. Emigh 2019-03-28 23:28:34 UTC
Tried it again, still refuses to read large emails, back to Thunderbird - sigh
View source opens it...

Gentoo
Qt: 5.12.2                                                                                                                          
KDE Frameworks: 5.56.0                                                                                                              
kf5-config: 1.0                                                                                                                                                                   
kmail2 5.10.3
Comment 14 Rodney Baker 2019-04-22 13:30:52 UTC
Updated version on bug. Still no developer activity by the looks of it. Care factor for kmail2 bugs seems very low.
Comment 15 Christophe Giboudeaux 2019-04-22 17:35:00 UTC
See https://bugs.kde.org/show_bug.cgi?id=387061#c5

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