Bug 3039 - displaying one specific html email lead in 100% CPU usage
Summary: displaying one specific html email lead in 100% CPU usage
Status: RESOLVED FIXED
Alias: None
Product: Claws Mail (GTK 2)
Classification: Unclassified
Component: UI/Message View (show other bugs)
Version: other
Hardware: PC Linux
: P3 normal
Assignee: users
URL:
Depends on:
Blocks:
 
Reported: 2013-12-20 22:17 UTC by bits_n_bytes
Modified: 2014-05-18 18:47 UTC (History)
0 users

See Also:


Attachments
compressed html email which cannot be displayed (28.40 KB, application/x-bzip)
2013-12-20 22:17 UTC, bits_n_bytes
no flags Details

Description bits_n_bytes 2013-12-20 22:17:10 UTC
Created attachment 1310 [details]
compressed html email which cannot be displayed

Hi,

when I try to view the attached email (it's a spam mail) the CPU goes up to 100% and Claws Mail becomes unusable and needs to be killed.

used version
Claws Mail: 3.8.1
Fancy plugin: 0.9.16

kind regards
Frank
Comment 1 Andrej Kacian 2013-12-21 11:30:14 UTC
I can confirm this. The issue seems to be somewhere in our HTML parser, where some code path gets into an infinite loop.
Comment 2 Paul 2013-12-21 14:06:40 UTC
while I do get the high CPU percentage, if I wait a while, say a minute or so, the CPU usage does return to normal and Claws does become active again and doesn't need to be killed. The message appears to have over a megabyte of text all on one line.
Comment 3 bits_n_bytes 2014-01-03 20:09:08 UTC
Hello Paul,

> while I do get the high CPU percentage, if I wait a while, say a minute or
> so, the CPU usage does return to normal and Claws does become active again

I tried it now with the Fancy plugin and can confirm that after waiting a longer period the email is rendered and showed.

kind regards
Comment 4 Colin Leroy 2014-05-18 14:45:28 UTC
This is a Webkit issue...
Comment 5 Colin Leroy 2014-05-18 18:07:39 UTC
Reopening - it's the internal HTML parser that is at fault.
Comment 6 users 2014-05-18 18:43:03 UTC
Changes related to this bug have been committed.
Please check latest Git and update the bug accordingly.
You can also get the patch from:
http://git.claws-mail.org/

++ ChangeLog	2014-05-18 20:43:03.537815079 +0200
http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=d31231158bab6cef97de3b3bd36dc3b8bd13ca2f
Merge: 1927817 d0c64a0
Author: Colin Leroy <colin@colino.net>
Date:   Sun May 18 20:43:03 2014 +0200

    Merge branch 'master' of file:///home/git/claws

http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=d0c64a09767e097b52264d247b0c9a6486c92509
Author: Colin Leroy <colin@colino.net>
Date:   Sun May 18 20:42:04 2014 +0200

    Fix bug 3039 more - Why read line by line?

http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=373d079b4f9ac62ae1f9eaca202f29f9d4ed6b4a
Author: Colin Leroy <colin@colino.net>
Date:   Sun May 18 20:40:04 2014 +0200

    Fix bug 3039, very long parsing time in HTML email. Avoid strcasestr
    on very long buffers.
Comment 7 users 2014-05-18 18:43:06 UTC
Changes related to this bug have been committed.
Please check latest Git and update the bug accordingly.
You can also get the patch from:
http://git.claws-mail.org/

++ ChangeLog	2014-05-18 20:43:03.537815079 +0200
http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=d31231158bab6cef97de3b3bd36dc3b8bd13ca2f
Merge: 1927817 d0c64a0
Author: Colin Leroy <colin@colino.net>
Date:   Sun May 18 20:43:03 2014 +0200

    Merge branch 'master' of file:///home/git/claws

http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=d0c64a09767e097b52264d247b0c9a6486c92509
Author: Colin Leroy <colin@colino.net>
Date:   Sun May 18 20:42:04 2014 +0200

    Fix bug 3039 more - Why read line by line?

http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=373d079b4f9ac62ae1f9eaca202f29f9d4ed6b4a
Author: Colin Leroy <colin@colino.net>
Date:   Sun May 18 20:40:04 2014 +0200

    Fix bug 3039, very long parsing time in HTML email. Avoid strcasestr
    on very long buffers.
Comment 8 Colin Leroy 2014-05-18 18:47:19 UTC
And re-closing, it should be much better and near-instant now.

Note You need to log in before you can comment on or make changes to this bug.