Closed Bug 1456995 Opened 2 years ago Closed 9 days ago

enable e10s service workers pref on nightly

Categories

(Core :: DOM: Service Workers, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
mozilla71
Tracking Status
firefox71 --- fixed

People

(Reporter: bkelly, Assigned: perry, NeedInfo)

References

(Blocks 3 open bugs, Regressed 6 open bugs)

Details

(Whiteboard: SW-MUST, [wptsync upstream])

Attachments

(6 files, 1 obsolete file)

Bug 1431847 added a pref to control if we use our new e10s service worker code:

  dom.serviceWorkers.parent_intercept

This isn't really safe to use now, but once binding remoting and spawn remoting are done we can flip this on nightly.
Priority: -- → P2
Whiteboard: SW-MUST
Assignee: nobody → perry
Blocks: 1574567
Pushed by bugmail@asutherland.org:
https://hg.mozilla.org/integration/autoland/rev/92a2a3bc9f07
enable Service Workers' parent-intercept mode on Nightly r=asuth
Flags: needinfo?(perry)

I think skip-if = serviceworker_e10s only skips tests on the "-sw" platforms, ie platforms that were forcing the pref dom.serviceWorkers.parent_intercept to true. It doesn't skip tests based on the dynamic value of the preference?

If we flip the pref to true on Nightly, then we either need to fix the tests or isolate them in separate ini files with parent_intercept set to false.

(In reply to Julian Descottes [:jdescottes] from comment #6)

I think skip-if = serviceworker_e10s only skips tests on the "-sw" platforms, ie platforms that were forcing the pref dom.serviceWorkers.parent_intercept to true. It doesn't skip tests based on the dynamic value of the preference?

If we flip the pref to true on Nightly, then we either need to fix the tests or isolate them in separate ini files with parent_intercept set to false.

Right, unfortunately it seems like the test harness can't read the dynamic value (only via --setpref). I filed bug 1577912 for having tests be able to read prefs.

  • Listen for observer topics in the parent-process when in parent intercept mode
  • Remove an extra postMessage call (and the corresponding message handler)

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

D44515 addresses the failing browser-chrome mochitest
D44514 addresses ASAN failures
D44513 addresses the failing xpcshell test

Pushed by pjiang@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5fbed7d37ac0
make browser_devtools_serviceworker_interception.js compatible with parent-intercept r=asuth
https://hg.mozilla.org/integration/autoland/rev/962b6affd688
give InternalRequest::mMozErrors a default initializer r=asuth
https://hg.mozilla.org/integration/autoland/rev/03db4932e3ca
check parent-intercept pref within test_observer_remoting.js to conditionally run r=asuth
https://hg.mozilla.org/integration/autoland/rev/e4deba1aa285
enable Service Workers' parent-intercept mode on Nightly r=asuth

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&group_state=expanded&selectedJob=264797205&resultStatus=pending%2Crunning%2Ctestfailed%2Cbusted%2Cexception&fromchange=e4deba1aa285bd9a50e519b87eb858d2c2f2b04f&tochange=b51b4dcd9a8acdbd1474c6312a6ef07c54ed6531&searchStr=os%2Cx%2C10.14%2Cdebug%2Cmochitests%2Cwithout%2Ce10s%2Ctest-macosx1014-64%2Fdebug-mochitest-chrome-1proc-1%2Cm-1proc%28c1%29

Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=264797205&repo=autoland&lineNumber=69898
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=264801544&repo=autoland&lineNumber=3055

Backout link: https://hg.mozilla.org/integration/autoland/rev/dc3dbfd3e268de239d0ef77e548eb78d4f8d5971

[task 2019-09-03T19:17:10.628Z] 19:17:10 INFO - TEST-PASS | dom/serviceworkers/test/test_serviceworkerinfo.xul | Worker is not active!
[task 2019-09-03T19:17:10.628Z] 19:17:10 INFO - Buffered messages finished
[task 2019-09-03T19:17:10.629Z] 19:17:10 INFO - TEST-UNEXPECTED-FAIL | dom/serviceworkers/test/test_serviceworkerinfo.xul | Test timed out.
[task 2019-09-03T19:17:10.629Z] 19:17:10 INFO - SimpleTest.ok@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:277:18
[task 2019-09-03T19:17:10.629Z] 19:17:10 INFO - reportError@chrome://mochikit/content/tests/SimpleTest/TestRunner.js:121:22
[task 2019-09-03T19:17:10.629Z] 19:17:10 INFO - TestRunner._checkForHangs@chrome://mochikit/content/tests/SimpleTest/TestRunner.js:142:18
[task 2019-09-03T19:17:10.629Z] 19:17:10 INFO - setTimeout handlerTestRunner._checkForHangs@chrome://mochikit/content/tests/SimpleTest/TestRunner.js:170:15
[task 2019-09-03T19:17:10.629Z] 19:17:10 INFO - setTimeout handler
TestRunner._checkForHangs@chrome://mochikit/content/tests/SimpleTest/TestRunner.js:170:15
[task 2019-09-03T19:17:10.629Z] 19:17:10 INFO - setTimeout handlerTestRunner._checkForHangs@chrome://mochikit/content/tests/SimpleTest/TestRunner.js:170:15
[task 2019-09-03T19:17:10.629Z] 19:17:10 INFO - setTimeout handler
TestRunner._checkForHangs@chrome://mochikit/content/tests/SimpleTest/TestRunner.js:170:15
[task 2019-09-03T19:17:10.629Z] 19:17:10 INFO - setTimeout handlerTestRunner._checkForHangs@chrome://mochikit/content/tests/SimpleTest/TestRunner.js:170:15
[task 2019-09-03T19:17:10.629Z] 19:17:10 INFO - setTimeout handler
TestRunner._checkForHangs@chrome://mochikit/content/tests/SimpleTest/TestRunner.js:170:15
[task 2019-09-03T19:17:10.629Z] 19:17:10 INFO - setTimeout handlerTestRunner._checkForHangs@chrome://mochikit/content/tests/SimpleTest/TestRunner.js:170:15
[task 2019-09-03T19:17:10.629Z] 19:17:10 INFO - setTimeout handler
TestRunner._checkForHangs@chrome://mochikit/content/tests/SimpleTest/TestRunner.js:170:15
[task 2019-09-03T19:17:10.629Z] 19:17:10 INFO - setTimeout handlerTestRunner._checkForHangs@chrome://mochikit/content/tests/SimpleTest/TestRunner.js:170:15
[task 2019-09-03T19:17:10.629Z] 19:17:10 INFO - setTimeout handler
TestRunner._checkForHangs@chrome://mochikit/content/tests/SimpleTest/TestRunner.js:170:15
[task 2019-09-03T19:17:10.629Z] 19:17:10 INFO - setTimeout handlerTestRunner._checkForHangs@chrome://mochikit/content/tests/SimpleTest/TestRunner.js:170:15
[task 2019-09-03T19:17:10.629Z] 19:17:10 INFO - TestRunner.runTests/<@chrome://mochikit/content/tests/SimpleTest/TestRunner.js:388:20
[task 2019-09-03T19:17:10.629Z] 19:17:10 INFO - promise callback
TestRunner.runTests@chrome://mochikit/content/tests/SimpleTest/TestRunner.js:375:50
[task 2019-09-03T19:17:10.629Z] 19:17:10 INFO - RunSet.runtests@chrome://mochikit/content/tests/SimpleTest/setup.js:201:14
[task 2019-09-03T19:17:10.629Z] 19:17:10 INFO - RunSet.runall@chrome://mochikit/content/tests/SimpleTest/setup.js:180:12
[task 2019-09-03T19:17:10.629Z] 19:17:10 INFO - hookupTests@chrome://mochikit/content/tests/SimpleTest/setup.js:273:12
[task 2019-09-03T19:17:10.629Z] 19:17:10 INFO - parseTestManifest@chrome://mochikit/content/manifestLibrary.js:50:13
[task 2019-09-03T19:17:10.629Z] 19:17:10 INFO - getTestManifest/req.onload@chrome://mochikit/content/manifestLibrary.js:61:28
[task 2019-09-03T19:17:10.629Z] 19:17:10 INFO - EventHandlerNonNullgetTestManifest@chrome://mochikit/content/manifestLibrary.js:57:3
[task 2019-09-03T19:17:10.629Z] 19:17:10 INFO - hookup@chrome://mochikit/content/tests/SimpleTest/setup.js:253:20
[task 2019-09-03T19:17:10.629Z] 19:17:10 INFO - linkAndHookup@chrome://mochikit/content/harness.xul:45:3
[task 2019-09-03T19:17:10.630Z] 19:17:10 INFO - parseTestManifest@chrome://mochikit/content/manifestLibrary.js:50:13
[task 2019-09-03T19:17:10.630Z] 19:17:10 INFO - getTestManifest/req.onload@chrome://mochikit/content/manifestLibrary.js:61:28
[task 2019-09-03T19:17:10.630Z] 19:17:10 INFO - EventHandlerNonNull
getTestManifest@chrome://mochikit/content/manifestLibrary.js:57:3
[task 2019-09-03T19:17:10.630Z] 19:17:10 INFO - getTestList@chrome://mochikit/content/chrome-harness.js:258:18
[task 2019-09-03T19:17:10.630Z] 19:17:10 INFO - loadTests@chrome://mochikit/content/harness.xul:24:14
[task 2019-09-03T19:17:10.630Z] 19:17:10 INFO - EventListener.handleEvent*@chrome://mochikit/content/harness.xul:48:12
[task 2019-09-03T19:17:11.562Z] 19:17:11 INFO - Not taking screenshot here: see the one that was previously logged

Flags: needinfo?(perry)

Failures are tests that should be skipped when dom.serviceWorkers.parent_intercept=true. "serviceworker_e10s"/"sw-e10s" will be == nightly build unless overridden with --setpref (unless there's a better way).

Flags: needinfo?(perry)
Attachment #9090130 - Attachment is obsolete: true

Comment 14 isn't working for Android WPTs (I've only tried the emulators on try) because it looks like "nightly_build" isn't passed to them (see https://treeherder.mozilla.org/#/jobs?repo=try&revision=256264da48a9f593592b34ab10ef166930e770bf&selectedJob=267131194). Any suggestions James?

The tests in the link have their expectations modified as https://hg.mozilla.org/try/rev/bb81152f49af06b17a8c3aa1012e2c83ea3df3b9.

Flags: needinfo?(james)

Looking at the wptreport.json artifact (e.g. [1]) you can see the available data in the run_info key; afaict that does have nightly_build. So I"m not sure why those tests are matching that condition; I think I'd have to try the patch out and add some logging when setting the condition to be sure of what's going on.

[1] https://taskcluster-artifacts.net/E4Pa-ToKQPeNOP8H5TarKA/0/public/test_info//wptreport.json

Flags: needinfo?(james)
Attachment #9087587 - Attachment description: Bug 1456995 - enable Service Workers' parent-intercept mode on Nightly r?asuth → Bug 1456995 - enable Service Workers' parent-intercept mode on Nightly r?asuth,jgraham
Depends on: 1583659
Blocks: 1583700

Also replace ServiceWorkerManager shutdown logic's normal for-loops with
range-based for-loops.

Depends on D43170

The changes are just cleanup for member variables/methods that should
be private to ServiceWorkerManager.

Depends on D48179

Pushed by pjiang@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e127b732bab0
make browser_devtools_serviceworker_interception.js compatible with parent-intercept r=asuth
https://hg.mozilla.org/integration/autoland/rev/67e23c511201
give InternalRequest::mMozErrors a default initializer r=asuth
https://hg.mozilla.org/integration/autoland/rev/7c53d7ca5ef7
enable Service Workers' parent-intercept mode on Nightly r=asuth,jgraham
https://hg.mozilla.org/integration/autoland/rev/e64553b959f9
shutdown unregistered Service Workers on browser shutdown r=asuth
https://hg.mozilla.org/integration/autoland/rev/5ce169fa82fb
reduce access levels for member variables/methods in ServiceWorkerManager r=asuth
https://hg.mozilla.org/integration/autoland/rev/2237ceb903a4
expectation changes for WPTs running under sw-e10s r=asuth
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/19521 for changes under testing/web-platform/tests
Whiteboard: SW-MUST → SW-MUST, [wptsync upstream]
Upstream web-platform-tests status checks passed, PR will merge once commit reaches central.

Backed out 6 changesets (Bug 1456995) for devtools failure at browser/browser_aboutdebugging_serviceworker_timeout.js.

Push with failure: https://treeherder.mozilla.org/#/jobs?repo=autoland&searchStr=%2Cwindows%2C7%2Cshippable%2Copt%2Cmochitests%2Ctest-windows7-32-shippable%2Fopt-mochitest-devtools-chrome-e10s-5%2Cm%28dt5%29&revision=2237ceb903a4f006b1e0be5d2be2264450d78ac2&selectedJob=269856916

Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=269856916&repo=autoland&lineNumber=2042

Backout link: https://treeherder.mozilla.org/#/jobs?repo=autoland&resultStatus=testfailed%2Cbusted%2Cexception&classifiedState=unclassified&revision=128dc44577c6c966ec29221fe05c69f6a2ca70c7

[task 2019-10-04T22:46:02.221Z] 22:46:02     INFO - Buffered messages logged at 22:44:32
[task 2019-10-04T22:46:02.221Z] 22:46:02     INFO - Longer timeout required, waiting longer...  Remaining timeouts: 2
[task 2019-10-04T22:46:02.221Z] 22:46:02     INFO - Buffered messages logged at 22:45:17
[task 2019-10-04T22:46:02.221Z] 22:46:02     INFO - Longer timeout required, waiting longer...  Remaining timeouts: 1
[task 2019-10-04T22:46:02.221Z] 22:46:02     INFO - Buffered messages finished
[task 2019-10-04T22:46:02.221Z] 22:46:02     INFO - TEST-UNEXPECTED-FAIL | devtools/client/aboutdebugging/test/browser/browser_aboutdebugging_serviceworker_timeout.js | Test timed out - 
[task 2019-10-04T22:46:02.221Z] 22:46:02     INFO - Removing tab.
[task 2019-10-04T22:46:02.221Z] 22:46:02     INFO - Waiting for event: 'TabClose' on [object XULElement].
[task 2019-10-04T22:46:02.222Z] 22:46:02     INFO - Got event: 'TabClose' on [object XULElement].
[task 2019-10-04T22:46:02.222Z] 22:46:02     INFO - Tab removed and finished closing
[task 2019-10-04T22:46:02.222Z] 22:46:02     INFO - Removing tab.
[task 2019-10-04T22:46:02.222Z] 22:46:02     INFO - Waiting for event: 'TabClose' on [object XULElement].
[task 2019-10-04T22:46:02.222Z] 22:46:02     INFO - Got event: 'TabClose' on [object XULElement].
[task 2019-10-04T22:46:02.222Z] 22:46:02     INFO - Tab removed and finished closing
[task 2019-10-04T22:46:02.225Z] 22:46:02     INFO - TEST-PASS | devtools/client/aboutdebugging/test/browser/browser_aboutdebugging_serviceworker_timeout.js | The main process DebuggerServer has no pending connection when the test ends - 
[task 2019-10-04T22:46:02.272Z] 22:46:02     INFO - GECKO(3880) | MEMORY STAT | vsize 1308MB | vsizeMaxContiguous 164MB | residentFast 551MB | heapAllocated 154MB
[task 2019-10-04T22:46:02.272Z] 22:46:02     INFO - TEST-OK | devtools/client/aboutdebugging/test/browser/browser_aboutdebugging_serviceworker_timeout.js | took 135165ms
[task 2019-10-04T22:46:02.307Z] 22:46:02     INFO - checking window state
[task 2019-10-04T22:46:02.322Z] 22:46:02     INFO - TEST-START | devtools/client/aboutdebugging/test/browser/browser_aboutdebugging_serviceworker_unregister.js
[task 2019-10-04T22:46:02.362Z] 22:46:02     INFO - GECKO(3880) | [Child 4736, Chrome_ChildThread] WARNING: pipe error: 109: file z:/task_1570210073/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 341
[task 2019-10-04T22:46:02.362Z] 22:46:02     INFO - GECKO(3880) | [Child 4736, Chrome_ChildThread] WARNING: pipe error: 109: file z:/task_1570210073/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 341
[task 2019-10-04T22:46:03.985Z] 22:46:03     INFO - GECKO(3880) | Empty service worker registered
[task 2019-10-04T22:46:47.326Z] 22:46:47     INFO - Not taking screenshot here: see the one that was previously logged
[task 2019-10-04T22:46:47.327Z] 22:46:47     INFO - Buffered messages logged at 22:46:02
[task 2019-10-04T22:46:47.327Z] 22:46:47     INFO - Entering test bound 
[task 2019-10-04T22:46:47.327Z] 22:46:47     INFO - opening about:debugging
[task 2019-10-04T22:46:47.328Z] 22:46:47     INFO - Adding a new tab with URL: about:debugging
[task 2019-10-04T22:46:47.328Z] 22:46:47     INFO - Tab added and finished loading
[task 2019-10-04T22:46:47.328Z] 22:46:47     INFO - Wait until Connect page is displayed
[task 2019-10-04T22:46:47.329Z] 22:46:47     INFO - Buffered messages logged at 22:46:03
[task 2019-10-04T22:46:47.329Z] 22:46:47     INFO - Select This Firefox page
[task 2019-10-04T22:46:47.329Z] 22:46:47     INFO - Wait for requests to be complete
[task 2019-10-04T22:46:47.329Z] 22:46:47     INFO - Wait for runtime page to be rendered
[task 2019-10-04T22:46:47.329Z] 22:46:47     INFO - Adding a new tab with URL: http://example.com/browser/devtools/client/aboutdebugging/test/browser/resources/service-workers/empty-sw.html
[task 2019-10-04T22:46:47.329Z] 22:46:47     INFO - Tab added and finished loading
[task 2019-10-04T22:46:47.330Z] 22:46:47     INFO - Wait until the service worker appears and is running
[task 2019-10-04T22:46:47.330Z] 22:46:47     INFO - Buffered messages finished
[task 2019-10-04T22:46:47.330Z] 22:46:47     INFO - TEST-UNEXPECTED-FAIL | devtools/client/aboutdebugging/test/browser/browser_aboutdebugging_serviceworker_unregister.js | Test timed out - 
[task 2019-10-04T22:46:47.330Z] 22:46:47     INFO - Removing tab.
[task 2019-10-04T22:46:47.330Z] 22:46:47     INFO - Waiting for event: 'TabClose' on [object XULElement].
[task 2019-10-04T22:46:47.345Z] 22:46:47     INFO - Got event: 'TabClose' on [object XULElement].
Flags: needinfo?(perry)
Upstream PR was closed without merging

Somehow didn't catch that test. Looks like :ochameau has a simple fix for the failure on bug 1585829, so marked as blocked on that.

Depends on: 1585829
Flags: needinfo?(perry)
Depends on: 1575185
Pushed by pjiang@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5786df27c1ac
make browser_devtools_serviceworker_interception.js compatible with parent-intercept r=asuth
https://hg.mozilla.org/integration/autoland/rev/7a07d4d1bf98
give InternalRequest::mMozErrors a default initializer r=asuth
https://hg.mozilla.org/integration/autoland/rev/b7a13c7bc4f1
enable Service Workers' parent-intercept mode on Nightly r=asuth,jgraham
https://hg.mozilla.org/integration/autoland/rev/944a83c45961
shutdown unregistered Service Workers on browser shutdown r=asuth
https://hg.mozilla.org/integration/autoland/rev/bd6c3a2905f3
reduce access levels for member variables/methods in ServiceWorkerManager r=asuth
https://hg.mozilla.org/integration/autoland/rev/be9a6289486a
expectation changes for WPTs running under sw-e10s r=asuth
Upstream web-platform-tests status checks passed, PR will merge once commit reaches central.
Regressions: 1587345
Upstream PR merged by moz-wptsync-bot
Regressions: 1587447
Regressions: 1578919
Regressions: 1587759
See Also: → 1587374

Jens, please see comment 30.

Flags: needinfo?(jstutte)
Regressions: 1588152

(In reply to Sebastian Hengst [:aryx] (needinfo on intermittent or backout) from comment #31)

Jens, please see comment 30.

Just FYI, Jens is away until Friday.

Regressions: 1587960
Regressions: 1587794
You need to log in before you can comment on or make changes to this bug.