Closed Bug 1188935 Opened 9 years ago Closed 9 years ago

Autophone - Intermittent Java.lang.NullPointerException at android.net.nsd.NsdManager$ServiceHandler.handleMessage(NsdManager.java:350)

Categories

(Firefox for Android Graveyard :: General, defect)

defect
Not set
normal

Tracking

(firefox42 fixed, fennec42+)

RESOLVED FIXED
Firefox 42
Tracking Status
firefox42 --- fixed
fennec 42+ ---

People

(Reporter: bc, Assigned: xeonchen)

References

(Blocks 1 open bug)

Details

(Keywords: regression)

Attachments

(4 files)

Attached file Nexus 4 Stack
An example is:

Nexus 4 Android 4.2 s1s2-blank-remote

https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound&revision=237e7aac9def&exclusion_profile=false&filter-searchStr=autophone

https://autophone.s3.amazonaws.com/pub/mozilla.org/mobile/tinderbox-builds/mozilla-inbound-android-api-11/1438129122/autophone-s1s2-s1s2-blank-remote.ini-1-nexus-4-jdq39-2-f6f4c4a4-7f12-48cf-9bd8-11641fe3a7c6-logcat.log

I attempted a manual search using Treeherder to find the initial regression range. It does appear this may be limited to Nexus 4 Android 4.2 but I am not certain. I am downloading the logs now and will attempt to identify when this first appeared.
Bug 1158029 recently landed changes related to NsdManager.
See Also: → 1190000
Gary, can we back this out due to the failures in Autophone?
tracking-fennec: --- → ?
Flags: needinfo?(xeonchen)
Yes, Bob. Thank you.
Flags: needinfo?(xeonchen)
This appears to have gotten better Friday afternoon/evening. See bug 1190000 comment 4. Lets wait a little bit to see how it plays out.
I found a similar issue was reported as an Android bug[1].
Although it is marked as released, but still reported reproducible on Android 4.4.

Another discussion[2] also mentioned about this issue.

I don't have a strong evidence yet to support they are the same.
I'm trying to see if I can have a workaround on this,
or maybe make this feature disabled if we cannot fix it.

[1] https://code.google.com/p/android/issues/detail?id=35585
[2] http://stackoverflow.com/questions/16666604/internal-error-using-network-service-discovery-in-android
Thanks for the links. Based on those I rebooted my phone and now Nightly starts up again.
Gary, if we can't find a fix, please lets go ahead and either disable this or back out both patches which landed regarding nsd.
Blocks: 1180596
In Comment 11, I suppose the NullPointerException is a bug of Android, this might affects almost all Android 4.x devices.

It's not a issue of garbage collection, and the call stack is in the Android code base,
so we can't just have a workaround of it.

Richard,
do you think we should enable this feature only to 5.x and after (API level >= 21)?

Bob,
We don't have autophone test on Android 5.x platform, do we?
Flags: needinfo?(rnewman)
Flags: needinfo?(bob)
Not on 5 yet. But that is coming soon.
Flags: needinfo?(bob)
(In reply to Gary Chen [:xeonchen] from comment #12)

> so we can't just have a workaround of it.

There seem to be *some* workarounds, but not good or complete ones. It's up to you whether it's worth investigating those.

> Richard,
> do you think we should enable this feature only to 5.x and after (API level
> >= 21)?

5.x currently has a little less than 20% of the market. But given that this causes crashes on the rest, there's not too much we can do. Yup, turn it off for earlier versions. You'll need to use the Versions.* conditional, and make sure consumers fail fast. 

:/
Flags: needinfo?(rnewman)
(In reply to Richard Newman [:rnewman] from comment #14)
> There seem to be *some* workarounds, but not good or complete ones. It's up
> to you whether it's worth investigating those.

Although it may not change the result of this issue, I'd like to know about that very much.
Would you give some possible workarounds if it won't take too much time?
Assignee: nobody → xeonchen
Attachment #8644256 - Flags: review?(mcmanus) → review+
tracking-fennec: ? → 42+
(In reply to Gary Chen [:xeonchen] from comment #15)
> Although it may not change the result of this issue, I'd like to know about
> that very much.
> Would you give some possible workarounds if it won't take too much time?

https://code.google.com/p/android/issues/detail?id=35585 has some suggestions to explore:

* Use UDP if the protocol allows it. (Untested.)
* Don't stop discovery soon after a service has been discovered.
* Add a delay between fetching NsdManager and using it.
Status: NEW → ASSIGNED
Attachment #8644254 - Flags: review?(rnewman) → review+
Attachment #8644258 - Flags: review?(schien) → review+
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #9)
> Thanks for the links. Based on those I rebooted my phone and now Nightly
> starts up again.

FWIW today my Fennec got into a startup crash loop again. I'm not really sure when it happened (I unlocked my device at some point and was greeted with the crash reporter dialog) but I suspect it happened while I was outside and disconnected from wi-fi. Rebooting the device fixed it again.
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: