Browser freezes due to unresponsive script when opening password manager

RESOLVED DUPLICATE of bug 1429560

Status

()

defect
RESOLVED DUPLICATE of bug 1429560
9 months ago
9 months ago

People

(Reporter: linus.kardell+mozillabugs, Unassigned)

Tracking

60 Branch
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Reporter

Description

9 months ago
User Agent: Mozilla/5.0 (Android 8.1.0; Mobile; rv:62.0) Gecko/62.0 Firefox/62.0
Build ID: 20180906142540

Steps to reproduce:

Entered preferences and opened the password manager. Thia is on OpenSUSE Leap 15.0 with Firefox  ESR 60.2.0 from the main repo, and I have a master password set. 


Actual results:

Entire browser freezes, and eventually I get a dialog about chrome://passwordmgr/content/passwordManager.js:266 being unresponsive. If I stop the script, the password manager opens but without functionality. 


Expected results:

Password manager opens and functions normally.
Component: Untriaged → Preferences
Hi Linus,

Thanks for reporting. If you're willing, can you install the Gecko Profiler add-on from https://perf-html.io/, start profiling, reproduce the issue, and as soon as you stop the script, dump the profile and share it with us?

I've included instructions for gathering, dumping and sharing a profile at the end of this comment. Note that the instructions suggest using Nightly, but in this case, I think you can continue to use Firefox 62.0 to gather the profile.

https://developer.mozilla.org/en-US/docs/Mozilla/Performance/Reporting_a_Performance_Problem
Flags: needinfo?(linus.kardell+mozillabugs)

Comment 2

9 months ago
(In reply to Linus Kardell from comment #0)
> Entire browser freezes, and eventually I get a dialog about
> chrome://passwordmgr/content/passwordManager.js:266 being unresponsive. If I
> stop the script, the password manager opens but without functionality. 

https://dxr.mozilla.org/mozilla-esr60/rev/6546ee839d3002b595765008da323eb2422f0317/toolkit/components/passwordmgr/content/passwordManager.js#266

suggests this is the sort() taking a very long time.

A sort should normally be O(n log n). So I have 2 suspicions: (1) there are a lot of passwords; (2) the sort comparator is not stable, meaning we might not finish sorting.

Reporter, this is going to sound dumb, but how long have you waited to let the password manager open up? Does it eventually appear (after taking far too long, or something) ?

And, separately, if you right click a password field (e.g. on the login page for bugzilla in a private window), go to 'fill login, and select 'view saved logins' in the dropdown, does the password manager dialog load successfully?

Matt, any chance you could take a look at the sort comparator and doublecheck there's no way the sort could be unstable?
Component: Preferences → Password Manager
Flags: needinfo?(MattN+bmo)
Product: Firefox → Toolkit
Password Manager is only receiving critical bug fixes at the moment due to it not being prioritized. Hopefully the prioritization will be addressed next year.
Status: UNCONFIRMED → RESOLVED
Closed: 9 months ago
Flags: needinfo?(MattN+bmo)
Resolution: --- → DUPLICATE
Duplicate of bug: 1429560
Reporter

Comment 4

9 months ago
(In reply to Mike Conley (:mconley) (:⚙️) from comment #1)
> Thanks for reporting. If you're willing, can you install the Gecko Profiler
> add-on from https://perf-html.io/, start profiling, reproduce the issue, and
> as soon as you stop the script, dump the profile and share it with us?

https://perfht.ml/2I3GoH1

(In reply to :Gijs (he/him) from comment #2)
> Reporter, this is going to sound dumb, but how long have you waited to let
> the password manager open up? Does it eventually appear (after taking far
> too long, or something) ?

It does indeed appear eventually.
Flags: needinfo?(linus.kardell+mozillabugs)
Reporter

Comment 5

9 months ago
The browser also freezes for a long time when I try to log into websites.
The profile from comment 4 shows we're talking to an SQLite database on the main thread:

https://perfht.ml/2RtEHXE
QA Contact: MattN+bmo
Whiteboard: [fxperf]
(In reply to Mike Conley (:mconley) (:⚙️) from comment #6)
> The profile from comment 4 shows we're talking to an SQLite database on the
> main thread:
> 
> https://perfht.ml/2RtEHXE

There is no SQLite in password manager but yes, we read JSON once asynchronously and then keep it in memory for the session, unless we need synchronous access before it's done initializing.

This bug is already duped to bug 1429560 btw.
QA Contact: MattN+bmo

Updated

9 months ago
Whiteboard: [fxperf]
You need to log in before you can comment on or make changes to this bug.