Hovering some hyperlinks causes 100% CPU usage, memory leaks and UI hangs after landing patch from bug #1356317

VERIFIED FIXED in Firefox 56



2 years ago
2 years ago


(Reporter: Virtual, Assigned: spohl)


(9 keywords)

56 Branch
Windows 7
dogfood, hang, memory-footprint, memory-leak, nightly-community, perf, regression, reproducible, topperf

Firefox Tracking Flags

(firefox-esr52 unaffected, firefox54 unaffected, firefox55 unaffected, firefox56+ verified)



(2 attachments, 1 obsolete attachment)

[Tracking Requested - why for this release]:

1. Open this website page - https://bugzilla.mozilla.org/show_bug.cgi?id=1357486#c41
2. Scroll down to " Treeherder Bug Filer" comment
3. Hover bug 1379721 (or do it here)
and enjoy 100% CPU usage, memory leak eating nearly all memory and GUI hang
FYI - Also set to "Off" "Use modal user interface" preference in Bugzilla General Preferences ( https://bugzilla.mozilla.org/userprefs.cgi?tab=settings )
Keywords: footprint, mlk
Summary: Mozilla Firefox Nightly 56.0a1 (2017-07-10) (64-bit) using 100% CPU, leaks memory and hangs on some links hovering → Disabled modal Bugzilla user interface causes Firefox to use 100% CPU, memory leak and hang on some links hovering
status-firefox54: ? → unaffected
status-firefox55: ? → unaffected
status-firefox-esr52: ? → unaffected

Comment 3

2 years ago
Regression window:

Regressed by: Bug 1356317
Blocks: 1356317
Flags: needinfo?(spohl.mozilla.bugs)
Keywords: regressionwindow-wanted


2 years ago
Component: Untriaged → Graphics: Layers
Product: Firefox → Core

Comment 4

2 years ago
Created attachment 8885267 [details]
reduced html
Thank you Alice0775 White very much for finding specific regression range!
Has Regression Range: --- → yes
Has STR: --- → yes

Comment 6

2 years ago
I'm able to reproduce and I'm looking into it.
Assignee: nobody → spohl.mozilla.bugs
Flags: needinfo?(spohl.mozilla.bugs)
Summary: Disabled modal Bugzilla user interface causes Firefox to use 100% CPU, memory leak and hang on some links hovering → Hovering some hyperlinks causes 100% CPU usage, memory leaks and UI hangs after landing patch from bug #1356317

Comment 7

2 years ago
Kris, could you take a look at this as well? I've observed a continuous increase in memory consumption when displaying the tooltip when hovering links, but the memory consumption reverts to its initial state once the mouse is moved and the tooltip disappears. At this point, I don't believe we're dealing with a memory "leak", but rather some kind of unnecessary, continuous memory allocation. Unfortunately, I've been unable to isolate where or why this is occurring so far.
Flags: needinfo?(kmaglione+bmo)

Comment 8

2 years ago
At the risk of possibly stating the obvious, a tooltip (which is displayed when hovering a link) is a popup and gIsPopupCompositingEnabled is set to false, which is why previous to attachment 8881870 [details] [diff] [review] landing, we would not use OMTC.

Comment 9

2 years ago
Created attachment 8885792 [details] [diff] [review]

This basically restores attachment 8881870 [details] [diff] [review], but changes nsWindow::ShouldUseOffMainThreadCompositing() to enable OMTC for remote content. This fixes the issue reported in this bug. However, I'm not sure if this change is satisfactory because I don't know if we're also experiencing excessive memory consumption with OOP WebExtension popups.
Attachment #8885792 - Flags: feedback?(kmaglione+bmo)
Tracking 56+ for this regression.
tracking-firefox56: ? → +
I think we should probably just disable OMTC for "small" popups, which would include things like tooltips and menus:

Flags: needinfo?(kmaglione+bmo)

Comment 12

2 years ago
Created attachment 8885851 [details] [diff] [review]

As suggested. I've confirmed that this fixes the memory consumption issue for me locally.
Attachment #8885792 - Attachment is obsolete: true
Attachment #8885792 - Flags: feedback?(kmaglione+bmo)
Attachment #8885851 - Flags: review?(kmaglione+bmo)
Attachment #8885851 - Flags: review?(kmaglione+bmo) → review+
On Windows tool tips in bugzilla currently aren't displaying. Possibly a dupe of this bug?
(In reply to Jim Mathies [:jimm] from comment #14)
> On Windows tool tips in bugzilla currently aren't displaying. Possibly a
> dupe of this bug?

never mind, appears this is caused by level 3 sandboxing.

Comment 16

2 years ago
I'm setting this to checkin-needed to get a second pair of eyes on it before landing. The try run seemed to show a lot of failures, but I was unable to determine if those were all just known intermittents, or if this patch would introduce new failures. For comparison, here is a try run with this patch applied:


And here is a try run with a patch that should just behave as nightly does right now:


Rather than just introduce some whitespace for the second patch, I wanted to run a try run with a patch that touches the same files as the first patch. This was to make sure that we rebuild the same files and run the same tests. I've noticed before that a no-op patch with just some added whitespace does not necessarily trigger the same tests to run. It appears to me that both try runs show almost exactly the same failures, which leads me to believe that these are known intermittents. Is this correct?
Keywords: checkin-needed

Comment 17

2 years ago
Pushed by ryanvm@gmail.com:
Fix high memory consumption when hovering links on Windows. r=kmag
Keywords: checkin-needed

Comment 18

2 years ago
Last Resolved: 2 years ago
status-firefox56: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
I'm confirming that this issue is fixed, starting since Mozilla Firefox Nightly 56.0a1 (2017-07-15).
Thank you very much! \o/
status-firefox56: fixed → verified
You need to log in before you can comment on or make changes to this bug.