Closed Bug 1562544 Opened 5 years ago Closed 5 years ago

Already running Firefox Hangs for 2-3 minutes and all tabs refresh after starting any v8 Javascript Engine based product

Categories

(Core :: Performance, defect, P2)

67 Branch
defect

Tracking

()

RESOLVED DUPLICATE of bug 1495900
Performance Impact medium

People

(Reporter: 0vximcmlxxv, Unassigned, NeedInfo)

Details

(Keywords: perf:responsiveness)

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0

Steps to reproduce:

I start any v8 Javascript engine based product (e.g. Chrome, Slack, Visual Code etc)

Actual results:

  1. Already running Firefox tabs refresh themselves and then do not load for atleast 2 to 3 minutes
  2. CPU usage shoots up, with all WebExtensions process taking most of the CPU cycles.

Expected results:

Firefox tabs should not be affected at all and CPU usage should not shootup.

Hi @0vximcmlxxv, tried to reproduce the issue but without success. Please try on the latest nightly, you can find it on the link: https://nightly.mozilla.org/, also please record a performance profile, here is the link to do that: https://developer.mozilla.org/en-US/docs/Mozilla/Performance/Reporting_a_Performance_Problem - further I will ask for help to Mike Conley. Provide us the list of web-extensions you've installed.
Additionally, I will set a component, if isn't the right one please fell free to change it.

Component: Untriaged → JavaScript Engine
Flags: needinfo?(0vximcmlxxv)
Product: Firefox → Core

Hi Mike, please can you take a look of the results of the performance profile after @0vximcmlxxv will send it?
thanks.

Flags: needinfo?(mconley)

I expect the tabs refreshing themselves is due to bug 675539, which is set to be disabled in 68 (and in 67 via Normandy) in bug 1558930.

0vximcmlxxv, if you manually disable tab unloading, by visiting about:config and setting browser.tabs.unloadOnLowMemory to false, does the problem persist?

Flags: needinfo?(mconley)

This sounds similar to bug 1495900.

@Liviu / @Mike / @Andre
Sorry for the delay in sharing the profile. Please find it uploaded at https://perfht.ml/32zBZ8j

I will also try suggestions from Mike and post my findings here.

Thanks,

Flags: needinfo?(0vximcmlxxv)

@Mike
The browser.tabs.unloadOnLowMemory is already false in my browser case.

I am on Firefox 68.0 released on July 9, 2019.

Thanks.

Looking at the profile from comment 5, this does not seems to be a JavaScript issue.
The profile of the Compositor process seems to have has gaps in the VSync timestamps, maybe this is the source of these hangs.

However, I have no good idea on how to help you investigate this issue.

Component: JavaScript Engine → Untriaged
Product: Core → Firefox

If this isn't a suitable one, please fell free to change it.
Thanks.

Component: Untriaged → DOM: Core & HTML
Product: Firefox → Core

(unclear where this bug should go, so perhaps perf team could analyze, or qf)

Component: DOM: Core & HTML → Performance
Whiteboard: [qf:?]

@0vximcmlxxv,

Would you be able to capture another profile of the tabs refreshing using Firefox nightly from https://www.mozilla.org/en-CA/firefox/channel/desktop/ and please enable the "Memory" feature in the profiler add-on. If you could also comment on the specs of your machine (especially memory), that would be useful for us to try and reproduce. Thanks!

Flags: needinfo?(0vximcmlxxv)

@Denis

Please find the profile uploaded at https://perfht.ml/2SG0DzQ. I have enabled 'Memory' feature in the profiler add-on. This time while capturing the profile, Firefox Nightly was hung for approx. 9 minutes.

I have 32GB of RAM and 16GB of swap space. I am on Ubuntu OS 18.04, with elementaryOS Pantheon Desktop running on top of it.

Please let me know if any additional information is needed.

@Denis, Please let me know if any additional information is needed.

Hm - it's rather difficult to make much sense of the profile in comment 11 because there are so many missing samples. The sampling frequency is set at 1ms, but there are massive gaps between each sample, suggesting that either the sampled or sampling threads are CPU starved.

In the few samples that I do see, I notice that the content and WebExtension processes have big event processing delays, and a number of samples handling font updates from the system... this is really starting to smell like a dupe of bug 1495900.

Whiteboard: [qf:?] → [qf:p2:responsiveness]
Priority: -- → P2

I actually see this behavior on my machine. I will take an action to try to capture a profile.

Flags: needinfo?(whawkins)

As promised, here is a profile!

https://perfht.ml/2q3W8oV

Scenario for capture: This is a build from central/tip; I opened the browser to about:home; No other tabs were running; I started Slack; I attempted to click on three buttons; I let the capture run until those tabs are loaded.

I have not yet looked at the profile, but the browser behaved the way that the reporter described. As I said in a previous comment, this is a behavior that I have been seeing a while now. I never really put 2 and 2 together.

I will look into the profile tomorrow and, perhaps, begin analysis. Let me know if there is anything else I can do to help!

Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(whawkins) → needinfo?(mconley)

There's a big hang in FcInitReinitialize, where the OS appears to be scanning for fonts.

Presuming what whawkins is seeing is what the original reporter is seeing, then this is a dupe of bug 1495900.

Duping for now - feel free to un-dupe if it turns out that the original reporter is experiencing something different from whawkins.

Status: NEW → RESOLVED
Closed: 5 years ago
Flags: needinfo?(mconley)
Resolution: --- → DUPLICATE
Performance Impact: --- → P2
Whiteboard: [qf:p2:responsiveness]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: