100% load of CPU during mozilla's mail client starting

RESOLVED FIXED

Status

MailNews Core
Networking: IMAP
RESOLVED FIXED
16 years ago
10 years ago

People

(Reporter: Arkady Sherman, Assigned: Bienvenu)

Tracking

({perf})

Trunk
x86
Windows 2000

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments)

(Reporter)

Description

16 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1b) Gecko/20020822
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1b) Gecko/20020822

When i start mail client window with enabled chek IMAP server for new messages
at start up, that opens and does nothing for one or half minute, with CPU load
being 100%. And if i open any url at the same time in new window, it shows
"Resolving host for ..." until mail client goes to normal mode. 

Reproducible: Always

Steps to Reproduce:
1. -
2. -
3. -

Actual Results:  
-

Expected Results:  
-

Updated

16 years ago
Keywords: perf
(Assignee)

Comment 1

16 years ago
Is this new behaviour? can you attach an imap protocol log?

http://www.mozilla.org/quality/mailnews/mail-troubleshoot.html#imap
(Reporter)

Comment 2

16 years ago
Created attachment 96613 [details]
imap log file from the bug reporter
(Reporter)

Comment 3

16 years ago
Created attachment 96614 [details]
imap log file from the bug reporter
(Reporter)

Comment 4

16 years ago
Yes that is relatively new bug. There was no the bug at least in build 20020810...

And the IMAP log file seems to be clear during establishing the connection with
100% cpu usage.

Another comment: while loading any message the cpu usage is also 100%,even if
connection has been already established.
(Reporter)

Comment 5

16 years ago
This bug can be observed when i launch mail window first ("C:\Program
Files\mozilla.org\mozilla\mozilla.exe" -mail). There is no the bug when is
launch at first just brouser ("C:\Program Files\mozilla.org\mozilla\mozilla.exe").
(Reporter)

Comment 6

16 years ago
Excuse me for my importunity, but.
I've got dial-up connection to internet. Before this bug in older builds when i
launched mozilla mail and connection to internet had been broken, there was
immediately message - Failed to connect to server mail.ksu.ru. But now that is
only after some time (half minute), with cpu usage being 100% during this time.
My cpu is AthlonXP 1600+ ;-).
(Assignee)

Comment 7

16 years ago
taking, and fix upcoming.
Assignee: mscott → bienvenu
Status: UNCONFIRMED → NEW
Ever confirmed: true
(Assignee)

Comment 8

16 years ago
Created attachment 96686 [details] [diff] [review]
proposed fix

If we didn't get any data from the stream, sleep for 50 milliseconds to avoid
hogging cpu - otherwise, hog away!
Comment on attachment 96686 [details] [diff] [review]
proposed fix

sr=sspitzer
Attachment #96686 - Flags: superreview+
(Assignee)

Comment 10

16 years ago
This change makes it so if we didn't get any data from the stream, we sleep for
50 milliseconds before processing pending events. This makes us behave more or
less like we used to in the case where we haven't gotten any data, but should
still allow us to process data as quickly as possible when there is data. I
tried putting in a PR_Sleep(PR_INTERVAL_NO_WAIT) instead, but I still saw CPU
useage go up to 100% while waiting for data.

Comment 11

16 years ago
Comment on attachment 96686 [details] [diff] [review]
proposed fix

r=mscott

I'll try it out on my opt. build later today but I didn't want to hold up the
train on this getting in.
Attachment #96686 - Flags: review+
(Assignee)

Comment 12

16 years ago
*** Bug 164632 has been marked as a duplicate of this bug. ***
(Assignee)

Comment 13

16 years ago
fix checked in.
Status: NEW → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → FIXED

Comment 14

16 years ago
My bug 164632 is not during the IMAP startup. It is during the download of
attachments. 
Status: RESOLVED → REOPENED
Resolution: FIXED → ---

Comment 15

16 years ago
I will try tomorrow's build....
(Assignee)

Comment 16

16 years ago
no reason to re-open this bug.
Status: REOPENED → RESOLVED
Last Resolved: 16 years ago16 years ago
Resolution: --- → FIXED

Updated

16 years ago
QA Contact: huang → gchan
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.