Open Bug 1724267 Opened 4 years ago Updated 2 months ago

Re-enable bfcache in parent for AWSY base test (and stop loading about:blank)

Categories

(Testing :: AWSY, task, P3)

Default
task

Tracking

(Fission Milestone:Future, firefox-esr78 disabled, firefox-esr91 disabled, firefox91 disabled, firefox92 disabled, firefox93 disabled)

Fission Milestone Future
Tracking Status
firefox-esr78 --- disabled
firefox-esr91 --- disabled
firefox91 --- disabled
firefox92 --- disabled
firefox93 --- disabled

People

(Reporter: mccr8, Unassigned, NeedInfo)

References

Details

(Whiteboard: [fxp][operational])

I have this disabled now because when Fission was enabled multiple about:blank pages were getting put in a single process.

Severity: -- → S3
Priority: -- → P3
Fission Milestone: --- → ?

Does this require some changes to bfcache handling? Or did the recent about:blank changes fix the issue?

Flags: needinfo?(continuation)

What this test does is open a bunch of tabs with about:blank in them. The idea is that if we open N such tabs, then we should have N content processes. I don't know what is needed for that to happen. Nika, was there some specific existing work you are aware of that would fix this issue, or is more needed? Thanks.

Flags: needinfo?(continuation) → needinfo?(nika)

This test shouldn't depend on the current bfcache behavior. We should fix the test and then stop disabling bfcache.

Peter will file a new bug to decide whether bfcache should cache about:blank pages or not.

Severity: S3 → N/A
Fission Milestone: ? → MVP
Whiteboard: fission-soft-blocker

What should the test do instead? I could switch it over to opening actual simple web pages at a bunch of different domains. Or is there something simpler than that that could work?

Right now, we create a new tab by calling gBrowser.loadOneTab("about:blank", ...) here: https://searchfox.org/mozilla-central/rev/d3683dbb252506400c71256ef3994cdbdfb71ada/testing/awsy/awsy/awsy_test_case.py#307-312, which does the first process selection, and starts the load of the first about:blank document which ends up in the bfcache, then we end up doing a second navigation to about:blank here: https://searchfox.org/mozilla-central/rev/d3683dbb252506400c71256ef3994cdbdfb71ada/testing/awsy/awsy/awsy_test_case.py#346.

Given the goal of the base memory case, it seems like doing both of these navigations is unnecessary, so I see 2 potential workarounds to avoid it:

  1. Pass skipLoad: true to gBrowser.loadOneTab call in https://searchfox.org/mozilla-central/rev/d3683dbb252506400c71256ef3994cdbdfb71ada/testing/awsy/awsy/awsy_test_case.py#308-311. This prevents doing a non-initial about:blank load in that document, meaning that when the navigation later in that function is run, the previous document will be an initial document, and will not enter the bfcache.
  2. Tweak how the loads in AWSY tests are performed a bit by skipping the second load if about:blank is the URL to load, and we'd not end up doing a potentially bfcache-invoking navigation.
Flags: needinfo?(nika)

Thanks for the detailed explanation!

Andrew, I'm tentatively assigning this bug to you because it sounds like you intended to fix it. Is that correct?

This bug is currently tagged as a soft blocker for Fission MVP, but is a lower priority than your one-off Fission memory usage testing.

Assignee: nobody → continuation
Flags: needinfo?(continuation)

Yes, that's right.

Flags: needinfo?(continuation)

Reassigning to kmag because he offered to take this bug.

Assignee: continuation → kmaglione+bmo
Summary: Re-enable bfcache in parent for AWSY base → Re-enable bfcache in parent for AWSY base test (and stop loading about:blank)

This test fix doesn't need to block Fission MVP.

Fission Milestone: MVP → Future

The bug assignee is inactive on Bugzilla, so the assignee is being reset.

Assignee: kmaglione+bmo → nobody

fission.bfcacheInParent is still set to false in testing/awsy/conf/base-prefs.json

Whiteboard: fission-soft-blocker → [fxp] fission-soft-blocker

@mccr8 can you help me to understand the impact of this bug? Is this something you are able to work on, or can you also provide a summary of what needs to change?

Flags: needinfo?(continuation)

The basic idea here is that the way we're loading pages in the AWSY base test is not entirely realistic.

Olli, maybe you can answer these questions better than me.

It does look like Nika had some possible fixes in comment 6, but nobody has had a chance to look into it.

Flags: needinfo?(continuation) → needinfo?(smaug)
Whiteboard: [fxp] fission-soft-blocker → [fxp]

Or we could just not put about:blank to bfcache? We should probably do that anyhow with ship, since there can't be opener relationship.

(In reply to Olli Pettay [:smaug][bugs@pettay.fi] from comment #17)

Or we could just not put about:blank to bfcache? We should probably do that anyhow with ship, since there can't be opener relationship.

Flags: needinfo?(continuation)

I don't know anything about the BF cache, sorry.

Flags: needinfo?(continuation)

(In reply to Olli Pettay [:smaug][bugs@pettay.fi] from comment #17)

Or we could just not put about:blank to bfcache? We should probably do that anyhow with ship, since there can't be opener relationship.

@nika do you have any thoughts on @smaug's suggestion?

Flags: needinfo?(nika)

:smaug is probably a better person to ask bfcache questions to than me. It seems like it'd be fine ottomh to stop bfcaching about:blank documents. Technically it could cause a programmatically modified about:blank document to lose state, but that's going to happen upon eviction anyway, so it's probably less surprising if we do it unconditionally.

Flags: needinfo?(nika)
Whiteboard: [fxp] → [fxp][operational]
Severity: N/A → S3
You need to log in before you can comment on or make changes to this bug.