Closed Bug 1386412 Opened 2 years ago Closed 2 years ago

Perma failure when 56 merges to beta in browser_service_workers_multi_content_process.js | Test timed out -

Categories

(DevTools :: about:debugging, defect, P3)

defect

Tracking

(firefox56 fixed, firefox57 fixed)

RESOLVED FIXED
Firefox 57
Tracking Status
firefox56 --- fixed
firefox57 --- fixed

People

(Reporter: aryx, Assigned: jdescottes)

References

Details

(Keywords: intermittent-failure)

Attachments

(1 file)

Merge is tomorrow (August 2nd)

Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=119734413&repo=try

TEST-UNEXPECTED-FAIL | devtools/client/aboutdebugging/test/browser_service_workers_multi_content_process.js | Test timed out -

TEST-UNEXPECTED-FAIL | devtools/client/aboutdebugging/test/browser_service_workers_push.js | The service-workers url appears in the list: http://example.com/browser/devtools/client/aboutdebugging/test/service-workers/empty-sw.js - Got false, expected true
Flags: needinfo?(jdescottes)
Summary: Perma failure when 56 merges to beta in → Perma failure when 56 merges to beta in browser_service_workers_multi_content_process.js | Test timed out -
Are you sure about the perma failure? 

From what I see in the central as beta push https://treeherder.mozilla.org/#/jobs?repo=try&revision=b47de49ad58a9f315a1a6ddcbe3c8fbd5db1a38d&selectedJob=119734009, there are successful jobs where this test doesn't fail. Given that this test is already intermittent, are we sure it's a blocker?
Flags: needinfo?(jdescottes) → needinfo?(aryx.bugmail)
This patch should normally address intermittents from Bug 1340199 and Bug 1349121
Assignee: nobody → jdescottes
Blocks: 1340199, 1349121
Status: NEW → ASSIGNED
Priority: -- → P3
Comment on attachment 8892832 [details]
Bug 1386412 - fix race conditions in browser_service_workers_multi_content_process.js;

https://reviewboard.mozilla.org/r/163830/#review169184

Thanks for chasing this intermittent.

It looks like there migh be other suspicious usages of waitForMutation:
http://searchfox.org/mozilla-central/source/devtools/client/aboutdebugging/test/browser_page_not_found.js#24
http://searchfox.org/mozilla-central/source/devtools/client/aboutdebugging/test/browser_service_workers_push_service.js#97
http://searchfox.org/mozilla-central/source/devtools/client/aboutdebugging/test/browser_service_workers_status.js#46
http://searchfox.org/mozilla-central/source/devtools/client/aboutdebugging/test/browser_service_workers_timeout.js#66

That makes me wonder if we should warn from eslint usages of "yield waitForXXXX"...
but unfortunately, some usages are valid.

::: devtools/client/aboutdebugging/test/browser_service_workers_multi_content_process.js:30
(Diff revision 1)
> +  let onMutation = waitForMutation(serviceWorkersElement, { childList: true });
> +
> +  let swTab = yield addTab(TAB_URL, { background: true });
>  
> -  yield waitForMutation(serviceWorkersElement, { childList: true });
> +  info("Wait for service worker to appear in the list");
> +  yield onMutation;

If that's what caused this intermittent, it looks like there is other potential intermittents:
http://searchfox.org/mozilla-central/source/devtools/client/aboutdebugging/test/browser_service_workers.js#20
http://searchfox.org/mozilla-central/source/devtools/client/aboutdebugging/test/browser_service_workers_fetch_flag.js#18
http://searchfox.org/mozilla-central/source/devtools/client/aboutdebugging/test/browser_service_workers_timeout.js#23
Attachment #8892832 - Flags: review?(poirot.alex) → review+
Thanks for the review! I forgot to mention but I did a few try pushes to confirm if this was useful.

First the central as beta simulation without my patch: https://treeherder.mozilla.org/#/jobs?repo=try&revision=221c12eb40bfd6e9d04936c5b2aea085fa39aba1
we can see frequent dt9 failures, for the timeout issue mentioned.

Then same simulation with a first version of my patch: https://treeherder.mozilla.org/#/jobs?repo=try&revision=ffea93d1a821c5bd2ab567dc548c033941514a52 
still a dt9 failure (but less frequent) and failing later in the test

Finally a last test with a patch also trying to fix the issue found in the second try push:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=482f6a8b794cc4558e9bb6274a8b9fbb6b28d9f6
(I did this last one based off central, instead of the beta simulation, so the chunk was dt8 instead of dt9)

(In reply to Alexandre Poirot [:ochameau] from comment #4)
> Comment on attachment 8892832 [details]
> Bug 1386412 - fix race conditions in
> browser_service_workers_multi_content_process.js;
> 
> https://reviewboard.mozilla.org/r/163830/#review169184
> 
> Thanks for chasing this intermittent.
> 
> It looks like there migh be other suspicious usages of waitForMutation:
> http://searchfox.org/mozilla-central/source/devtools/client/aboutdebugging/
> test/browser_page_not_found.js#24
> http://searchfox.org/mozilla-central/source/devtools/client/aboutdebugging/
> test/browser_service_workers_push_service.js#97
> http://searchfox.org/mozilla-central/source/devtools/client/aboutdebugging/
> test/browser_service_workers_status.js#46
> http://searchfox.org/mozilla-central/source/devtools/client/aboutdebugging/
> test/browser_service_workers_timeout.js#66
> 
> That makes me wonder if we should warn from eslint usages of "yield
> waitForXXXX"...
> but unfortunately, some usages are valid.

Do you have any example in mind?

> 
> :::
> devtools/client/aboutdebugging/test/
> browser_service_workers_multi_content_process.js:30
> (Diff revision 1)
> > +  let onMutation = waitForMutation(serviceWorkersElement, { childList: true });
> > +
> > +  let swTab = yield addTab(TAB_URL, { background: true });
> >  
> > -  yield waitForMutation(serviceWorkersElement, { childList: true });
> > +  info("Wait for service worker to appear in the list");
> > +  yield onMutation;
> 
> If that's what caused this intermittent, it looks like there is other
> potential intermittents:
> http://searchfox.org/mozilla-central/source/devtools/client/aboutdebugging/
> test/browser_service_workers.js#20
> http://searchfox.org/mozilla-central/source/devtools/client/aboutdebugging/
> test/browser_service_workers_fetch_flag.js#18
> http://searchfox.org/mozilla-central/source/devtools/client/aboutdebugging/
> test/browser_service_workers_timeout.js#23

I'll file a follow up to cleanup other about:debugging tests. The pattern is racy anyway, I guess depending on the test they are more or less likely to fail, but fixing it shouldn't hurt.
Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0bf2574ad9ff
fix race conditions in browser_service_workers_multi_content_process.js;r=ochameau
Blocks: 1386613
https://hg.mozilla.org/mozilla-central/rev/0bf2574ad9ff
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 57
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.