Closed Bug 1575185 Opened 5 months ago Closed 3 months ago

Intermittent dom/push/test/test_permissions.html | [object Object] - Should not throw any errors

Categories

(Core :: DOM: Push Notifications, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla71
Tracking Status
firefox-esr60 --- unaffected
firefox-esr68 --- unaffected
firefox67 --- unaffected
firefox68 --- unaffected
firefox69 --- unaffected
firefox70 --- wontfix
firefox71 --- fixed

People

(Reporter: intermittent-bug-filer, Assigned: perry)

References

Details

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

Attachments

(2 files)

Filed by: cbrindusan [at] mozilla.com
Parsed log: https://treeherder.mozilla.org/logviewer.html#?job_id=262439367&repo=mozilla-central
Full log: https://queue.taskcluster.net/v1/task/dB6SLYKcT-OEkV7Tn7IT3g/runs/0/artifacts/public/logs/live_backing.log


[task 2019-08-20T10:40:03.026Z] 10:40:03 INFO - TEST-START | dom/push/test/test_permissions.html
[task 2019-08-20T10:40:03.042Z] 10:40:03 INFO - [1066, Main Thread] WARNING: No active window: file /builds/worker/workspace/build/src/js/xpconnect/src/XPCJSContext.cpp, line 664
[task 2019-08-20T10:40:03.112Z] 10:40:03 INFO - GECKO(1087) | ++DOMWINDOW == 15 (0x7fc40dc82400) [pid = 1171] [serial = 21] [outer = 0x7fc40dd0a5c0]
[task 2019-08-20T10:40:03.180Z] 10:40:03 INFO - GECKO(1087) | [Child 1171, Main Thread] WARNING: NS_ENSURE_SUCCESS_VOID(rv) failed with result 0x80070057: file /builds/worker/workspace/build/src/toolkit/components/antitracking/AntiTrackingCommon.cpp, line 2019
[task 2019-08-20T10:40:03.208Z] 10:40:03 INFO - GECKO(1087) | --DOMWINDOW == 14 (0x7fc412316800) [pid = 1171] [serial = 14] [outer = (nil)] [url = http://mochi.test:8888/tests/SimpleTest/iframe-between-tests.html]
[task 2019-08-20T10:40:03.210Z] 10:40:03 INFO - GECKO(1087) | --DOMWINDOW == 13 (0x7fc40dc87000) [pid = 1171] [serial = 11] [outer = (nil)] [url = http://mochi.test:8888/tests/dom/push/test/test_data.html]
[task 2019-08-20T10:40:03.211Z] 10:40:03 INFO - GECKO(1087) | --DOMWINDOW == 12 (0x7fc40f64a800) [pid = 1171] [serial = 13] [outer = (nil)] [url = http://mochi.test:8888/tests/dom/push/test/frame.html]
[task 2019-08-20T10:40:03.276Z] 10:40:03 INFO - GECKO(1087) | [Parent 1087, Main Thread] WARNING: '!window', file /builds/worker/workspace/build/src/dom/cache/CacheStorage.cpp, line 575
[task 2019-08-20T10:40:03.305Z] 10:40:03 INFO - GECKO(1087) | [Child 1227, Main Thread] WARNING: '!window', file /builds/worker/workspace/build/src/dom/cache/CacheStorage.cpp, line 575
[task 2019-08-20T10:40:03.341Z] 10:40:03 INFO - GECKO(1087) | [Child 1227, DOM Worker] WARNING: '!rv', file /builds/worker/workspace/build/src/dom/serviceworkers/ServiceWorkerOp.cpp, line 277
[task 2019-08-20T10:40:03.342Z] 10:40:03 INFO - GECKO(1087) | [Child 1227, DOM Worker] WARNING: '!rv', file /builds/worker/workspace/build/src/dom/serviceworkers/ServiceWorkerOp.cpp, line 277
[task 2019-08-20T10:40:03.437Z] 10:40:03 INFO - GECKO(1087) | [Child 1227, DOM Worker] WARNING: '!rv', file /builds/worker/workspace/build/src/dom/serviceworkers/ServiceWorkerOp.cpp, line 277
[task 2019-08-20T10:40:03.453Z] 10:40:03 INFO - GECKO(1087) | --DOCSHELL 0x7f5eb6438800 == 4 [pid = 1148] [id = {2af1870f-ede3-400b-a81a-2008047a465b}] [url = moz-extension://daf02944-662c-498f-8468-f3a5f17cbaf0/_generated_background_page.html]
[task 2019-08-20T10:40:03.469Z] 10:40:03 INFO - TEST-INFO | started process screentopng
[task 2019-08-20T10:40:03.832Z] 10:40:03 INFO - TEST-INFO | screentopng: exit 0
[task 2019-08-20T10:40:03.832Z] 10:40:03 INFO - Buffered messages logged at 10:40:03
[task 2019-08-20T10:40:03.832Z] 10:40:03 INFO - add_task | Entering test start
[task 2019-08-20T10:40:03.832Z] 10:40:03 INFO - add_task | Leaving test start
[task 2019-08-20T10:40:03.832Z] 10:40:03 INFO - add_task | Entering test denySubscribe
[task 2019-08-20T10:40:03.832Z] 10:40:03 INFO - TEST-PASS | dom/push/test/test_permissions.html | Wrong exception type
[task 2019-08-20T10:40:03.834Z] 10:40:03 INFO - TEST-PASS | dom/push/test/test_permissions.html | Wrong exception name
[task 2019-08-20T10:40:03.836Z] 10:40:03 INFO - add_task | Leaving test denySubscribe
[task 2019-08-20T10:40:03.837Z] 10:40:03 INFO - add_task | Entering test denySubscribeInWorker
[task 2019-08-20T10:40:03.838Z] 10:40:03 INFO - Buffered messages finished
[task 2019-08-20T10:40:03.838Z] 10:40:03 INFO - TEST-UNEXPECTED-FAIL | dom/push/test/test_permissions.html | [object Object] - Should not throw any errors

Recent occurrences are regression of bug 1582881.

Priority: -- → P2

Geoff should we disable this until there is a fix?

Flags: needinfo?(gbrown)

Avoid high frequency intermittent failure on fission.

Flags: needinfo?(gbrown)
Pushed by gbrown@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6fdd9ba4d2ae
Skip test_permissions.html on fission; r=mccr8
Keywords: leave-open
Whiteboard: [stockwell needswork:owner] → [stockwell disabled]
No longer blocks: 1582881
Keywords: leave-open
Assignee: nobody → perry

Previously, Service Workers could spawn in a process that isn't subscribed
to permission updates, which could happen if that process hadn't loaded any
same-origin documents. To address this, parent-process logic for spawning
Service Workers would snapshot the permissions state to be sent to a content
process.

Unfortunately, this approach could lead to outdated, unsynchronized permissions.
Note that nsIPermissionManager::SetPermissionsWithKey is only used to initialize
permissions for a given key and is a no-op if already called with the same key
in a given process. As a result, the following sequence of events could happen:

Assume a content process CP that isn't subscribed to permission changes for an
origin A:

  1. Parent process decides to spawn an origin A Service Worker in CP,
    snapshotting a value V for permission P.
  2. The Service Worker is spawned in CP, setting CP's permission manager's
    permission P to value V (for origin A).
  3. Parent process updates its permission P to a value A', which is not
    broadcasted to CP (because it's not subscribed).
  4. By now, the initial Service Worker has been terminated, and the parent
    process decides once again to spawn an origin A Service Worker in CP.
  5. The Service Worker is spawned in CP, but the call to SetPermissionsWithKey
    is a no-op, leaving CP1 with a mismatched value for permission P.

An additional scenario is if the parent process updates a permission during a
remote Service Worker's lifetime.

This patch, which would subscribe CP1 to permission updates when the parent
process knows a Service Worker would be spawned in CP1, prevents these problems.

Blocks: 1456995
Pushed by pjiang@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5e3149673e93
Subscribe content processes spawning Service Workers to permission updates r=asuth
Status: NEW → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla71
Regressions: 1587365
You need to log in before you can comment on or make changes to this bug.