Closed Bug 1557692 Opened 6 years ago Closed 5 years ago

Consider disabling "browser.tabs.unloadOnLowMemory" for all tests (Mochitest, Reftest, ...)

Categories

(Testing :: General, defect, P2)

defect

Tracking

(firefox78 fixed)

RESOLVED FIXED
mozilla78
Tracking Status
firefox78 --- fixed

People

(Reporter: whimboo, Assigned: gbrown)

References

Details

Attachments

(1 file)

Similar to bug 1553748 which handles that for Marionette and geckodriver.

With bug 675539 we got the tab unload feature in case of low memory conditions, which means that any open tab could potentially been unloaded. Currently this can causing an invalid browser reference in Marionette, and tests will fail.

Main reason is that we do not track any events on tabs which are currently not selected. And with the behavior the underlying tab's content just disappears.

I wonder if we should just disable this preference for the time being when Marionette is enabled. This would also include any tests as run via geckodriver.

https://searchfox.org/mozilla-central/rev/952521e6164ddffa3f34bc8cfa5a81afc5b859c4/browser/app/profile/firefox.js#509-510

(In reply to Gabriele Svelto [:gsvelto] from bug 1553748 comment #1)

I'm all for disabling tab unloading for all tests with the exception of browser/modules/test/browser/browser_TabUnloader.js which might enable it manually. It's a mechanism that might make tests non-deterministic so it's better having it off unless we want to test it explicitly.

(In reply to Gabriele Svelto [:gsvelto] from bug 1553748 comment #5)

Just one note: right now the TabUnloader.init() reads the browser.tabs.unloadOnLowMemory on startup and doesn't observe it any other way. So if we want to flip it at runtime a small change will be needed.

Geoff, could you or someone else have a look at this?

Flags: needinfo?(gbrown)

Andrew, any interest?

Flags: needinfo?(gbrown) → needinfo?(ahal)

This seems pretty important, but I'm not going to have time to do this any time before the end of H1. Maybe we can have a triage session in Whistler to try and figure out which P2's need to be bumped to P1 at the start of H2.

Flags: needinfo?(ahal)
Priority: -- → P2
Severity: normal → S3
Assignee: nobody → gbrown
Severity: S3 → S2

https://treeherder.mozilla.org/#/jobs?repo=try&revision=e17422d8e576847ae5d27d75a33c6b9204160d75

I think the earlier changes for Marionette effectively disable unloadOnLowMemory for all desktop tests, including mochitests and reftests. Those changes wouldn't apply to Android (geckoview) mochitests and reftests, but it looks like the TabUnloader is not used by geckoview -- no worries there.

:whimboo - Is there a remaining concern?

Flags: needinfo?(hskupin)

Note that Marionette's profile including the preferences isn't used here. Mochitests define the preferences and as such would have to set this one itself. Marionette is only used for Mochitest/Reftest to bootstrap the necessary extensions.

Also note that the tab unloader got disabled a while ago (see bug 1558930), and it' unclear when it will be enabled again (bug 1587762). But to be on the safe bed, it would be good to get the preference set to false under testing/profiles.

Flags: needinfo?(hskupin)

Thanks. I didn't notice that it had been disabled and that was confusing my interpretation of the try results.

Note that we disabled the feature globally because of regressions that need to be addressed, but we're likely to flip it on again when possible so it's good to get this fixed.

Pushed by gbrown@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/fa2c925d7b7c Set browser.tabs.unloadOnLowMemory=false during tests; r=whimboo
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla78
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: