Closed Bug 1730152 Opened 3 years ago Closed 2 years ago

Intermittent dom/tests/mochitest/general/test_interfaces_secureContext.html | PerformanceNavigationTiming should be defined on 'window' scope

Categories

(Core :: DOM: Performance, defect)

defect

Tracking

()

RESOLVED DUPLICATE of bug 1776957
Tracking Status
firefox-esr78 --- unaffected
firefox-esr91 --- unaffected
firefox92 --- unaffected
firefox93 --- unaffected
firefox94 --- affected

People

(Reporter: intermittent-bug-filer, Unassigned)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: intermittent-failure, regression, Whiteboard: [stockwell disabled])

Attachments

(2 files)

Filed by: malexandru [at] mozilla.com
Parsed log: https://treeherder.mozilla.org/logviewer?job_id=351150928&repo=autoland
Full log: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/KKWjuMGyTf-sFIxGFz4nnA/runs/0/artifacts/public/logs/live_backing.log


[task 2021-09-10T12:42:36.376Z] 12:42:36     INFO - TEST-START | dom/tests/mochitest/general/test_interfaces_secureContext.html
[task 2021-09-10T12:42:38.738Z] 12:42:38     INFO - TEST-INFO | started process screenshot
[task 2021-09-10T12:42:38.826Z] 12:42:38     INFO - TEST-INFO | screenshot: exit 0
[task 2021-09-10T12:42:38.830Z] 12:42:38     INFO - <snipped 2379 output lines - if you need more context, please use SimpleTest.requestCompleteLog() in your test>
[task 2021-09-10T12:42:38.831Z] 12:42:38     INFO - Buffered messages logged at 12:42:38
[task 2021-09-10T12:42:38.831Z] 12:42:38     INFO - TEST-PASS | dom/tests/mochitest/general/test_interfaces_secureContext.html | PermissionStatus is exposed as an own property on '" + parentName + "' but has no property descriptor in the global scope 
<...>
[task 2021-09-10T12:42:38.887Z] 12:42:38     INFO - TEST-PASS | dom/tests/mochitest/general/test_interfaces_secureContext.html | PaymentResponse should  NOT be defined on 'window' scope 
[task 2021-09-10T12:42:38.887Z] 12:42:38     INFO - Buffered messages finished
[task 2021-09-10T12:42:38.888Z] 12:42:38     INFO - TEST-UNEXPECTED-FAIL | dom/tests/mochitest/general/test_interfaces_secureContext.html | PerformanceNavigationTiming should  be defined on 'window' scope 
[task 2021-09-10T12:42:38.888Z] 12:42:38     INFO - SimpleTest.ok@https://example.org/tests/SimpleTest/SimpleTest.js:417:16
[task 2021-09-10T12:42:38.888Z] 12:42:38     INFO - runTest@https://example.org/tests/dom/tests/mochitest/general/test_interfaces.js:1480:7
[task 2021-09-10T12:42:38.888Z] 12:42:38     INFO - @https://example.org/tests/dom/tests/mochitest/general/test_interfaces.js:1501:8
[task 2021-09-10T12:42:38.888Z] 12:42:38     INFO - TEST-PASS | dom/tests/mochitest/general/test_interfaces_secureContext.html | Sanitizer should  NOT be defined on 'window' scope 
[task 2021-09-10T12:42:38.889Z] 12:42:38     INFO - TEST-PASS | dom/tests/mochitest/general/test_interfaces_secureContext.html | ScopedCredential should  NOT be defined on 'window' scope 
[task 2021-09-10T12:42:38.889Z] 12:42:38     INFO - TEST-PASS | dom/tests/mochitest/general/test_interfaces_secureContext.html | ScopedCredentialInfo should  NOT be defined on 'window' scope 
[task 2021-09-10T12:42:38.890Z] 12:42:38     INFO - TEST-PASS | dom/tests/mochitest/general/test_interfaces_secureContext.html | UserProximityEvent should  NOT be defined on 'window' scope 
[task 2021-09-10T12:42:38.890Z] 12:42:38     INFO - TEST-PASS | dom/tests/mochitest/general/test_interfaces_secureContext.html | WebAuthnAssertion should  NOT be defined on 'window' scope 
[task 2021-09-10T12:42:38.891Z] 12:42:38     INFO - TEST-PASS | dom/tests/mochitest/general/test_interfaces_secureContext.html | WebAuthnAttestation should  NOT be defined on 'window' scope 
[task 2021-09-10T12:42:38.891Z] 12:42:38     INFO - TEST-PASS | dom/tests/mochitest/general/test_interfaces_secureContext.html | WebAuthentication should  NOT be defined on 'window' scope 
[task 2021-09-10T12:42:38.892Z] 12:42:38     INFO - Not taking screenshot here: see the one that was previously logged
[task 2021-09-10T12:42:38.892Z] 12:42:38     INFO - TEST-UNEXPECTED-FAIL | dom/tests/mochitest/general/test_interfaces_secureContext.html | The following interface(s) are not enumerated: PerformanceNavigationTiming - got 1, expected +0
[task 2021-09-10T12:42:38.892Z] 12:42:38     INFO - SimpleTest.is@https://example.org/tests/SimpleTest/SimpleTest.js:500:14
[task 2021-09-10T12:42:38.892Z] 12:42:38     INFO - runTest@https://example.org/tests/dom/tests/mochitest/general/test_interfaces.js:1493:5
[task 2021-09-10T12:42:38.893Z] 12:42:38     INFO - @https://example.org/tests/dom/tests/mochitest/general/test_interfaces.js:1501:8
[task 2021-09-10T12:42:38.893Z] 12:42:38     INFO - TEST-PASS | dom/tests/mochitest/general/test_interfaces_secureContext.html | Bogus pref annotation for Module 
<...>
[task 2021-09-10T12:42:38.914Z] 12:42:38     INFO - GECKO(6800) | MEMORY STAT | vsize 2103740MB | vsizeMaxContiguous 68278116MB | residentFast 58MB | heapAllocated 9MB
[task 2021-09-10T12:42:38.914Z] 12:42:38     INFO - TEST-OK | dom/tests/mochitest/general/test_interfaces_secureContext.html | took 2407ms
[task 2021-09-10T12:42:38.915Z] 12:42:38     INFO - TEST-START | Shutdown
[task 2021-09-10T12:42:38.915Z] 12:42:38     INFO - Passed:  2523
[task 2021-09-10T12:42:38.915Z] 12:42:38     INFO - Failed:  2
[task 2021-09-10T12:42:38.916Z] 12:42:38     INFO - Todo:    0
[task 2021-09-10T12:42:38.916Z] 12:42:38     INFO - Mode:    e10s
[task 2021-09-10T12:42:38.916Z] 12:42:38     INFO - Slowest: 2406ms - https://example.org:443/tests/dom/tests/mochitest/general/test_interfaces_secureContext.html
[task 2021-09-10T12:42:38.917Z] 12:42:38     INFO - SimpleTest FINISHED
[task 2021-09-10T12:42:38.917Z] 12:42:38     INFO - TEST-INFO | Ran 1 Loops
[task 2021-09-10T12:42:38.917Z] 12:42:38     INFO - SimpleTest FINISHED
[task 2021-09-10T12:42:38.918Z] 12:42:38     INFO - GECKO(6800) | Exiting due to channel error.

This started failing with the land from Bug 1721686 - https://hg.mozilla.org/integration/autoland/rev/482ce06ec0d28d60ba272f433ee0d21f5a8fe7bf. Retriggers.
After that the failures from Bug 1638629 - PerformanceNavigationTiming should be defined on the global scope turned into PerformanceNavigationTiming should be defined on 'window' scope.
Ryan, could you have a look into this fail? Thank you.

Flags: needinfo?(rhunt)
Regressed by: 1721686
Has Regression Range: --- → yes

Set release status flags based on info from the regressing bug 1721686

I changed the message that's reported when this test fails, but the actual underlying intermittent should still be the same.

Flags: needinfo?(rhunt)

Hi Patricia, is this something your team is interested in looking into? It's helpful to know why PerformanceNavigationTiming is sometimes defined on a unexpected scope.

Component: DOM: Core & HTML → Performance
Flags: needinfo?(plawless)
See Also: → 1638629

NeedInfo myself to take a look

Flags: needinfo?(plawless) → needinfo?(sefeng)

I don't know how the interface is defined in the window scope..

Olli, do you know what could be the cause for "PerformanceNavigationTiming" in window returns false?

Flags: needinfo?(sefeng) → needinfo?(bugs)

How very odd. The interface is controlled by mozilla::dom::PerformanceNavigationTiming::Enabled.
https://searchfox.org/mozilla-central/rev/2c4b830b924f42283632b70f39a60fd36433dd4d/dom/performance/PerformanceNavigationTiming.cpp#155-156
Does any of those prefs get changed while running tests?

Flags: needinfo?(bugs)

There are 32 total failures in the last 7 days on

[task 2021-12-04T20:03:44.848Z] 20:03:44     INFO - TEST-START | dom/tests/mochitest/general/test_interfaces_secureContext.html
[task 2021-12-04T20:03:47.221Z] 20:03:47     INFO - TEST-INFO | started process screencapture
[task 2021-12-04T20:03:47.329Z] 20:03:47     INFO - TEST-INFO | screencapture: exit 0
[task 2021-12-04T20:03:47.330Z] 20:03:47     INFO - <snipped 2381 output lines - if you need more context, please use SimpleTest.requestCompleteLog() in your test>
[task 2021-12-04T20:03:47.330Z] 20:03:47     INFO - Buffered messages logged at 20:03:47
[task 2021-12-04T20:03:47.331Z] 20:03:47     INFO - TEST-PASS | dom/tests/mochitest/general/test_interfaces_secureContext.html | If this is failing: DANGER, are you sure you want to expose the new interface HTMLPictureElement to all webpages as a property on 'window'? Do not make a change to this file without a  review from a DOM peer for that specific change!!! (or a JS peer for changes to ecmaGlobals) 

[task 2021-12-04T20:03:47.377Z] 20:03:47     INFO - TEST-PASS | dom/tests/mochitest/general/test_interfaces_secureContext.html | PaymentRequestUpdateEvent should  NOT be defined on 'window' scope 
[task 2021-12-04T20:03:47.377Z] 20:03:47     INFO - TEST-PASS | dom/tests/mochitest/general/test_interfaces_secureContext.html | PaymentResponse should  NOT be defined on 'window' scope 
[task 2021-12-04T20:03:47.377Z] 20:03:47     INFO - Buffered messages finished
[task 2021-12-04T20:03:47.378Z] 20:03:47     INFO - TEST-UNEXPECTED-FAIL | dom/tests/mochitest/general/test_interfaces_secureContext.html | PerformanceNavigationTiming should  be defined on 'window' scope 
[task 2021-12-04T20:03:47.378Z] 20:03:47     INFO - SimpleTest.ok@https://example.com/tests/SimpleTest/SimpleTest.js:417:16
[task 2021-12-04T20:03:47.378Z] 20:03:47     INFO - runTest@https://example.com/tests/dom/tests/mochitest/general/test_interfaces.js:1480:7
[task 2021-12-04T20:03:47.378Z] 20:03:47     INFO - @https://example.com/tests/dom/tests/mochitest/general/test_interfaces.js:1501:8
[task 2021-12-04T20:03:47.379Z] 20:03:47     INFO - TEST-PASS | dom/tests/mochitest/general/test_interfaces_secureContext.html | Sanitizer should  NOT be defined on 'window' scope 
[task 2021-12-04T20:03:47.379Z] 20:03:47     INFO - TEST-PASS | dom/tests/mochitest/general/test_interfaces_secureContext.html | ScopedCredential should  NOT be defined on 'window' scope 
[task 2021-12-04T20:03:47.379Z] 20:03:47     INFO - TEST-PASS | dom/tests/mochitest/general/test_interfaces_secureContext.html | ScopedCredentialInfo should  NOT be defined on 'window' scope 
[task 2021-12-04T20:03:47.380Z] 20:03:47     INFO - TEST-PASS | dom/tests/mochitest/general/test_interfaces_secureContext.html | UserProximityEvent should  NOT be defined on 'window' scope 
[task 2021-12-04T20:03:47.380Z] 20:03:47     INFO - TEST-PASS | dom/tests/mochitest/general/test_interfaces_secureContext.html | WebAuthnAssertion should  NOT be defined on 'window' scope 
[task 2021-12-04T20:03:47.381Z] 20:03:47     INFO - TEST-PASS | dom/tests/mochitest/general/test_interfaces_secureContext.html | WebAuthnAttestation should  NOT be defined on 'window' scope 
[task 2021-12-04T20:03:47.381Z] 20:03:47     INFO - TEST-PASS | dom/tests/mochitest/general/test_interfaces_secureContext.html | WebAuthentication should  NOT be defined on 'window' scope 
[task 2021-12-04T20:03:47.382Z] 20:03:47     INFO - Not taking screenshot here: see the one that was previously logged
[task 2021-12-04T20:03:47.382Z] 20:03:47     INFO - TEST-UNEXPECTED-FAIL | dom/tests/mochitest/general/test_interfaces_secureContext.html | The following interface(s) are not enumerated: PerformanceNavigationTiming - got 1, expected +0
[task 2021-12-04T20:03:47.382Z] 20:03:47     INFO - SimpleTest.is@https://example.com/tests/SimpleTest/SimpleTest.js:500:14
[task 2021-12-04T20:03:47.382Z] 20:03:47     INFO - runTest@https://example.com/tests/dom/tests/mochitest/general/test_interfaces.js:1493:5
[task 2021-12-04T20:03:47.382Z] 20:03:47     INFO - @https://example.com/tests/dom/tests/mochitest/general/test_interfaces.js:1501:8
[task 2021-12-04T20:03:47.383Z] 20:03:47     INFO - TEST-PASS | dom/tests/mochitest/general/test_interfaces_secureContext.html | Bogus pref annotation for Module 
[task 2021-12-04T20:03:47.383Z] 20:03:47     INFO - TEST-PASS | dom/tests/mochitest/general/test_interfaces_secureContext.html | Bogus pref annotation for Instance 
[task 2021-12-04T20:03:47.384Z] 20:03:47     INFO - TEST-PASS | dom/tests/mochitest/general/test_interfaces_secureContext.html | Bogus pref annotation for Memory 
[task 2021-12-04T20:03:47.384Z] 20:03:47     INFO - TEST-PASS | dom/tests/mochitest/general/test_interfaces_secureContext.html | Bogus pref annotation for Table 
[task 2021-12-04T20:03:47.384Z] 20:03:47     INFO - TEST-PASS | dom/tests/mochitest/general/test_interfaces_secureContext.html | Bogus pref annotation for Global 
[task 2021-12-04T20:03:47.385Z] 20:03:47     INFO - TEST-PASS | dom/tests/mochitest/general/test_interfaces_secureContext.html | Bogus pref annotation for CompileError 
[task 2021-12-04T20:03:47.385Z] 20:03:47     INFO - TEST-PASS | dom/tests/mochitest/general/test_interfaces_secureContext.html | Bogus pref annotation for LinkError 
[task 2021-12-04T20:03:47.385Z] 20:03:47     INFO - TEST-PASS | dom/tests/mochitest/general/test_interfaces_secureContext.html | Bogus pref annotation for RuntimeError 
[task 2021-12-04T20:03:47.386Z] 20:03:47     INFO - TEST-PASS | dom/tests/mochitest/general/test_interfaces_secureContext.html | Bogus pref annotation for Function 
[task 2021-12-04T20:03:47.386Z] 20:03:47     INFO - TEST-PASS | dom/tests/mochitest/general/test_interfaces_secureContext.html | If this is failing: DANGER, are you sure you want to expose the new interface Module to all webpages as a property on 'WebAssembly'? Do not make a change to this file without a  review from a DOM peer for that specific change!!! (or a JS peer for changes to ecmaGlobals) 
[task 2021-12-04T20:03:47.387Z] 20:03:47     INFO - TEST-PASS | dom/tests/mochitest/general/test_interfaces_secureContext.html | Module is exposed as an own property on '" + parentName + "' but tests false for "in" in the global scope 

Patricia can you please assign someone to take a look?
Thank you!

Flags: needinfo?(plawless)
Whiteboard: [stockwell unknown] → [stockwell needswork:owner]

Update:
There have been 31 failures within the last 7 days:
• 11 failures on OS X 10.15 WebRender opt
• 2 failures on OS X 10.15 WebRender Shippable opt
• 7 failures on Windows 10 x64 2004 WebRender opt
• 11 failures on Windows 10 x64 2004 WebRender Shippable opt
Recent failure log: https://treeherder.mozilla.org/logviewer?job_id=360918879&repo=autoland&lineNumber=11967

[task 2021-12-11T21:37:00.639Z] 21:37:00     INFO - TEST-PASS | dom/tests/mochitest/general/test_interfaces_secureContext.html | PaymentResponse should  NOT be defined on 'window' scope 
[task 2021-12-11T21:37:00.639Z] 21:37:00     INFO - Buffered messages finished
[task 2021-12-11T21:37:00.640Z] 21:37:00     INFO - TEST-UNEXPECTED-FAIL | dom/tests/mochitest/general/test_interfaces_secureContext.html | PerformanceNavigationTiming should  be defined on 'window' scope 
[task 2021-12-11T21:37:00.640Z] 21:37:00     INFO - SimpleTest.ok@https://example.org/tests/SimpleTest/SimpleTest.js:417:16
[task 2021-12-11T21:37:00.640Z] 21:37:00     INFO - runTest@https://example.org/tests/dom/tests/mochitest/general/test_interfaces.js:1478:7
[task 2021-12-11T21:37:00.640Z] 21:37:00     INFO - @https://example.org/tests/dom/tests/mochitest/general/test_interfaces.js:1499:8
[task 2021-12-11T21:37:00.640Z] 21:37:00     INFO - TEST-PASS | dom/tests/mochitest/general/test_interfaces_secureContext.html | Sanitizer should  NOT be defined on 'window' scope 
Assignee: nobody → abutkovits
Status: NEW → ASSIGNED
Pushed by abutkovits@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2fb46b313024
disable test_interfaces_secureContext.html on Win_64_opt and Mac_64_opt for frequent failures. r=intermittent-reviewers,MasterWayZ DONTBUILD
Assignee: abutkovits → nobody
Status: ASSIGNED → NEW
Keywords: leave-open
Whiteboard: [stockwell needswork:owner] → [stockwell disabled]

Hsin-Yi, we should make sure this test gets fixed so that it can be re-enabled. I think it is an important test for the exposure of DOM APIs. (I was going to try to look at it myself, but I haven't had time yet.)

Flags: needinfo?(htsai)

There are two tests in that directory that toggle enable_performance_navigation_timing, so I feel like those can't be at fault.

Ok, looking at an actual failure log, test_interfaces_secureContext.html does run after the other two tests, so I'm guessing that's the reason for the failure.

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

Some weird race condition with all of the pref flipping that
the toggling test does causes failures in test_interfaces_secureContext.
The latter is a more important test because it ensures that we don't
accidentally ship DOM APIs on secure contexts, so this
patch changes which one is disabled.

I did some try pushes with test_interfaces_secureContext re-enabled and:

  1. test_performance_nav_timing_before_onload and test_toggling_performance_navigation_timing disabled,
  2. test_performance_nav_timing_before_onload disabled and test_toggling_performance_navigation_timing enabled
  3. test_performance_nav_timing_before_onload enabled and test_toggling_performance_navigation_timing disabled

Only 2 hit the error, so I think the actual issue is with test_toggling_performance_navigation_timing.html not cleaning up the prefs properly. I think this test is less important that test_interfaces_secureContext, because the latter ensures that we don't accidentally ship DOM interfaces to secure contexts, so I made a patch to change which test is disabled.

I'm not entirely sure what the actual issue is with the toggling test. I think there's some kind of race with cleaning up prefs after a test is finished. Maybe it matters whether toggling and test_interfaces_secureContext end up in the same process? I haven't quite figured out how the pref cleanup works yet.

I think this affects test_interfaces_secureContext.html and not test_interfaces.html because only the former runs after the toggling test.

The cheekiest fix would be to rearrange the calls to testWhetherExposed() in the toggling test so that the one that matches our actual configuration is last, to reduce the chance of a race, but if we do have some kind of race with pref setting in tests when Fission is enabled it would be good to fix that.

Pushed by amccreight@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/54a1ab6c446b
Disable test_toggling_performance_navigation_timing instead of test_interfaces_secureContext. r=smaug

It looks like the failure didn't come back when I toggled over to disabling the toggling test, so that's good. I haven't had a chance to figure out what is going wrong with that test yet.

I wasn't able to figure out why test_toggling_performance_navigation_timing was causing issues, and I'm not going to be able to look into this soon.

Assignee: continuation → nobody
Component: Performance → DOM: Performance
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: