Closed Bug 115370 Opened 24 years ago Closed 23 years ago

Hang when logging to SSL dlg with Expunge Inbox on Exit checked

Categories

(MailNews Core :: Security, defect, P2)

x86
Windows 2000

Tracking

(Not tracked)

VERIFIED WORKSFORME

People

(Reporter: lchiang, Assigned: KaiE)

References

Details

(Keywords: hang, Whiteboard: [adt2 RTM],custrtm-)

Attachments

(2 files)

Hang when logging to SSL dlg with Expunge Inbox on Exit checked Win32 2001-12-14-06 trunk build Setup: IMAP account set up with the following setting selected in Account Settings: a. Check to "Clean Up (Expunge) Inbox on Exit" b. Use SSL to login I have QuickLaunch enabled (but I don't think this makes a difference) 1. Start Mail. Log in by giving your SSL password. 2. From the Mail window, File | Exit 3. A prompt for your cert password (SSL) comes up 4. You can type in the password text field, but if you press Cancel or OK, the application will hang. You have to End Task via the Windows Task Manager. Note: There is not a problem if you don't enable SSL in Account Settings for your mail acocunt. You are able to proceed to step 4 and complete it if you use your normal IMAP password. Assigning to security folks first since this is a PSM dlg.
reassign to ssaux
Assignee: mstoltz → ssaux
Keywords: hang
I cannot reproduce this. Lisa, are you still having this problem? It might be related to temporary mail server slowness in Expunging Inbox on Exit at that time.
Yes, I still see this: Win2K 2001-12-17-06-trunk build. I can show you if you want. I don't understand why I am seeing this dlg for my security password. Would exiting and then expunging prompt this?
I still cannot reproduce this. Lisa, are you still having this problem?
I saw this the other day on a January build. Let me get the specifics to you on Monday.
I am still seeing this on Win32 2002-01-14 trunk build. John, stop by and I can show you. I must end the task via Windows Task Manager.
I just showed this to Stephane today. This bug is still occurring.
Here's one theory. Because you use ssl/imap, you need to log in to your key database in order to access your imap folders. When you select expunge on exit, it's possible that the application can't guarantee the order in which it will do the following: 1) log you out of the software security device and forgetting any ssl session you may have with the imap server on NSS shutdown 2) expunge your folder. It the order is as described, then when you try and access the folder to expunge, it may decide that the cached ssl session on your ssl/imap is stale (or not there), and it will then try to restablish the connection to the ssl server, including the client auth part. I also note that you're using turbo mode. Have you tried to turn this off and see if it makes any difference?
update: build 2002-02-19-18 trunk When I disable the option to expunge on exit, I do not see the dlg prompting for the cert password after I choose File | Exit.
The problem is that this dlg appears hung to me. It will not continue after I click OK or cancel.
-> me
Assignee: ssaux → kaie
Keywords: nsbeta1
Javi is running into a bug similar to this. http://bugscape.netscape.com/show_bug.cgi?id=12738
I just tried to reproduce the problem and was unable to. In order to prepare a profile that matches your's as closely as possible, I need to know more details from your configuration. 1.) When you access mail in step 1, which prompt do you see? Do you see - "Mail Server Password required" or do you see - "Please enter the master password for the Software Security Device" 2.) The prompt you see in step 3, is it the same dialog you see in step 1, or is it a different prompt? 3.) What is your setting in Edit/Preferences/Privacy/Certificates? Is "Client Certificate Selection" - "Select automatically" or is it - "Ask Every time" 4.) What is your setting in Edit/Preferences/Privacy/Passwords? Is "Remember passwords" checked or unchecked? 5.) When you go to aka.mcom.com, what prompt do you see? - No prompt, or, if you had not used your cert in your session yet, "Enter master password" or is it - "Enter username and password for..." Thanks!
Still see this in 3-25 trunk build Win2K. All I do is File | Exit from the mail window. Answers: 1.) When you access mail in step 1, which prompt do you see? - "Please enter the master password for the Software Security Device" 2.) The prompt you see in step 3, is it the same dialog you see in step 1, or is it a different prompt? - Same dialog as step 1 3.) What is your setting in Edit/Preferences/Privacy/Certificates? Is "Client Certificate Selection" - "Select automatically" 4.) What is your setting in Edit/Preferences/Privacy/Passwords? Is "Remember passwords" checked or unchecked? Checked (but I don't use the PW mgr to remember my mail password) 5.) When you go to aka.mcom.com, what prompt do you see? - No prompt (this is the same session after I had logged into mail via SSL I wonder if something is wrong with my profile, but it still is a strange occurrence.
hmm, 4-1-2002 trunk build. I still see this dlg, but at least I am successful when I cancel out of this dlg now.
4-15-2002 1.0.0 branch build. I am back to seeing an application hang when I try to cancel out of that dlg at exit time. Very strange.
Finally I'm able to reproduce this problem. - it happens on Windows, but not on Linux - it indeed only happens when quicklaunch is enabled - the bug is on the 1_0_0 branch
Blocks: 108795
Status: NEW → ASSIGNED
After having selected file/exit, after all windows have gone away, the password prompt comes up again. I interrupted with the debugger, and recorded stack traces from three threads which looked interesting. The stack trace in the middle of this file is the main thread.
After selecting a button in the password prompt dialog, the application hangs. I interrupted again, and looked at the stack traces again. Only the main thread looks changed, which is attached in this file. Up to nsXULWindow::ShowModal the trace is identical to the one in the previous patch.
I guess the problem is, while the application exits, the application informs all components to do cleanup. Maybe at that time, it is already to late to handle user dialogs correctly? I don't know the answer to that question, Conrad, do you think that could be the cause of the hang? But anyway, a correct fix should prevent prompting the user again on exit. I believe the cause is that the security component responds to the "session-logout" event. At the time this event arrives, the security component forgets the password and returns to the not-logged-in state. I wonder whether we should introduce another round of notifications, maybe session-logout-security. This could be called last, to allow components requiring security logic to succeed with their cleanup code.
> I wonder whether we should introduce another round of notifications That sounds right. The "session-logout" is just a single notification so there isn't the opportunity to reconcile dependencies in cleaning up. The question is: how many and what phases are needed and what the dependencies may be? I'll lxr for "session-logout" and see.
http://lxr.mozilla.org/mozilla/search?string=session-logout Looking at what happens on "session-logout", it looks like one more phase (for PSM only) would do it.
Kai, it looks like you have a plan for this. Let me know if it's achievable.
Keywords: nsbeta1nsbeta1+
Priority: -- → P2
Whiteboard: [adt2 RTM]
For bug 137886, Seth and I put in a call to ShutdownCurrentProfile() when the app exits. http://lxr.mozilla.org/mozilla/source/xpfe/bootstrap/nsAppRunner.cpp#811 Notice that apprunner is passing 0 as the param which causes no notifications to be sent out. This was done because we quickly had to put this in for some other purpose (updating the timestamp of the profile) and we didn't have time to test the implications of a normal shutdown which would send out the notifications :-/ But, doing that, passing SHUTDOWN_PERSIST, would probably be the right fix for this.
Whiteboard: [adt2 RTM] → [adt2 RTM],custrtm-
This might have been fixed by the new turbo mode introduced by the checkin for bug 98673. Can someone confirm if this is so or not.
lchiang: With having turbo enabled, do you still see the problem with a recent branch build? If yes, do you see it with a recent trunk build, too? Thanks for testing.
Branch build 2002-06-05. I tried this with turbo enabled and disabled. I am able to exit cleanly. This is ok for you too, Kai?
I'm normaly not using Windows. I finally tested that myself, too. Using this morning's branch build, trying to reproduce the problem, I'm unable to. I can confirm, too, that it works now. Setting to WORKSFORME
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → WORKSFORME
Verified WFM.
Status: RESOLVED → VERIFIED
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: