Bug 4379 - Hangs with 100% CPU when opening particular mail
Summary: Hangs with 100% CPU when opening particular mail
Status: RESOLVED WORKSFORME
Alias: None
Product: Claws Mail (GTK 2)
Classification: Unclassified
Component: Other (show other bugs)
Version: 3.17.6
Hardware: PC Linux
: P3 normal
Assignee: users
URL:
Depends on:
Blocks:
 
Reported: 2020-09-01 16:12 UTC by Chris Wyatt
Modified: 2020-10-02 12:32 UTC (History)
0 users

See Also:


Attachments
Log (168.35 KB, text/x-log)
2020-09-01 16:12 UTC, Chris Wyatt
no flags Details
Email (26.08 KB, text/plain)
2020-09-01 16:14 UTC, Chris Wyatt
no flags Details

Description Chris Wyatt 2020-09-01 16:12:37 UTC
Created attachment 2084 [details]
Log

When trying to open a particular message, the interface hangs and the process uses 100% of a CPU core.

The last line in the log is this:

textview.c:1165:Viewing text content of type: plain (length: 1867)
Comment 1 Chris Wyatt 2020-09-01 16:14:05 UTC
Created attachment 2085 [details]
Email

I've attached the email in question
Comment 2 Paul 2020-09-01 16:21:08 UTC
displays without any problems here
Comment 3 Chris Wyatt 2020-09-01 16:23:54 UTC
I'm having the same problem with 2 other LinkedIn messages, too. I'm not having the issue with all emails from LinkedIn, however.

If I configure Claws to prefer the HTML part of the email, it does not hang, so it looks like it might be specific to the text/plain part of the email.
Comment 4 Chris Wyatt 2020-09-01 16:25:48 UTC
Thanks Paul. My best guess at the moment is some kind of Unicode issue. I'll do some more testing my end, and see if I discover anything else.
Comment 5 Chris Wyatt 2020-09-01 17:33:29 UTC
So, there appears to be something strange going on. I tried removing most of the plain text part of the email, and gradually pasting it back in. I didn't paste in most of the empty lines, and did not experience any hangs.

Then I reinstated the entire text/plain part again, and it hung.

After more playing about, it seemed to stop hanging as long as I removed any random lines (even if the line is empty) or if I added new lines.

So, from what I can tell, it relates to the specific number of lines in the email. I looked at 2 of the emails giving me the problem. Encoded (with quoted-printable), one has 51 lines (in its text/plain part) and the other has 52. Decoded, they both have 33 lines. I would need to do more investigation to be sure that it was definitely related to there being 33 lines.

If I run it through strace, I can see lots of BRK calls, approximately once every second. I'm wondering if this has something to do with it.

If it helps, I'm running a fully up-to-date Arch (64 bit). I'm having the problem both with the package from the repo, and one I compiled myself using claws-mail-git (AUR).
Comment 6 Paul 2020-09-01 19:35:25 UTC
try downgrading pango.

Arch is bleeding-edge, and bugs particular to Arch have been reported before. They "disappear" without any change in claws-mail.
Comment 7 Chris Wyatt 2020-09-01 23:59:40 UTC
Okay, thank you. I can live with this bug for now, but if I do try downgrading Pango, I will report back here, if the ticket is still open.

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