Closed Bug 116798 Opened 23 years ago Closed 23 years ago

Opening IMAP mail hangs Mail program (and Mozilla)

Categories

(Core :: Networking, defect, P1)

x86
Linux
defect

Tracking

()

RESOLVED FIXED
mozilla0.9.9

People

(Reporter: Ram.Rao, Assigned: darin.moz)

Details

(Keywords: hang)

Attachments

(4 files)

Every couple of weeks I get an administrative mail message from a mailing list.
 Whenever I try to access this mail off an Exchange IMAP server, the mail
program hangs, and Mozilla has to be killed and restarted.  This is reproducible.

I have forwarded this message (using Outlook) to a Cyrus IMAP server running on
Tru64 UNIX.  Accessing this forwarded message from the Cyrus IMAP server causes
the hang once again.

This message that causes Mozilla problems has been successfully accessed off
Exchange using the Evolution 1.0 IMAP client on Linux.

Would be glad to forward the troublesome mail to an IMAP mail server for your
testing.  Please give me an address to forward it to.

Thanks for a great IMAP client!  Inspite of this problem, it is by far the most
robust IMAP client I have found on Linux.

Ram Rao
Ram.Rao@compaq.com
Reporter:
Can you try to access your mail with disabled Java plugin ?
(Edit\preferences\advanced)
Disabled Java plugin.  Accessing mail still hangs Mozilla.
I was able to reproduce the problem by including the contents of this
attachment as the body of a message to myself.
I accessed the imap server that Matthias Versen had installed my problematic
mail on.  Once again my Mozilla 0.9.7 hung as I tried to access the mail.
The offending line in the message is 

   replace the "=" with an "@". Then send a message to majordomo@ornl.gov

Mozilla chokes on the "@". I believe ( I hope it doesn't crash the browser as
well :), trying to convert it to and email address.

I verified this by remove this line from the email message, using a editor to
the Inbox file and restarting.  The mail no longer was a problem.

I will include a full backtrace.  I started under gdb and Ctrl+C'ed when it went
into the loop in nsReadingIterator<unsigned short>::advance(int) in
nsStringIterator.h:372 .  This happens about frame 9

I'm running a two day old CVS build as of right now ( I don't have my build ID)

[mozilla@bashful mozilla]$ uname -a
Linux bashful 2.4.7-10 #1 Thu Sep 6 17:27:27 EDT 2001 i686 unknown
[mozilla@bashful mozilla]$ gcc -v
Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.0.2/specs
Configured with: /tmp/gcc-3.0.2/configure --prefix=/usr
Thread model: single
gcc version 3.0.2
[mozilla@bashful mozilla]$ more .mozconfig
ac_add_options --prefix=/usr/local/mozilla
ac_add_options --enable-extensions=default,irc
ac_add_options --enable-leaky
ac_add_options --enable-jprof
ac_add_options --enable-xpctools
ac_add_options --enable-optimize=-O2
ac_add_options --enable-crypto
ac_add_options --disable-strip

Attached file mozilla backtrace
Session backtrace
-> Browser Networking (mozTXTToHTMLConv)
(CC  bienvenu@netscape.com)
Assignee: mscott → neeti
Severity: major → critical
Status: UNCONFIRMED → NEW
Component: Networking - IMAP → Networking
Ever confirmed: true
Keywords: hang
Product: MailNews → Browser
QA Contact: huang → benc
cc'ing darin
let see if we can fix this for .99  
Target Milestone: --- → mozilla0.9.9
I tried this with the 2002010903 build and didn't hang. Perhaps this has been
fixed? Can someone else try it with a more recent build?
I hanged with latest build with the following assertion running all over the screen:

###!!! ASSERTION: Infinite loop: can't advance a reading iterator beyond the end
of a string: 'one_hop>0', file ../../../dist/include/string/nsStringIterator.h,
line 174
###!!! Break: at file ../../../dist/include/string/nsStringIterator.h, line 174
Darin: Could you review the patch?
Assignee: neeti → darin
Comment on attachment 65646 [details] [diff] [review]
suggested patch, v1

sr=darin, please seek review from someone on the mailnews team as well.
Attachment #65646 - Flags: superreview+
Priority: -- → P1
Comment on attachment 65646 [details] [diff] [review]
suggested patch, v1

Would it be possible/correct to fix FindUrlStart and FindUrlEnd not to return
TRUE in these cases, instead of changing the caller? Even though there is
currently only one caller of these routines, it seems wrong to make all the
potential callers check if the returned pos is correct. Or am I
misunderstanding this patch? I realize the code is very very difficult to
decipher.
bienvenu: it's possible... let me investigate this some more.
I didn't move those checks into FindUrlXXX just because I wasn't 100% sure
I fully understood the code. (My initial intention was to include them
there, but I was confised the fact that some |case|es has such a check,
but others not....
moved boundary checks into FindURL(Start|End).
Status: NEW → ASSIGNED
Keywords: patch
Comment on attachment 68314 [details] [diff] [review]
suggested patch, v2

r=bienvenu, thx
Attachment #68314 - Flags: review+
Comment on attachment 68314 [details] [diff] [review]
suggested patch, v2

sr=darin ... i'll check this in once the tree opens.
Attachment #68314 - Flags: superreview+
fixed-on-trunk
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: