Closed Bug 1425897 Opened 3 years ago Closed 3 years ago

Investigate about:debugging service worker push test failing with Bug 1419771


(DevTools :: about:debugging, defect)

58 Branch
Not set


(firefox59 fixed)

Firefox 59
Tracking Status
firefox59 --- fixed


(Reporter: jdescottes, Assigned: jdescottes)




(1 file)

See backlog in Bug 1419771: we still have an about:debugging test failure when rebased on top of the patches from Bug 1419771.

Right now I still need ~5 separate tests running sequentially to trigger the bug. It seems linked with multi e10s as suggested by :asuth in Bug 1386613 comment 20. When the push test fails, we get two different instances of the service worker script: the one which is installed from the test content page, and another one which receives the push. I am not sure how to log the process ID from the sw script however, so I can't tell for sure if they are running in two separate processes.

about:debugging tests are fiddling with the dom.ipc.processCount preference in every service worker test and particularly in browser_service_workers_multi_content_process.js where we force it to 2 to check that a warning message is displayed. 

As a workaround, moving browser_service_workers_multi_content_process.js to run after the other about:debugging tests seems to fix the issue. Since your patch is about preferences, and it seems the failure is linked to the dom.ipc.processCount preference not behaving as expected, I'm not sure we should go for a workaround here.

You can see the current test case I use at:

The list of tests running here are :
- browser_service_workers.js
- browser_service_workers_fetch_flag.js: just a clone of browser_service_workers.js
- browser_service_workers_multi_content_process.js: clone of browser_service_workers.js + setting dom.ipc.processCount to 2
- browser_service_workers_not_compatible.js: just an empty ok(true) test
- browser_service_workers_push.js
For some reason the failures are much more frequent when running only the about:debugging tests:
The following code might be racy:

From the symptoms, it looks like a previous content process remains from an older test, and in the snippet above we are clearing cached processes (potentially) before setting the dom.ipc.contentProcess pref to 1. Try at
Try is green so it looks like this was the root cause of the failures. As I said the code looked racy from the start, so I think that it is acceptable that the patches from Bug 1419771 trigger the race condition more frequently.

Global devtools try:
Comment on attachment 8938077 [details]
Bug 1425897 - Fix race condition in about:debugging test helper;
Attachment #8938077 - Flags: review?(amarchesini) → review+
Assignee: nobody → jdescottes
Pushed by
Fix race condition in about:debugging test helper;r=baku
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 59
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.