Closed Bug 1713897 Opened 3 years ago Closed 3 years ago

Tests skipped in 'browser/components/originattributes/test/browser/browser.ini' for new Fission platform triage

Categories

(Core :: DOM: Security, task, P2)

Unspecified
macOS
task

Tracking

()

RESOLVED FIXED
91 Branch
Fission Milestone M7a
Tracking Status
firefox-esr78 --- disabled
firefox89 --- disabled
firefox90 --- disabled
firefox91 --- fixed

People

(Reporter: ahal, Assigned: mstange)

References

Details

(Whiteboard: [domsecurity-active])

Attachments

(1 file)

The following tests were disabled in browser/components/originattributes/test/browser/browser.ini due to new Fission platform triage:
browser_firstPartyIsolation_saveAs.js
browser_postMessage.js

Full diff:

diff --git a/browser/components/originattributes/test/browser/browser.ini b/browser/components/originattributes/test/browser/browser.ini
--- a/browser/components/originattributes/test/browser/browser.ini
+++ b/browser/components/originattributes/test/browser/browser.ini
@@ -75,22 +78,26 @@ skip-if = verify
 [browser_favicon_userContextId.js]
 [browser_firstPartyIsolation.js]
 skip-if = debug #Bug 1345346
 [browser_firstPartyIsolation_about_newtab.js]
 [browser_firstPartyIsolation_aboutPages.js]
 [browser_firstPartyIsolation_blobURI.js]
 [browser_firstPartyIsolation_js_uri.js]
 [browser_firstPartyIsolation_saveAs.js]
+skip-if =
+  fission && os == "mac" && !debug  # New platform triage
 [browser_localStorageIsolation.js]
 [browser_blobURLIsolation.js]
 skip-if = (verify && debug && (os == 'win'))
 [browser_imageCacheIsolation.js]
 [browser_sharedworker.js]
 [browser_httpauth.js]
 [browser_clientAuth.js]
 skip-if = verify
 [browser_cacheAPI.js]
 [browser_permissions.js]
 [browser_postMessage.js]
+skip-if =
+  fission && os == "linux" && asan  # New platform triage
 [browser_sanitize.js]
 skip-if = (os == 'win') || (os == "mac" && os_version == "10.14") || (os == "linux" && bits == 64) #Bug 1544810
 [browser_windowOpenerRestriction.js]

See the following try push for failures:
https://treeherder.mozilla.org/jobs?repo=try&revision=ad7a18fdad3b8e35b44152c16d94babb80387cd8

To run these failures in your own try push, first revert the skip-if
annotations, then run:

$ ./mach try fuzzy --rebuild 3 browser/components/originattributes/test/browser/browser.ini

Then use the fuzzy interface to select the task(s) which are relevant to the
removed skip-if expression(s). Please note the failure may be intermittent
and/or been fixed since the triage took place.

We need to determine whether this browser-chrome test failure should block shipping Fission. Tracking for Fission Milestone M7a for the initial audit. Then we can decide whether to move this bug to Fission M8 or post-MVP (Fission Future).

Here is a recent Try run for Fission browser-chrome:

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

Blocks: 1694824
Fission Milestone: --- → M7a

I have not yet taken a look at the linux-asan failures, as they were not included in the original try push (I am running them now).

browser_firstPartyIsolation_safeAs.js appears to be hanging while waiting for the channel which will be used to save a video to appear here: https://searchfox.org/mozilla-central/rev/74f3c420ee54001059e1850bef3be876749ff873/browser/components/originattributes/test/browser/browser_firstPartyIsolation_saveAs.js#202. (example failure log: https://treeherder.mozilla.org/logviewer?job_id=341441020&repo=try&lineNumber=5854). If this failure can be made to reproduce locally reliably, running it with more logging may help.

Given that the failure is macOS specific and the action is triggered using a context menu it seems like this might be related in some way to the recent native context menu work on macOS, so leaving a ni? for :mstange.

Flags: needinfo?(mstange.moz)
OS: Unspecified → macOS

These failures still happen on try.

So far I have verified that the failures are not caused by previous tests that leave open context menus after themselves. I haven't made any progress on determining the cause yet. I've also tried to reproduce these failures locally, with no luck so far.

Depends on: 1587763, 1706672

Tentatively assigning this bug to mstange while he is trying to reproduce the failures.

Assignee: nobody → mstange.moz

The browser_postMessage.js failure I linked to was on macOS. When this bug was filed, that test was only disabled on Linux Fission ASAN runs.

I've triggered another try push with profiling enabled for this directory. Maybe we can get a profile of a failing run that way.
https://treeherder.mozilla.org/jobs?repo=try&revision=21ab5ff98eaeb91ab867c8a5300b6653a6c9285c

(In reply to Nika Layzell [:nika] (ni? for response) from comment #2)

Given that the failure is macOS specific and the action is triggered using a context menu it seems like this might be related in some way to the recent native context menu work on macOS, so leaving a ni? for :mstange.

Your hunch was spot on, Nika. The browser_firstPartyIsolation_saveAs.js failure is indeed happening because of native context menus. Here's a profile that shows what's going on.
It looks like what happens is that the call to activateItem never closes the menu and never fires the command event. This seems to be happening because macOS forgets about our call to -[NSMenu cancelTrackingWithoutAnimation] if we enter a nested native event loop between the call to that method and returning to the NSMenu's tracking event loop. The profile shows that we call -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] before we return to the NSMenu's event loop because, at the time of the call to activateItem, we're in a nested event loop from nsThread::Shutdown.

This is pretty bad problem to have, but it only affects tests and it has nothing to do with Fission. So I would say that the browser_firstPartyIsolation_saveAs.js failure should not block Fission.

I'm now looking into the browser_postMessage.js failure.

Flags: needinfo?(mstange.moz)

The browser_postMessage.js failure looks legitimate and is unrelated to context menus. I think it should be investigated by somebody who knows the code that the test was written for. The only hypothesis I have so far is related to the fact that the test toggles the privacy.firstparty.isolate.block_post_message pref between subtests - maybe the content process hasn't had a chance to react to that pref change by the time it sends its message. I'm not sure if await SpecialPowers.pushPrefEnv(...) means that all content processes know about the new pref by the time the promise resolves.

I will work on the context menu issue in bug 1706672, and leave the browser_postMessage.js failure to a domain expert.

Assignee: mstange.moz → nobody

Here's a profile of a failing browser_postMessage.js run. It is from this run (log).

Ethan, ideally I'd NI Tim here but since he's out, who in your team can look into this Fission failure?

Flags: needinfo?(ettseng)

Paul, I am assigning this bug to you because it's time-sensitive.

Assignee: nobody → pbz
Flags: needinfo?(pbz)
Severity: -- → S3
Status: NEW → ASSIGNED
Priority: -- → P2
Whiteboard: [domsecurity-active]

I'm landing a fix in Bug 1587763. It seems that this has become a meta bug for the browser_postMessage.js and the browser_firstPartyIsolation_saveAs.js test failures which have separate bugs. I can't see any other tests skipped for fission in browser/components/originattributes/test/browser/browser.ini.

Flags: needinfo?(pbz)

There are no unassigned bugs left. Bug 1706672 is assigned and I've landed a fix for Bug 1587763.

Assignee: pbz → nobody
Status: ASSIGNED → NEW
Flags: needinfo?(ettseng)
No longer depends on: 1706672

I'll use this bug to re-enable browser_firstPartyIsolation_saveAs.js on macOS; the failure in it was fixed by bug 1717129.

Assignee: nobody → mstange.moz
Status: NEW → ASSIGNED
Pushed by mstange@themasta.com: https://hg.mozilla.org/integration/autoland/rev/be1d38d9d562 Re-enable browser_firstPartyIsolation_saveAs.js for macOS Fission, now that bug 1717129 has fixed the underlying problem. r=smaug
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 91 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: