Closed Bug 1587785 Opened 6 years ago Closed 6 years ago

Disable background hang monitor for raptor tests

Categories

(Testing :: Raptor, task, P1)

Version 3
task

Tracking

(firefox72 fixed)

RESOLVED FIXED
mozilla72
Tracking Status
firefox72 --- fixed

People

(Reporter: rwood, Assigned: rwood)

Details

Attachments

(1 file)

No description provided.

Hi :jesup, :florian, is there a browser pref that I can use to turn this off? Thanks!

Flags: needinfo?(rjesup)
Flags: needinfo?(florian)

pref("toolkit.content-background-hang-monitor.disabled", false);

However, people have commented that this merely disables the reporting and you have to compile it out, and I've verified it starts BHMgr Monitor and BHMgr Processor threads even with the thread flipped. That needs to be fixed.

The DisableOnBeta() function calls BHM::Shutdown() on Master Process and sets sDisabled=true on content processes; however nothing stops it from starting BackgroundHangThread on Nightly -- and if I read this right (BackgroundHangMonitor::Startup()) it starts the BHM thread on any non-beta channel for master process (but not content processes). And I see BHM active in the Master process even with the pref flipped: https://perfht.ml/3261Zry

Note that BHMgr Monitor appears to not be an nsThread, and so the profiler can't capture it

However:

It was enabled for 1% of the beta population 5 years ago, then expanded to 100% of beta, it was turned off for beta 2 years ago (well, virtually turned off - userid? MOD INT32_MAX) in bug 1380081. It seems to be build-disabled in everything but Nightly now (via moz.build).

Flags: needinfo?(rjesup)

(In reply to Randell Jesup [:jesup] (needinfo me) from comment #2)

pref("toolkit.content-background-hang-monitor.disabled", false);

I had a quick look at the code and was under the impression that this pref is meant to disable BHR only for content processes. I don't think we currently have a pref that can completely turn it off.

To disable it for our performance test infrastructure, I wonder if the best way could be an environment variable. Either a new one that we could add in the BHR code and in the test harness, or an existing one already set by the test harness that we would start checking in the BHR code.

Flags: needinfo?(florian)
Priority: -- → P1

Randell, can you provide more background info on the overhead from BHR and how it may impact test results?

Flags: needinfo?(rjesup)

Hey all is there a consensus here on how this should cam be disabled? If it's just a matter of setting an environment variable in the production environment please just let me know and I can easily make that update, thanks!

The BHR can be disabled in content processes by setting this pref:
toolkit.content-background-hang-monitor.disabled to true
See Bug 1530617. There is currently no method to completely disable the BHR on Nightly.
With this pref set, I haven't personally seen BHR keeping any threads busy for long periods of time.

Assignee: nobody → rwood
Status: NEW → ASSIGNED
Pushed by rwood@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/dbbb3860dd3e Disable background hang monitor for raptor tests r=acreskey,stephendonner
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla72
Flags: needinfo?(rjesup)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: