[Privacy] Enable privacy control will cause device to keep rebooting when using geolocation

RESOLVED INVALID

Status

defect
P1
blocker
RESOLVED INVALID
5 years ago
4 years ago

People

(Reporter: gchang, Unassigned)

Tracking

({privacy})

unspecified
ARM
Gonk (Firefox OS)
Dependency tree / graph

Firefox Tracking Flags

(b2g-v2.0 unaffected, b2g-v2.0M unaffected, b2g-v2.1 unaffected, b2g-v2.1S unaffected, b2g-v2.2 affected, b2g-master affected)

Details

Attachments

(1 attachment)

Reporter

Description

5 years ago
### Steps:
1. Go to Settings > Privacy Panel > Location Accuracy
2. Enable "Use geolocation" and "Use local adjustment" and choose "Precise"
3. Tap rocket bar and wait for a while 
4. Device will crash and reboot

### Expected:
1. User is able to search anything.

### Actual:
1. Device will crash and reboot

PS: Also found that device will crash if using any app with geolocation.


### Reproduce rate
always

### Version:
Gaia-Rev        c5b01c018e79a36d7ca1e466c143c76fac7da705
Gecko-Rev       https://hg.mozilla.org/mozilla-central/rev/5d6e0d038f95
Build-ID        20141215160201
Version         37.0a1
Device-Name     flame
FW-Release      4.4.2
Reporter

Updated

5 years ago
blocking-b2g: --- → 2.2?
See Also: → 1113019
I am unable to reproduce this. Seeing as how bug 1113019 was related and is no longer happening, I was wondering if you were still seeing this Gerry?
Flags: needinfo?(gchang)
Reporter

Comment 2

5 years ago
Yes, I'm still have the same issue.
You can also add a few steps to make this issue happen more easily.
Please add the following steps after step 2.

Tap "Add exceptions" > Choose "System" > Change the setting from "Global Settings" to "Precise"
Flags: needinfo?(gchang)
Reporter

Updated

5 years ago
Blocks: 1083953
Reporter

Comment 3

5 years ago
NI Wilfred & Kevin for this issue. This issue blocks my testing as long as I use geolocation.
Flags: needinfo?(wmathanaraj)
Flags: needinfo?(kgrandon)
Still unable to reproduce. Gerry - can you provide a full logcat here? That would be very helpful.
Flags: needinfo?(kgrandon) → needinfo?(gchang)
Reporter

Comment 5

5 years ago
Posted file BZ1111992.log
The log is attached.
I can still recreate this issue in below build.
Gaia-Rev        ca6e91e09ef3ab417a0f6b6d6668d43597d85700
Gecko-Rev       https://hg.mozilla.org/mozilla-central/rev/7b33ee7fd162
Build-ID        20141221160205
Version         37.0a1
Device-Name     flame
FW-Release      4.4.2
Flags: needinfo?(gchang)

Updated

5 years ago
Summary: Enable privacy control will cause device to keep rebooting when using geolocation → [DT] [Privacy] Enable privacy control will cause device to keep rebooting when using geolocation
Whiteboard: DT privacy

Updated

5 years ago
blocking-b2g: 2.2? → 2.2+
Keywords: privacy
Whiteboard: DT privacy → DT

Updated

5 years ago
Summary: [DT] [Privacy] Enable privacy control will cause device to keep rebooting when using geolocation → [DT][Privacy] Enable privacy control will cause device to keep rebooting when using geolocation
NI myself for tracking
Flags: needinfo?(jocheng)

Updated

5 years ago
Blocks: Privacy
Theres a lot of spam in the logs, but these don't look good to me:

12-24 10:13:21.185  1578  1578 I Gecko   : ###!!! [Child][MessageChannel] Error: Channel error: cannot send/recv
12-24 10:13:21.185  1578  1578 I Gecko   : 
12-24 10:13:21.245   190   190 I ServiceManager: service 'media.audio_flinger' died
12-24 10:13:21.245   190   190 I ServiceManager: service 'media.player' died
12-24 10:13:21.245   190   190 I ServiceManager: service 'media.camera' died
12-24 10:13:21.245   190   190 I ServiceManager: service 'media.audio_policy' died

I'm not really sure what they mean though. Fabrice or Gabriele - would you guys have any ideas?
Flags: needinfo?(gsvelto)
Flags: needinfo?(fabrice)
(In reply to Kevin Grandon :kgrandon from comment #7)
> Theres a lot of spam in the logs, but these don't look good to me:
> 
> 12-24 10:13:21.185  1578  1578 I Gecko   : ###!!! [Child][MessageChannel]
> Error: Channel error: cannot send/recv
> 12-24 10:13:21.185  1578  1578 I Gecko   : 

This means that an app died, this happens all the time when we run out of memory.

> 12-24 10:13:21.245   190   190 I ServiceManager: service
> 'media.audio_flinger' died
> 12-24 10:13:21.245   190   190 I ServiceManager: service 'media.player' died
> 12-24 10:13:21.245   190   190 I ServiceManager: service 'media.camera' died
> 12-24 10:13:21.245   190   190 I ServiceManager: service
> 'media.audio_policy' died

This is actually coming from some Android code. I'm not sure how we interact with it (or if we do at all).
Flags: needinfo?(gsvelto)

Updated

5 years ago
Flags: needinfo?(kgrandon)
I still can't reproduce this using the v188 base image, so not too much I can do here. Looping in Marta/Dave - do you guys have any idea what might be causing this, or someone who could help us look into the geolocation issue?
Flags: needinfo?(marta)
Flags: needinfo?(kgrandon)
Flags: needinfo?(huseby)

Comment 10

5 years ago
Cannot reproduce either...
Flags: needinfo?(marta)
QA Contact: ckreinbring
This is a known bug I'm fixing.  The fix is a combination of Bug 1107673 and Bug 1107681 and Bug 1115375 and Bug 1116189.  I'm in the middle of landing the blocking patches.  I am focused 100% on this to get it done ASAP.
Flags: needinfo?(huseby)
(In reply to Kevin Grandon :kgrandon from comment #9)
> I still can't reproduce this using the v188 base image, so not too much I
> can do here. Looping in Marta/Dave - do you guys have any idea what might be
> causing this, or someone who could help us look into the geolocation issue?

The root cause is that the new JSAPI isn't totally congruent with the old utility functions.  For instance, we used to use AutoSafeJSContext to get the correct context for rooting, but that is deprecated and can't be used anymore (i.e. auto r-).  The new JSAPI patter looks like this:

 AutoJSAPI jsapi;
 jsapi.Init();
 JSContext *cx = jsapi.cx();

Was supposed to do the exact same thing but it doesn't enter a compartment unless you give Init() a reference to a JS::Object.  But that sets up a chicken/egg problem in dom Observe handlers that receive wrapped RootedDictionary<SettingChangeNotification> hiding behind an nsISupports interface handle.

The crash is caused because jsapi.Init() isn't entering a compartment and the old WrappedJSToDictionary would dereference a NULL ptr when unpack the dictionary.

I've been working closely with :bholley to design correct solutions to this problem.  Bug 1107673 solves the wrapped dictionary problem correctly.  Bug 1115375 solution solves the JS::Value to nsAutoJSString conversion properly.  At that point, I can clean up and land the patch in Bug 1093688 which was the bug filed at the first sign of trouble.

I'm linking this bug to Bug 1093688 as the fix for that will likely fix this bug as well.
Depends on: 1093688
I was able to repro the bug after tapping Share on the app permission screen for sharing the device location with the browser.  After that, the device will crash every time the Rocketbar is tapped.

However, this bug repros on the earliest build that has the privacy panel.

BuildID: 20141125133231
Gaia: 0f7bb156969c5c838ff90ebc88d7691fc4d94310
Gecko: 3cfe7f719230
Platform Version: 36.0a1
Firmware Version: V188-1
User Agent: Mozilla/5.0 (Mobile; rv:36.0) Gecko/36.0 Firefox/36.0
QA Whiteboard: [QAnalyst-Triage?]
Flags: needinfo?(jmitchell)
QA Whiteboard: [QAnalyst-Triage?] → [QAnalyst-Triage+]
Flags: needinfo?(jmitchell)
Keywords: qawanted
QA Contact: ckreinbring
Flags: needinfo?(fabrice)
(In reply to Dave Huseby [:huseby] from comment #11)
> This is a known bug I'm fixing.  The fix is a combination of Bug 1107673 and
> Bug 1107681 and Bug 1115375 and Bug 1116189.  I'm in the middle of landing
> the blocking patches.  I am focused 100% on this to get it done ASAP.

Thanks, Dave. 
So, it sounds like you could be the assignee for this bug. Thank you!

Comment 15

5 years ago
Dupe? https://bugzilla.mozilla.org/show_bug.cgi?id=1111486

The original reporter mentions that it doesn't happen with a clean profile.
Dear Dave,
 we are branching 2.2 at 1/12. Since you are working on this bug, do you see any issue here?
Thanks!
Flags: needinfo?(huseby)

Updated

5 years ago
See Also: → 1114667

Updated

5 years ago
Flags: needinfo?(jocheng)
Flags: needinfo?(huseby)
Summary: [DT][Privacy] Enable privacy control will cause device to keep rebooting when using geolocation → [Privacy] Enable privacy control will cause device to keep rebooting when using geolocation
Whiteboard: DT

Comment 17

5 years ago
How do you disable privacy controls? I set Privacy Panel -> Location Accuracy -> Use geolocation to off (effectively turning off geolocation altogether) and the phone still reboots if I choose to share location with any app that requests it or had the permission beforehand. This is with geolocation off, so it wouldn't even work.

Updated

5 years ago
Flags: needinfo?(gchang)

Updated

5 years ago
Severity: normal → blocker
See Also: → 1093688
Reporter

Comment 18

5 years ago
Hi Jorge, 
In fact, turnning off "Use location adjustment" should be able to turn of privacy control. But, in this case, like you said, it doesn't work.
Flags: needinfo?(gchang) → needinfo?(jag.alves)

Comment 19

5 years ago
It either that or the crash happens in general geolocation code.
Flags: needinfo?(jag.alves)
marta - can we figure this out and fix it for 2.2.
Flags: needinfo?(wmathanaraj) → needinfo?(marta)

Comment 21

5 years ago
Forwarding it to Dave, I believe its part of gecko issue. Also in his comment https://bugzilla.mozilla.org/show_bug.cgi?id=1111992#c12 Dave said he is working on it.
Flags: needinfo?(marta) → needinfo?(huseby)

Comment 22

5 years ago
Same for me, with latest build FxOS 3.0 (2015-01-27) on Nexus 4. 

1. Go to Settings > Privacy Panel > Location Accuracy
2. Enable "Use geolocation" and "Use local adjustment" and choose "Precise"
3. Go to "Exceptions" > choose Twitter App > set Location Blur of 5km
4. Open Twitter App and tap on "create new tweet" ... Twitter will start searching for your Location and the Device will crash (reboot)

If you set the Privacy Panel to default (disabling Location Accuracy) it will still crash the Twitter App. 
Even uninstalling the Twitter App and re-installing it won't fix this Problem.

Only fix was to recover a Device Backup (Profile).
Reporter

Updated

4 years ago
QA Whiteboard: [QAnalyst-Triage+] → [QAnalyst-Triage+][COM=Privacy Panel]
Reporter

Comment 23

4 years ago
I just found that I can't recreate the issue in v2.2. Not sure if this is caused by bug 1118891.
If this is expected, we can mark this bug as worksforme.

Gaia-Rev        e827781324cbde91d2434b388f5dead3303a85ee
Gecko-Rev       https://hg.mozilla.org/releases/mozilla-b2g37_v2_2/rev/0552759956d3
Build-ID        20150208162504
Version         37.0a2
Device-Name     flame
FW-Release      4.4.2
Flags: needinfo?(kgrandon)
Right, bug 1118891 removes geolocation from search, so it would no longer crash even if we have some geolocation bug. It sounds like we should test with a new STR, or the STR from Comment 22 to see if it's still an issue. (It likely is still an issue with an app that uses geolocation).
Flags: needinfo?(kgrandon)
I've testing patches for Bug 1115375 and Bug 1116189.  The privacy panel exceptions list appears to be buggy.  It doesn't reliably display the complete list of apps.  Also the X close button isn't on all of the slides in the intro tutorial.
Flags: needinfo?(huseby)

Comment 26

4 years ago
It's still an issue using the Twitter app. See my comment 22.
I'll test this again with all of my patches applied to see if it is still a problem.  I'll update soon.
Hi Gerry,
Could you help to test this again and see whether this bug is still valid?
Thanks!
Flags: needinfo?(gchang)
Reporter

Comment 29

4 years ago
Hi Andre and Josh,
I can't recreate the problem in comment #22.
I use below build.
Gaia-Rev        062d395273e70b8688a91b5a2b34c0cc7afc679f
Gecko-Rev       https://hg.mozilla.org/releases/mozilla-b2g37_v2_2/rev/5a7cb3b9f78e
Build-ID        20150302162504
Version         37.0
Device-Name     flame
FW-Release      4.4.2
Flags: needinfo?(gchang)
Hi Andre,
Could you check comment 29 from Gerry as it seems the problem does not happen on Twitter?
Thanks!
Flags: needinfo?(andre.fiedler)

Comment 31

4 years ago
Hi, no Twitter (and Facebook) don't crash anymore.

But I've two new issues:

1) The Privacy Panel App crashed after first start. After first start not reproducible anymore.

2) If I set explicit Location blur to an app, this app and some others disappear from the list of changeable apps. So I cant remove the setting anymore. I had many app on the list, changed Twitter -> Twitter + some others did disappear. Than tried to change Facebook -> same behavior. Only Bing Maps app is left on the list. :(

ScreenShots of build versions:
http://snag.gy/sz8Kw.jpg
http://snag.gy/ru0ex.jpg

ScreenShot of changable apps list with only Bing left:
http://snag.gy/B2xZ5.jpg

ScreenShot of installed apps:
http://snag.gy/D6pXX.jpg

So what's going wrong here?
Flags: needinfo?(andre.fiedler)

Comment 32

4 years ago
Btw, I've installed this build on my Nexus 4:
https://yalam.co.uk/b2g/mako/fxos-mako-15-02-27.zip
Reporter

Comment 33

4 years ago
Hi Andre,
1. I have the same issue as your first one.
2. For the second issue, do you mean exception list? If yes, I've already addressed the issue in comment #32 of bug 1093688.

Comment 34

4 years ago
Hey Gerry,

regarding 2.) that's true. I Meant the exception list and do see the same issue as you did.
Hi Guys,
so can we open a bug for first issue?
Thanks!
blocking-b2g: 2.2+ → ---

Updated

4 years ago
Flags: needinfo?(andre.fiedler)

Comment 36

4 years ago
I've created bug 1139813
Flags: needinfo?(andre.fiedler)
Thanks Andre,
I am closing this bug as we are now tracking bug 1093688 and bug 1139813
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.