Thunderbird UI freezes after viewing certificates on Mac

RESOLVED WORKSFORME

Status

--
critical
RESOLVED WORKSFORME
7 years ago
2 years ago

People

(Reporter: jsworley, Unassigned)

Tracking

(Depends on: 1 bug, {hang})

8 Branch
x86
Mac OS X

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [has stacktrace][do not DUPE])

Attachments

(2 attachments, 1 obsolete attachment)

(Reporter)

Description

7 years ago
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:8.0.1) Gecko/20100101 Firefox/8.0.1
Build ID: 20111120135848

Steps to reproduce:

Selected 'View Certificates' from the Account Settings:Security dialogue to look at and/or manage (delete, export) certificates


Actual results:

On Mac: after the 'View Certificates' and 'Security' windows are closed, the UI no longer responds to mouse clicks in the windows, e.g., one cannot select a new message or account to view. Pull-down menus still work. The only operation that seems to work is quitting Thunderbird. It is not necessary to modify the certificates to get the UI to freeze


Expected results:

Thunderbird should continue to work and respond to mouse clicks, etc., once the certificate menu is closed.

Comment 1

7 years ago
(In reply to John Worley from comment #0)
Start Thunderbird in safe made and try: http://kb.mozillazine.org/Safe_mode
Confirmed on TB 9. Could be some modal dialog issue, would be worth investigating if it happens with other dialogs accessible from the account settings window.
Status: UNCONFIRMED → NEW
Ever confirmed: true
(In reply to Mark Banner (:standard8) from comment #2)
> Confirmed on TB 9. Could be some modal dialog issue, would be worth
> investigating if it happens with other dialogs accessible from the account
> settings window.

Not on TB 10. the dialogs show up and the UI is fully functionnal.

And this WFM with Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:10.0a2) Gecko/20111127 Thunderbird/10.0a2

Comment 4

7 years ago
John can you reproduce using version 10 or 11?

If yes, are there steps missing which might explain why ludo can't reproduce?
Severity: normal → critical
Keywords: hang
Whiteboard: [closeme 2012-04-15]
(Reporter)

Comment 5

7 years ago
The bug is still present in 11.0:

    On Thunderbird 11.0, MacOS 10.6.8:

    (1) Select Tools -> Account Settings
    (2) Select Security
    (3) Click on View Certificates
    (4) Select any certificate - no need to view or modify
    (5) 'OK' back to main window
    (6) The GUI is frozen

    A couple of other factors: Thunderbird is managing 3 different
accounts, and I have a lot of certificates.
(In reply to John Worley from comment #5)
> The bug is still present in 11.0:
 
>     A couple of other factors: Thunderbird is managing 3 different
> accounts, and I have a lot of certificates.
Can you define a lot ?

Would be nice to have a stack trace. Could you try to get a stack using gdb as explained at https://wiki.mozilla.org/Thunderbird:Testing:Get_A_Debug_Thunderbird_Hang_Stack (it's a bit outdated). You'll need symbols for that (see https://developer.mozilla.org/en/Using_the_Mozilla_symbol_server and you might need to edit line 65 of the python script  so it recognizes comm-central as well as mozilla-central).

John do you think you get get us a stack trace ?

Comment 7

7 years ago
John, version 12 comes out shortly. If you no longer see the hang, please change the bug resolution to WORKSFORME please.  Otherwise, we really need your stacktrace
Keywords: stackwanted
Whiteboard: [closeme 2012-04-15] → [closeme 2012-05-11]
RESOLVED INCOMPLETE due to lack of response to previous question. If you feel this change was made in error, please respond to this bug with your reasons why.
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → INCOMPLETE

Comment 9

5 years ago
I'm getting this bug behavior now on Thunderbird 24.5.0 on OS X 10.9.3.

I can reliably reproduce it by:
* Launch Thunderbird
* Tools -> Account Settings
* Select "Security" in the first account
* View Certificates button
* In the Certificate Manager that pops up, double-click one of the listed certificates to pop it open in a new Certificate Viewer. It pops up behind the Certificate Manager window, not in front.

At this point, most of the UI is hung. The Certificate Manager window is responsive. I can do stuff in there, and close it. And the Account Settings dialog is responsive. But all the Certificate Viewer windows, the main UI window, and any messages I had open in other windows are unresponsive. The main menu is responsive, and I can quit and do other actions like make new message windows, but their UI widgets are unresponsive. As if there was a modal dialog up.

Attaching an Activity Monitor sample file of Thunderbird in this unresponsive state as "stack sample - Thunderbird - while dialogs hung after viewing certificate.txt".

Can this bug be re-opened? Or should I file another one?

Comment 10

5 years ago
Created attachment 8425565 [details]
Activity Monitor sample while hung after viewing certificate

Comment 11

4 years ago
Here's a workaround.

Thunderbird -> Preferences -> Advanced -> View Certificates

Mark a certificate and press the View button.

Comment 12

4 years ago
The workaround works for me. Thanks.

I'm still seeing the hang in the daily build. The linked instructions for getting a backtrace don't work for me. I'm on OS X 10.9.5, and gdb is not included. But I was able to use lldb to get one; I hope that works as well. Sorry about the formatting. Attaching as certificate-hang-backtrace-apjanke-01.txt.

Comment 13

4 years ago
Created attachment 8517817 [details]
Backtrace of hang after viewing certs

Added attachment of backtrace captured from lldb using `script`. Taken on OS X 10.9.5 using nightly build from http://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/2014-11-05-03-02-02-comm-central/

Comment 14

4 years ago
Created attachment 8517821 [details]
Backtrace of hang after viewing certs (cleaned up with dos2unix)
Attachment #8517817 - Attachment is obsolete: true

Comment 15

4 years ago
That workaround gave me a good lead, and I think I see where this is happening.

In mail/components/preferences/advanced.js (the one from the workaround that's well-behaved), the Certificate Manager is invoked like this.

  showCertificates: function ()
  {
    document.documentElement.openWindow("mozilla:certmanager",
                                        "chrome://pippki/content/certManager.xul",
                                        "", null);
  }

And in mailnews/extensions/smime/content/am-smime.js, it's invoked like this.

function openCertManager()
{
  // Check for an existing certManager window and focus it; it's not
  // application modal.
  let lastCertManager = Services.wm.getMostRecentWindow("mozilla:certmanager");
  if (lastCertManager)
    lastCertManager.focus();
  else
    window.openDialog("chrome://pippki/content/certManager.xul", "",
                      "centerscreen,resizable=yes,dialog=no");
}

Maybe there's something about the window.openDialog(,"...dialog=no") that's making it ill-behaved on Mac. Something about the relationship of modal dialogs to their child and parent windows.

If I remove the "dialog=no", then this no longer causes the hang. However, in the case where the certManager is not already displayed in a different window, it's displayed in a modal sheet-style dialog, instead of as a separate window. This is a bit inconsistent; if this workaround is used, I would probably make it a dialog unconditionally and never reuse the independent window. Like the following. The downside is that this allows two Certificate Managers to be on screen at once; I don't know if that's safe.


function openCertManager()
{
  window.openDialog("chrome://pippki/content/certManager.xul", "",
                 "centerscreen,resizable=yes");
}


Anyone know what's the right way to bring up independent windows from a modal dialog? Is the current am-smime.js code correct, and there's just an issue with the window modality implementation on OS X?

The hanging behavior doesn't happen on Windows or Linux for me I tested Thunderbird on Windows 7 using the current release, and Icedove 31.2.0 on Debian, using the same steps to reproduce, and the UI doesn't hang on either.

The "Security Devices" button next to "View Certificates" has the exact same behavior, and uses the same code pattern.

Comment 16

4 years ago
janke, 
are you seeing this with version 31?  
And version 38 beta from http://www.mozilla.org/en-US/thunderbird/channel/ ?

xref bug 1149411
Flags: needinfo?(janke)

Comment 17

4 years ago
Hi Wayne,

Still happens for me with version 31.6.0.
Still happens for me with version 38.0 beta that I downloaded just now.

I'm following my original steps to reproduce, from my earlier post. Am on OS X 10.9.5. Happens both with my main OS user account that has several mail accounts and certificates set up in Thunderbird, and with a fresh account I created to test this, with a single mail account and a single client certificate loaded.
Flags: needinfo?(janke)

Comment 18

4 years ago
thanks for retesting
Status: RESOLVED → REOPENED
Keywords: stackwanted
Resolution: INCOMPLETE → ---
Summary: Thunderbird UI freezes after viewing certificates → Thunderbird UI freezes after viewing certificates on Mac
Whiteboard: [closeme 2012-05-11] → [has stacktrace]

Comment 19

4 years ago
Looks like there's an even simpler reproduction. In 31.6.0 or Beta 38.0, I can get it to hang by just:

1. Tools > Account Settings
2. Select Security in the first account
3. Click View Certificates

No need to view an individual certificate; this is sufficient. Once I close the View Certificates dialog and the Account Settings window, the main UI window will be frozen: can't resize it, and it won't respond to clicks anywhere in it.

Updated

3 years ago
Duplicate of this bug: 1149411

Comment 21

3 years ago
bug 476541 is a big pain in the ... everywhere. Well, at least for Mac users. If we duped this bug to it, that would make this bug lucky #13 in the list of Thunderbird bugs marked as duplicates http://mzl.la/1PL07rI  

Do we need a project of some sort to get traction on this classic Mac problem?
Depends on: 476541
Whiteboard: [has stacktrace] → [has stacktrace][do not DUPE]

Comment 22

2 years ago
Do you still see this problem when using version 45?
Flags: needinfo?(jsworley)
Flags: needinfo?(calum.mackay)
(Reporter)

Comment 23

2 years ago
Version 45 appears to have fixed the UI-freeze issue; however, now the certificate window management is borked. I will be filing a new bug to cover that issue.
Flags: needinfo?(jsworley)

Comment 24

2 years ago
I'm on Daily; fine for me now, thanks.
Flags: needinfo?(calum.mackay)

Comment 25

2 years ago
I'm on the 45.1.0 release and it is fixed for me as well. Thanks.

Comment 26

2 years ago
Thanks for the comments. So perhaps it got fixed by Bug 1224790. (which was blocking bug 476541)

(In reply to John Worley from comment #23)
> now the certificate window management is borked. I will be filing a new bug to cover
> that issue.

Thanks for filing bug 1277558
Status: REOPENED → RESOLVED
Last Resolved: 7 years ago2 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.