Mozilla hangs while trying to connect to IMAP server as MailNews is closed



MailNews Core
Networking: IMAP
17 years ago
9 years ago


(Reporter: Ian Thomas ('thelem'), Assigned: Scott MacGregor)


Windows 2000

Firefox Tracking Flags

(Not tracked)


(Whiteboard: closeme 2008-05-10)



17 years ago
Steps to Reproduce:
1. Open Mozilla with a browser window and a MailNews window connected to an IMAP
2. Cut your connection to the internet
3. Close the MailNews window.

Actual Results: Mozilla will hang as it tries to connect to the IMAP server,
after a number of seconds it pops up an alert with 'cannot connect to mail
server' and tries to connect again. It fails, and shows the same alert and so
on. (I've never managed to get to the end of the loop, I just kill Mozilla).

Expected Results: Mozilla closes down happily

Build: 2001062218

Comment 1

17 years ago
I couldn't reproduce this problem by using 07-18-05-0.9.2 build.
After I disconnected from the dialup connection, I can close the mail & browser
successfully without hang.
Can I know more info about your server Settings of the mail/news account

Comment 2

17 years ago
Hmm, I can't reproduce this any more. If it comes back I'll reopen the bug.
Last Resolved: 17 years ago
Resolution: --- → WORKSFORME

Comment 3

17 years ago
Thanks for checking this bug.
Marking as verified based on Ian's comments & my verification.

Comment 4

17 years ago
Sorry - I was able to reproduce this bug last night, using build 2001072003

The best way to see this happening is to have a browser window open, and try to
interact with it just after you have closed the IMAP window.

I think it has something to do with Mozilla not being able to tell that the
network link has been cut. I use Windows Internet Connection Sharing, with my
main machine as a client. When I shutdown the ICS server and follow the steps
above I will get the hang, when I pull the network cable out of the back of my
machine I don't get the hang.

I've setup an account on my mail server which can be used for testing, the
details are as follows.
username: ftbr17236_5
password: mozilla
The email address for this account is
Resolution: WORKSFORME → ---

Comment 5

17 years ago
This bug looks similar to bug 96975, and the problems ChatZilla has had (bug
97288) with  network connections being drop 'from afar'. It seems that, in
general, if you break a connection in a way that Mozilla doesn't get told (like
killing the ICS server), it generally get's very upset by trying to use the
connection, and (I would hope) getting some low-level socket errors.

Without trying to trace the hang, I don't know what's cauing it, but to me it
looks like a general networking problem in all of Mozilla, not just specific to
one use (e.g. IMAP).

Comment 6

17 years ago
I'm very worried by something I saw today relating to this bug: I had Mail/News
window open, and a Browser window, and I put Mozilla into Offline mode from the
browser window. I then closed the Mail/News window, and Mozilla hung.

It's looking like it fails if there is any reason at all for not being able to
connect to something (probably the IMAP server) - even if the reason is simple
that we're in offline mode!

I'll go and check it out with the console turned on... see if that has any

Comment 7

16 years ago
The Bug is in fact reproducable on both my machines: Linux (SuSE 7.3) and
Windows 2000 using Mozilla 1.2.1

I use an IMAP account as well (Freemailer Synchronizing all
folders with "File->Offline->Download/Sync Now..." is no problem but when I set
the Mozilla mail client to offline mode it synchronizes all folders again
(interesting thing: the option "Make the messages in my Inbox available when I'm
working offline" in "Mail & Newsgroups Account Settings-><MAIL ACCOUNT>->Offline
& Disk Space" doesn't seem to effect this behaviour). After Mozilla signals that
it has gone offline (connection symbol lower right) it will hang all Mozilla
windows. A mozilla process will stay in the system/task manager (mozilla.exe
under Win2k; /opt/mozilla/mozilla-bin under Linux). If you kill this process
everything works fine again.

It doesn't matter if the internet connection is still alive or not.
And the bug only appears, when you go offline with the mail client. If you close
the connection within the browser the mail client won't sync the folders and
won't hang up.

Comment 8

16 years ago
Urgh... this is still happening in Mozilla 1.3a! (build 20021202)

I open MailNews, and a Navigator window, use *either* to go offline (click
offline icon in Navigator window, or in MailNews, which does a sync too) then
close MailNews window. Mozilla is then hung.

For reference, this setup has 3 SSL IMAP, 2 normal IMAP, 1 POP3 and 2 NNTP accounts.

Comment 9

16 years ago
Two settings seem to make Mozilla hang:
"Clean up ("Expunge") Inbox on Exit" and
"Empty Trash on Exit"

If you activate one of these options Mozilla will try to clean up the inbox or
trash folder on exiting. (Of course it will, you told it to do so.) The problem
is, that it has to keep a connection open for a while until it can finish it's
operation. If the user already went offline, this isn't possible.

It doesn't seem to matter if a 'real' connection to the internet is still open
or not. If Mozilla is in offline mode (connection symbol lower right) it will
hang. If it's in online mode it'll try to complete it's operation (and might
succeed if the 'real' connection is still open.)

Of course this problem can only affect IMAP accounts because the expunge
option only exists there.


16 years ago
QA Contact: huang → gchan

Comment 10

15 years ago
The problem still exists in 1.4a. Having set "Clean up ("Expunge") Inbox on
Exit" on an IMAP account, turning Mozilla into offline mode (connection symbol
lower right) and exiting it, it will hang. Having the clean-up box disabled,
everything works fine, i.e. mozilla closes.
Product: MailNews → Core

Comment 11

10 years ago
Rich, can you test if scenario comment 0 still happens in SM?

Comment 12

10 years ago
Ralph (I think from comment 10) wrote "I meanwhile switched to Thunderbird/Firefox. I just checked the issue with Thunderbird: It does not seem to hang anymore in the described situation."
Whiteboard: closeme 2008-05-10
No new useful information since April 2003, resolving incomplete.
Last Resolved: 17 years ago10 years ago
Resolution: --- → INCOMPLETE
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.