Closed Bug 1175949 Opened 9 years ago Closed 9 years ago

When unregistering a service worker registration via about:sw in b2g the parent process kills the settings app

Categories

(Firefox OS Graveyard :: General, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1179191
FxOS-S3 (24Jul)

People

(Reporter: azasypkin, Assigned: dimi)

References

Details

Attachments

(2 files)

STR:

Follow the steps mentioned in bug 1175944 comment 0 (from #1 to #3), and then try to remove Service Worker registration via Settings -> Developer -> Service Worker -> Unregister.

Actual result: Service Worker registration is removed, but Settings/System app is crashed;

Expected result: Nothing should crash.

Also please note, that if I try to remove registration from the same app that's run in hosted mode (via https), registration is _visually_ removed, nothing crashes, but when I re-enter Service Worker section I still see the same registration.

Flame PVT mc Engineering Build:

Build Identifier: 20150618010201
Gaia git commit Info: 2015-06-18 14:31:48, bd681cee
Gecko hg commit info: a3f280b6f8d5
See Also: → 1172902
Hey Fernando,

Just setting ni? to make you aware of this issue (not sure what is the right component for such issues either) :)

Thanks!
Flags: needinfo?(ferjmoreno)
(In reply to Oleg Zasypkin [:azasypkin] from comment #0)

> 
> Also please note, that if I try to remove registration from the same app
> that's run in hosted mode (via https), registration is _visually_ removed,
> nothing crashes, but when I re-enter Service Worker section I still see the
> same registration.
> 

Hi Oleg,
If I am not wrong, this issue seems to be the same than the one reported in bug 1168339, although it was resolved as duplicated of bug 1167325 (and this duplicated of bug 1155153), at the end, one more dependency was added and it seems that it needs bug 1171915 to be completely resolved (see https://bugzilla.mozilla.org/show_bug.cgi?id=1168339#c3).

Bug 1167325 is almost ready to be landed, as soon as it does we will verify bug 1168339 and your STR to confirm it's fixed or not.
See Also: → 1168339
> Bug 1167325 is almost ready to be landed, as soon as it does we will verify
> bug 1168339 and your STR to confirm it's fixed or not.

Sorry I was wrong with the bug number!

Bug 1171915 is almost ready to be landed, as soon as it does we will verify bug 1168339 and your STR to confirm it's fixed or not.
Hi,

Bug 1171915 is focused on fixing the update about:sw scenario in b2g. 
Let's analyze within this bug the root cause of the b2g unregister scenarios in about:sw described in comment 0. Once it has been clarified will modify the title accordingly and work on the proper fix.
Thanks!
These are the traces corresponding to scenario 1 (fxos-app packaged app) using a debug build from removing Service Worker step till recovering from system/settings crash. Environmental variables:
Flame device
Gecko: db62c50
Gaia: 900d01e
Platform version: 41.0a1
Build Id: 20150622104949

Hope it helps!
These are the traces corresponding to scenario 2 (fxos-app hosted app) using a debug build from removing Service Worker step:
#4: so being in Settings->Developer->Service Workers, select unregister button, the Service Worker disappears from the list. 
#5: go to Settings->Developer
#6: re-enter to Service Workers (Settings->Developer->Service Workers), the Service Worker is shown in the list so it is not properly removed at step #4
Environmental variables:
Flame device
Gecko: db62c50
Gaia: 900d01e
Platform version: 41.0a1
Build Id: 20150622104949

Hope it helps!
Assignee: nobody → jaoo
Target Milestone: --- → FxOS-S2 (10Jul)
Status: NEW → ASSIGNED
No longer blocks: 1168339
Hi,

just adding that tested with today's master build (7/1) and the behavior change a bit:
*scenario #1 (pre-installed packaged app) - being in Settings->Developer->Service Workers, select unregister button, nothing happens, the sw doesn't disappear from the list. Notice that there is no crash in Settings/System app as reported in comment 0
*scenario #2 (hosted app) - being in Settings->Developer->Service Workers, select unregister button, nothing happens, the sw doesn't disappear from the list. Notice that in comment 0 it was initially removed from the list but the sw was listed again when re-entering in about:sw

It seems Bug 1171915 changed the initial behavior described within this bug. Setting Bug 1179161 dependency here.

Environmental variables:
Flame device
Build Id: 20150701063840
Gecko: b617e38
Gaia: b8b329a
Platform version: 42.0a1
Depends on: 1179161
If I am not wrong the unregister process itself is killing the settings app (and every app running by the time the user hits the unregister button). On a DEBUG-enabled B2G build I see how the CheckPrincipalWithCallbackRunnable runnable object -used by ServiceWorkerManagerParent obj- calls AssertAppPrincipal(). AssertAppPrincipal function kills the setting app at [1]. That logic was added by bug 1155153. I'll talk to Andrea to figure out why that is possible.

[1] https://mxr.mozilla.org/mozilla-central/source/dom/ipc/AppProcessChecker.cpp#222
See Also: → 1155153
Flags: needinfo?(ferjmoreno)
Hi,

Just confirming that after landing Bug 1179161, currently, the unique scenario remaining when unregistering a sw via about:sw in b2g is that Settings/System app crashes.
Adding 1182117 dependency
Depends on: 1182117
See bug 1179191 comment 3. IMHO this bug could be considered a DUP of bug 1179191.
Summary: Removing SW registered by packaged pre-installed app via about:serviceworkers in b2g crashes Settings/System app → When unregistering a service worker registration via about:sw in b2g the parent process kills the settings app
moving to FxOS-S4, other priorities have raised for FxOS-S3. Thanks!
Target Milestone: FxOS-S2 (10Jul) → FxOS-S4 (07Aug)
Hi Dimi,

As commented yesterday during the bi-weekly sync meeting, would you mind to check if the workaround you are working on in Bug 1179191 would be valid for unregistering scenario too?. Thanks!
Flags: needinfo?(dlee)
(In reply to Noemí Freire (:noemi) from comment #13)
> Hi Dimi,
> 
> As commented yesterday during the bi-weekly sync meeting, would you mind to
> check if the workaround you are working on in Bug 1179191 would be valid for
> unregistering scenario too?. Thanks!

Yes, from log it looks like the same issue.
I will take this bug.
Assignee: jaoo → dlee
Flags: needinfo?(dlee)
Have uploaded a patch that can fix issue bug 1179191, but after testing this bug, setting app still crashes. I think there might be additional problem in this bug.
I will check this issue.
Hi Noemi,
I have checked this bug and it has the same problem as bug 1179191. Also as Ben mentioned in bug 1179191 comment 26, there is no temporarily solution until we move ServiceWorkerManager to parent process.

So I would suggest we set this as duplicate of bug 1179191 and verify it when bug 1182117 is landed.
How do you think ?
Flags: needinfo?(noemi.freiredecarlos)
Hi Dim,

Fine by me. Per comment 16 marking this bug as duplicate of bug 1179191. It should be tested once bug 1182117 lands. Thanks!
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Flags: needinfo?(noemi.freiredecarlos)
Resolution: --- → DUPLICATE
setting the appropriate target milestone here. Thanks!
Target Milestone: FxOS-S4 (07Aug) → FxOS-S3 (24Jul)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: