Closed Bug 919645 Opened 6 years ago Closed 6 years ago

crash in android.os.NetworkOnMainThreadException: at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java)

Categories

(Firefox for Android :: General, defect, critical)

All
Android
defect
Not set
critical

Tracking

()

RESOLVED FIXED
Firefox 27
Tracking Status
firefox25 --- unaffected
firefox26 + fixed
firefox27 + fixed
fennec 26+ ---

People

(Reporter: kbrosnan, Assigned: rnewman)

References

Details

(Keywords: crash, regression, Whiteboard: [native-crash])

Crash Data

Attachments

(1 file)

This bug was filed from the Socorro interface and is 
report bp-5a16ecda-791e-4945-9135-cfb6b2130922.
=============================================================

https://crash-stats.mozilla.com/report/list?product=FennecAndroid&signature=android.os.NetworkOnMainThreadException%3A+at+android.os.StrictMode%24AndroidBlockGuardPolicy.onNetwork%28StrictMode.java%29

This is simple to reproduce if you 
* enable 'Don't keep activities'
* browse to a site
* send Firefox to the background (home button or app switcher)
* repeat 2nd and 3rd bullets till you crash
tracking-fennec: ? → 26+
Assignee: nobody → rnewman
There are reports for this going back to Fx16, according to crash-stats. (e.g., <https://crash-stats.mozilla.com/report/index/fd2ae56c-0772-466b-8b3c-5304d2130926>).

This code *should* be replaced by ckitching's work in Bug 914296, so there's a decent chance of this just going away after that lands, but that's not a patch I'd uplift.

Is this enough of a crasher that you want a fix for Aurora or Beta?
Depends on: FaviconRevamp
Flags: needinfo?(blassey.bugs)
(In reply to Richard Newman [:rnewman] from comment #1)
> There are reports for this going back to Fx16, according to crash-stats.
> (e.g.,
> <https://crash-stats.mozilla.com/report/index/fd2ae56c-0772-466b-8b3c-
> 5304d2130926>).
> 
> This code *should* be replaced by ckitching's work in Bug 914296, so there's
> a decent chance of this just going away after that lands, but that's not a
> patch I'd uplift.
> 
> Is this enough of a crasher that you want a fix for Aurora or Beta?
There was a crash in 15 with the same signature, resolved in Fx17 (bug 774072). It seems we regressed in 26, so a patch should be uplifted to 26 to fix that regression.
Flags: needinfo?(blassey.bugs)
I'll test this on Monday, but this looks like the right fix.
Attachment #811590 - Flags: review?(bnicholson)
(In reply to Richard Newman [:rnewman] from comment #3)
> Created attachment 811590 [details] [diff] [review]
> Proposed patch for Aurora. v1
> 
> I'll test this on Monday, but this looks like the right fix.

Ah. My regression - didn't realise this subtlety. Sorry.

Also - nitpicking: Your indentation is inconsistent.
(In reply to Chris Kitching [:ckitching] from comment #4)

> Also - nitpicking: Your indentation is inconsistent.

Yeah, my local Vim config is 2-space, and only some of our files have editor directives. Will fix locally. Thanks!
Status: NEW → ASSIGNED
I can't repro this with current Aurora.

Could someone who *can* (Kevin?) try my APK?

http://people.mozilla.com/~rnewman/fennec-26.0a2.en-US.android-arm.apk
Status: ASSIGNED → NEW
Flags: needinfo?(kbrosnan)
Attachment #811590 - Flags: review?(bnicholson) → review+
Kevin's out for the next two weeks Richard. I'm not able to reproduce this at all on Nightly nor Aurora.
Thanks for checking, Aaron.

I propose landing this fix and watching crash stats. Anyone have any strong feelings otherwise?
Flags: needinfo?(kbrosnan)
Comment on attachment 811590 [details] [diff] [review]
Proposed patch for Aurora. v1

[Approval Request Comment]
Bug caused by (feature/regressing bug #): 
  Not clear; recent favicon work is the likely culprit, but signature goes back a while.

User impact if declined: 
  Crashes when Android cleans up activities.

Testing completed (on m-c, etc.): 
  Only planned to land on Aurora. No obvious regressions during testing of builds with this fix, but the original issue is hard to repro, so not clear if this is enough. (It should be, but you know how bugs can be!)

Risk to taking this patch (and alternatives if risky): 
  Should be zero.

String or IDL/UUID changes made by this patch:
  None.
Attachment #811590 - Flags: approval-mozilla-aurora?
Thanks!
(In reply to Richard Newman [:rnewman] from comment #9)

> Testing completed (on m-c, etc.): 
>   Only planned to land on Aurora. No obvious regressions during testing of
> builds with this fix, but the original issue is hard to repro, so not clear
> if this is enough. (It should be, but you know how bugs can be!)


If this can't be reproduced and we're just going to watch crash stats, why not land to Nightly?  We have similar number of users on both Nightly and Aurora - at the very least land to central first and see if anything changes in the next few days and then we could look at Aurora uplift too which would get some user overlap but I'm not keen to break our SOP for landing/uplifts on this without good reason.
Flags: needinfo?(rnewman)
(In reply to lsblakk@mozilla.com [:lsblakk] from comment #11)

> If this can't be reproduced and we're just going to watch crash stats, why
> not land to Nightly?  We have similar number of users on both Nightly and
> Aurora - at the very least land to central first and see if anything changes
> in the next few days and then we could look at Aurora uplift too which would
> get some user overlap but I'm not keen to break our SOP for landing/uplifts
> on this without good reason.

I had wanted to avoid further bitrotting of Bug 914296 before it lands (it's a difficult birth), but we can land this on m-c first if you prefer.
Flags: needinfo?(rnewman)
Landed in fx-team.

https://hg.mozilla.org/integration/fx-team/rev/54d196d5fdfb
Status: NEW → ASSIGNED
Whiteboard: [native-crash] → [native-crash][fixed in fx-team]
Target Milestone: --- → Firefox 27
https://hg.mozilla.org/mozilla-central/rev/54d196d5fdfb
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Whiteboard: [native-crash][fixed in fx-team] → [native-crash]
Flagging myself to watch crash-stats for 27.
Flags: needinfo?(rnewman)
If I'm reading the crash stats correctly, this is still occurring on Nightly.
Comment on attachment 811590 [details] [diff] [review]
Proposed patch for Aurora. v1

Thank you for the link to crash stats, I was getting it wrong somehow.
Attachment #811590 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.