Closed Bug 1186949 Opened 5 years ago Closed 3 years ago

Nightly crashes when user navigates to the page that registers ServiceWorker

Categories

(Core :: DOM: Service Workers, defect, P3)

defect

Tracking

()

RESOLVED DUPLICATE of bug 1224941

People

(Reporter: azasypkin, Assigned: bhsu)

References

Details

(Whiteboard: [tw-dom])

It seems like a very recent regression. I can't reproduce this with trivial fetch-only ServiceWorker file, but it's always reproduced when ServiceWorker file uses ServiceWorkerWare lib [1]. Can't pin point what exactly causes this crash, hence filing a bug.

STR:
1. Open [2];
2. Tap on "Install SW" link.

Expected result: installation page is loaded and SW is registered.

Actual result: browser crashes (some crash details at [3]).

I see this issue on the latest PVT mozilla-central Flame build as well. I don't see this issue if I navigate to installation page directly (https://azasypkin.github.io/sw-tests/benchmark-app/simple-offline-cache/install.html). Sometimes it works, but always crashes if I remove all service workers, restarts browser and follow STR.

And it worked well several days ago :)

[1] https://github.com/gaia-components/serviceworkerware
[2] https://azasypkin.github.io/sw-tests/benchmark-app/simple-offline-cache/
[3] https://pastebin.mozilla.org/8840440
This is crashing because the window for the document is gone.

Catalin, should FireControllerChangeOnDocument() be gracefully failing the claim operation if the window is gone?  This suggests to me that the window was closed while in the process of installing the service worker.
Flags: needinfo?(catalin.badea392)
(In reply to Ben Kelly [:bkelly] from comment #1)
> This is crashing because the window for the document is gone.
> 
> Catalin, should FireControllerChangeOnDocument() be gracefully failing the
> claim operation if the window is gone?  This suggests to me that the window
> was closed while in the process of installing the service worker.

This seems to happen when claiming a document whose window has been closed. Yes, I think that's
the correct thing to do here.
Flags: needinfo?(catalin.badea392)
Whiteboard: [tw-dom]
Priority: -- → P3
Assignee: nobody → bhsu
Hi Ben,

I'd like to work on this issue, but the links provided by Oleg are no longer exist. As a result, I started from reading the comments of both you and Catalin. IMHO, this bug might be fixed by this check[0] written in 1224941. However, I failed to reproduce this case by marking the check via invoking Clients.claim() after removing an iframe. Would you mind sharing what happened in 1224941? Or this issue has nothing to do with 1224941?

[0] http://searchfox.org/mozilla-central/source/dom/workers/ServiceWorkerManager.cpp#2750-2753
Hello Oleg,

Though this issue is opened a while ago, I am about to work on this issue. However, the provided links are no longer exist :( If possible, do you mind providing some more information about this?

Thanks.
Flags: needinfo?(azasypkin)
Hey Ben,

I think here is the correct address for the link from comment 0 (I've moved test repos to a different place since then):

https://nga-crash-tests.github.io/service-worker-benchmarks/simple-offline-cache/

I've quickly tried it with my Nightly (53.0a1 (2016-11-17) (64-bit)) and haven't noticed any problems so far.

Thanks.
Flags: needinfo?(azasypkin)
I agree that this was probably fixed in bug 1224941.  Its a bit hard to tell, though, since the crash stack from comment 0 was not saved anywhere persistent.  The pastebin is long gone.
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1224941
You need to log in before you can comment on or make changes to this bug.