Closed
Bug 415135
Opened 17 years ago
Closed 17 years ago
Slow/Hang/lock-up on long From lines in header with high cpu
Categories
(MailNews Core :: MIME, defect)
MailNews Core
MIME
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: bugs.mozilla.org, Assigned: mnyromyr)
References
Details
(Keywords: hang, perf, verified1.8.1.13)
Attachments
(2 files)
180.30 KB,
text/plain
|
Details | |
2.02 KB,
patch
|
neil
:
review+
neil
:
superreview+
dveditz
:
approval1.8.1.13+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11 Build Identifier: 2.0.0.9 (20071031) I received a message with a very long From line. Whenever this message moved into the message list view through scrolling, Mozilla hung/locked up. Removing the inbox index file, and/or rebuilding it did not fix the problem. Removing this particular From: line from the message using a text editor resolved the problem. Reproducible: Always Steps to Reproduce: 1. Receive this particular message. 2. Scroll your Inbox so it should include this message. Actual Results: 3. Observe hung mail client. Expected Results: 3. Message is displayed, with some truncation of From header I will enclose the message itself in an attachment.
I cut this message out of my Inbox. It was the last message in the Inbox; don't know if that matters to the reproducibility of the bug.
Assignee | ||
Comment 2•17 years ago
|
||
Whew, 182644 characters in the From: line (RfC 2822 allows for 998), almost all of them illegal, because of the missing charset declaration. Anyway, we shouldn't hang on that... Which version of which program are you using? You're talking of Mozilla, your User-Agent says Firefox, but product is set to Thunderbird...
Assignee | ||
Comment 3•17 years ago
|
||
Anyway, happens for SeaMonkey as well, and the problem is, that comi18n.cpp::utf8_nextchar is just grossly slow... <http://mxr.mozilla.org/seamonkey/source/mailnews/mime/src/comi18n.cpp#170>
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee | ||
Comment 4•17 years ago
|
||
The function utf8_nextchar calls strlen for each of the 180000 characters, which results in a 12s hang even on my machine _per_ usage of the header. On display, it's parsed several times (eg on each repaint), which makes the app very unresponsive...
Assignee: nobody → mnyromyr
Status: NEW → ASSIGNED
Attachment #300752 -
Flags: superreview?(neil)
Attachment #300752 -
Flags: review?(neil)
Assignee | ||
Updated•17 years ago
|
Assignee | ||
Updated•17 years ago
|
Assignee: mnyromyr → nobody
QA Contact: front-end → mime
Assignee | ||
Updated•17 years ago
|
Assignee: nobody → mnyromyr
I'm using Thunderbird 2.0.whatever (as pasted in the "product release" field). That old implementation of utf8_nextchar() was criminally bad! strlen() just isn't a useful function for parsing text.
Comment 6•17 years ago
|
||
Comment on attachment 300752 [details] [diff] [review] optimized UTF-8 recognition Well, the code looks fine, but I have to admit it looks to me as if return str + 1; would work all the time...
Attachment #300752 -
Flags: superreview?(neil)
Attachment #300752 -
Flags: superreview+
Attachment #300752 -
Flags: review?(neil)
Attachment #300752 -
Flags: review+
Assignee | ||
Comment 7•17 years ago
|
||
Comment on attachment 300752 [details] [diff] [review] optimized UTF-8 recognition It's worth having on branch as well, imo - after nine years. ;-)
Attachment #300752 -
Flags: approval1.8.0.15?
Assignee | ||
Comment 8•17 years ago
|
||
Landed on trunk, thus closing. Waiting for branch approval, though. Jon, you might want to grab tomorrows nightly build and check with a *test* profile.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Comment 9•16 years ago
|
||
Comment on attachment 300752 [details] [diff] [review] optimized UTF-8 recognition Is this still wanted for 1.8.0.15? If so, please make sure this gets approval in the 1.8.1.x branch, too.
Attachment #300752 -
Flags: approval1.8.1.13?
Comment 11•16 years ago
|
||
Comment on attachment 300752 [details] [diff] [review] optimized UTF-8 recognition approved for 1.8.1.13, a=dveditz for release-drivers
Attachment #300752 -
Flags: approval1.8.1.13? → approval1.8.1.13+
Assignee | ||
Comment 12•16 years ago
|
||
Comment on attachment 300752 [details] [diff] [review] optimized UTF-8 recognition Landed on MOZILLA_1_8_BRANCH. I didn't intend to ask for 1.8.0.x, thanks for correcting me. :)
Attachment #300752 -
Flags: approval1.8.0.15?
Updated•16 years ago
|
Keywords: fixed1.8.0.13
Updated•16 years ago
|
Keywords: fixed1.8.0.13 → fixed1.8.1.13
Comment 14•16 years ago
|
||
I verified this in Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.13pre) Gecko/2008030903 Thunderbird/2.0.0.13pre using the trash folder from bug 424349. It hung TB 2.0.0.12 and the above 2.0.0.13pre build was able to deal with this. Marking this as verified for 1.8.1.13.
Keywords: fixed1.8.1.13 → verified1.8.1.13
Comment 15•16 years ago
|
||
broaden summary
Summary: Hang/lock-up on long From lines → Slow/Hang/lock-up on long From lines in header with high cpu
Updated•16 years ago
|
Product: Core → MailNews Core
You need to log in
before you can comment on or make changes to this bug.
Description
•