Closed Bug 1318934 Opened 8 years ago Closed 7 years ago

Long term Firefox use on Windows 10 with suspend/resume exacerbates ntdll.pdb calls

Categories

(Core :: DOM: Content Processes, defect)

50 Branch
x86_64
Windows 10
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: koenigseggcc, Unassigned)

Details

Attachments

(2 files, 1 obsolete file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:50.0) Gecko/20100101 Firefox/50.0
Build ID: 20161104212021

Steps to reproduce:

Run Firefox 50 with 7-8 tabs kept open over the course (I can provide a list if necessary--but should not matter) of a couple of days with various suspend/resume operations.


Actual results:

Major I/O lag specifically in web content (UI bar is fine). Typing out the text for this issue is painful. Having chat widows like Google Hangouts open long term is equally painful. With eletrolysis, the UI still maintains its responsiveness. CPU usage is through the roof according to control panel.

Cleopatra profiling shows that the vast majority of time is spent in ntdll.pdb. Restarting Firefox will fix the issue.


Expected results:

No loss in responsiveness without requiring a restart of Firefox.
It turns out my Google-fu is better than my bugzilla-fu. My issue seems to be releated to https://bugzilla.mozilla.org/show_bug.cgi?id=934256
OS: Unspecified → Windows 10
Hardware: Unspecified → x86_64
Attached file Cleopatra profile
Profile showing 80%+ CPU usage in ntdll.pdb
Mike, when time permits, could you please take a look over the Cleopatra report and see if there are some more useful info?
Thank you!
Flags: needinfo?(mconley)
Looking at the profile, there's a "PmTwitterStyle.TwitterHeight" function on pm.gc.ca that has what appears to be a DOM Mutation observer firing very, very frequently.

Is the pm.gc.ca site one that you commonly have open when you are in this situation? Does closing it help address the issue?
Flags: needinfo?(mconley) → needinfo?(koenigseggcc)
It is indeed one of the persistent tabs that I've kept lately. I'll try to get rid of it, so will let you know.

Btw, that TwitterHeight function must have been called for the live Twitter feed from https://pm.gc.ca/eng/contactpm. Surprised that would be screwing up.
I've now eliminated that tab, and have not reproduced the issue as such.
It seems that having a large number of tabs open and then loading an intensive page like Facebook, or Google Maps can also cause this while the page loads. I'll attempt to get a profile.
Component: Untriaged → DOM: Content Processes
Product: Firefox → Core
I have been able to reproduce the performance issue I was seeing on input a couple of times, but I cannot do so with reliability. The few times I saw the issue, I was not able to enable Cleopatra or otherwise profile the browser. Is there another way for me to externally profile the process from Windows 10?
Flags: needinfo?(koenigseggcc) → needinfo?(mconley)
(In reply to Kenan from comment #8)
> I have been able to reproduce the performance issue I was seeing on input a
> couple of times, but I cannot do so with reliability. The few times I saw
> the issue, I was not able to enable Cleopatra or otherwise profile the
> browser. Is there another way for me to externally profile the process from
> Windows 10?

Microsoft ships a few performance measurement tools, but it can only look so deeply into Gecko's internals The Gecko Profiler Add-on and Cleopatra are really the best tools for the job here.

However, unfortunately, profiling on 64-bit Windows is a bit of a pain recently due to bug 1323460, which causes Firefox to periodically perma-hang when profiling a 64-bit build on Windows.

You could try something like UIforETW. See https://randomascii.wordpress.com/2015/09/01/xperf-basics-recording-a-trace-the-ultimate-easy-way/
Flags: needinfo?(mconley)
Firefox 51 has made this issue really bad. It's so bad and repeatable (after suspend/resume and remote desktop sessions) that Cleopatra's ability to write files is impaired. I'll attach screenshots and ask you for what else you need.
Flags: needinfo?(mconley)
As stated in my last comment, I was unable to write the profile to disk from Firefox, so using screenshots instead.
(In reply to Kenan from comment #11)
> Created attachment 8832135 [details]
> Screenshot of cleopatra call tree in Firefox 51
> 
> As stated in my last comment, I was unable to write the profile to disk from
> Firefox, so using screenshots instead.

Instead of writing the profile to disk, can you click Share instead and post the URL it generates?

The screenshot shows that we're running some expensive JS from "scorecardresearch" which, I believe, is some kind of marketing company.
Flags: needinfo?(mconley) → needinfo?(koenigseggcc)
I'm trying, but both buttons are so slow to respond that I am unable to do anything with them. Currently typing this from the same problematic instance of Firefox, and the text input is really slow too. May have to restart for now.
Attachment #8832135 - Attachment is obsolete: true
Flags: needinfo?(koenigseggcc)
Another machine reproduced it! You might be right. That scorecard research thiingy has appeared yet again.
Flags: needinfo?(mconley)
Indeed, the scorecardresearch stuff is showing up again. You might want to try installing an ad-blocker like uBlock or AdBlock Plus?
Flags: needinfo?(mconley)
I can accept that as a short term workaround, but presumably other browsers are not too burdened by the load of this JavaScript.

If you can tell me that further content process isolation will likely be the fix, then I can accept that, but this is the kind of issue where Firefox doesn't exhibit the issue until sleep/wake or remote desktop->local access. Furthermore, restarting the browser with all the same tabs doesn't hurt performance until one of the aforementioned is done.
After doing some more testing, I can accept the diagnosis and solution. I'm reasonably confident the further process sandboxing will address the issues I'm seeing.
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: