VOOZH about

URL: https://bugzilla.mozilla.org/show_bug.cgi?id=1305815

⇱ 1305815 - Mechanism to exclude non-NEON versions


Closed Bug 1305815 Opened 9 years ago Closed 9 years ago

Mechanism to exclude non-NEON versions

Mechanism to exclude non-NEON versions
Firefox for Android Graveyard
General
unspecified
Unspecified
Unspecified
defect
Not set
normal
RESOLVED FIXED
RESOLVED
FIXED
Firefox 54
a11y-review
Accessibility Severity
Performance Impact
Webcompat Priority
Webcompat Score
Tracking Status
fennec 53+ ---
firefox51 --- unaffected
firefox52 + fixed
firefox53 + fixed
firefox54 --- fixed
Tracking Status
fennec
firefox51
firefox52
firefox53
firefox54
---
QA Whiteboard:
---
Has STR:
---
Change Request:
---
Bug Flags:
Signature:
None
This bug is publicly visible.

 
We are dropping support for non-NEON ARM, and we need something in place to either warn people at run time, or stop them from downloading the version that won't run, or some combination of both.
Sebastian and James had a conversation on the subject that should provide enough details.
Blocks: 1289569
* We can't use Google Play store filtering to not offer the app to devices with non-NEON CPUs: https://code.google.com/p/android/issues/detail?id=200318 * We have already some code that runs on startup to determine if the device is compatible and if not stops the app (and displays a toast): https://dxr.mozilla.org/mozilla-central/source/mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/HardwareUtils.java#84 * It seems like we can only detect if the current system supports NEON in native/NDK code. We might need to make this available to Java land via JNI: https://developer.android.com/ndk/guides/cpu-arm-neon.html
And: We have a way to display an EOL message to users ahead of time. Maybe we could uplift something activating this for users with non-NEON CPUs: https://dxr.mozilla.org/mozilla-central/source/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java#870
Any word on this? Firefox 53 is in Aurora, and that's the version that will stop working correctly on non-NEON platforms.
Flags: needinfo?(snorp)
Flags: needinfo?(s.kaspari)
I think this kinda fell through the cracks. We'll do it for 53.
Assignee: nobody β†’ droeh
tracking-fennec: --- β†’ 53+
Flags: needinfo?(snorp)
Flags: needinfo?(s.kaspari)
(In reply to Sebastian Kaspari (:sebastian) from comment #3) > And: We have a way to display an EOL message to users ahead of time. Maybe > we could uplift something activating this for users with non-NEON CPUs: > https://dxr.mozilla.org/mozilla-central/source/mobile/android/base/java/org/ > mozilla/gecko/BrowserApp.java#870 Yeah, let's make sure we communicate this to the user and let SUMO know about it as well. Sebastian can you let us know if/when you can uplift this message?
Flags: needinfo?(s.kaspari)
(In reply to Barbara Bermes [:barbara] - NI please! from comment #6) > Sebastian can you let us know if/when you can uplift this message? The code for showing those messages is already in all versions - we landed it for the Honeycomb EOL messaging. We only need to detect the specific devices and display it. We will need two patches here: 1) For 52: Detect NEON devices and show EOL message (comment 3) 2) For 53+: Detect NEON devices and show not supported message (comment 2)
Flags: needinfo?(s.kaspari)
i'm curious what if users on those affected devices accidentally updated to 53 (though they did see the EOL message on 52)? they can't roll back to 52 via Google Play store can they? Probably need the last working 52 build on SUMO page.
That's correct. Additionally we could try to identify some of those devices and exclude them from Google Play?
Attached patch NEON non-compatibility EOL warning (obsolete) β€” Details β€” Splinter Review
This adds cpu-features to mozglue/android and uses it to implement a NEON compatibility test; devices that aren't NEON compatible will display an EOL warning.
Attachment #8838172 - Flags: review?(nchen)
Attachment #8838172 - Flags: review?(mh+mozilla)
Attached patch NEON non-compatibility kill-switch (obsolete) β€” Details β€” Splinter Review
This will follow one version behind the above patch, removing the EOL warning and now returning false from HardwareUtils.isARMSystem() if NEON support is not present.
Attachment #8838173 - Flags: review?(nchen)
Comment on attachment 8838172 [details] [diff] [review] NEON non-compatibility EOL warning Review of attachment 8838172 [details] [diff] [review]: ----------------------------------------------------------------- No need to import cpu-features, we already have code for runtime detection of neon. #include "mozilla/arm.h" then in a function: if (mozilla::supports_neon()) { ... }
Attachment #8838172 - Flags: review?(mh+mozilla) β†’ review-
Note that one downside of mozilla:supports_neon is that it always returns true if we start building the browser with -mfpu=neon. But in that case, the mozglue code itself might be using neon code so it wouldn't be safe anyways. A more reliable, future proof way to do this would be to make the java code invoke Android's android_getCpuFeatures directly, without even going through mozglue (and before loading mozglue).
Comment on attachment 8838173 [details] [diff] [review] NEON non-compatibility kill-switch Review of attachment 8838173 [details] [diff] [review]: ----------------------------------------------------------------- ::: mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/HardwareUtils.java @@ +81,5 @@ > return SysInfo.getMemSize(); > } > > public static boolean isARMSystem() { > + return Build.CPU_ABI != null && Build.CPU_ABI.equals("armeabi-v7a") && GeckoLoader.neonCompatible(); This won't actually work if you look at `isSupportedSystem()`
Attachment #8838173 - Flags: review?(nchen)
Attached patch NEON non-compatibility EOL warning v1.1 (obsolete) β€” Details β€” Splinter Review
Updated to use mozilla/arm.h
Attachment #8838172 - Attachment is obsolete: true
Attachment #8841557 - Flags: review?(nchen)
Attachment #8841557 - Flags: review?(mh+mozilla)
Attached patch NEON non-compatibility kill-switch v1.1 (obsolete) β€” Details β€” Splinter Review
Updated to actually return false from isSupportedSystem().
Attachment #8838173 - Attachment is obsolete: true
Attachment #8841558 - Flags: review?(nchen)
Comment on attachment 8841558 [details] [diff] [review] NEON non-compatibility kill-switch v1.1 Review of attachment 8841558 [details] [diff] [review]: ----------------------------------------------------------------- ::: mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/HardwareUtils.java @@ +123,5 @@ > // See http://developer.android.com/ndk/guides/abis.html > final boolean isSystemX86 = isX86System(); > final boolean isSystemARM = !isSystemX86 && isARMSystem(); > > + if (!(isSystemX86 || isSystemARM)) { isSupportedSystem() used to return true as fallback if the ABI is unknown (neither ARM nor X86), but this changes the behavior to return false as fallback. Just return false here if | isSystemARM && !GeckoLoader.neonCompatible() |, no need to change isARMSystem().
Attachment #8841558 - Flags: review?(nchen) β†’ feedback+
Comment on attachment 8841557 [details] [diff] [review] NEON non-compatibility EOL warning v1.1 Review of attachment 8841557 [details] [diff] [review]: ----------------------------------------------------------------- ::: mobile/android/base/java/org/mozilla/gecko/BrowserApp.java @@ +596,5 @@ > super.onCreate(savedInstanceState); > return; > } > > + if (!GeckoLoader.neonCompatible()) { Have you tested this? I don't think mozglue is guaranteed to be loaded at this point in startup. You also don't want to load mozglue here because it'll impact startup time. So you probably have to move the check to somewhere later in startup.
Attachment #8841557 - Flags: review?(nchen) β†’ feedback+
Comment on attachment 8842129 [details] [diff] [review] NEON non-compatibility kill-switch v1.1 Updated based on your feedback.
Attachment #8842129 - Flags: review?(nchen)
Attachment #8841558 - Attachment is obsolete: true
(In reply to Jim Chen [:jchen] [:darchons] from comment #18) > Have you tested this? I don't think mozglue is guaranteed to be loaded at > this point in startup. You also don't want to load mozglue here because > it'll impact startup time. So you probably have to move the check to > somewhere later in startup. Good catch, I tested that before putting the patch up but must have gotten lucky on the timing; further testing crashed intermittently on startup. Can you recommend a stage of startup where I can be sure mozglue will be loaded?
Flags: needinfo?(nchen)
Comment on attachment 8841557 [details] [diff] [review] NEON non-compatibility EOL warning v1.1 Review of attachment 8841557 [details] [diff] [review]: ----------------------------------------------------------------- r+ for the APKOpen.cpp part, with the caveat that comment 13 applies, and makes this non-future proof. That is, if someone comes later and makes all the native code built for neon because we don't support neon anymore, this code will fail to work at best, or firefox will crash with SIGILL before even reaching it at worst.
Attachment #8841557 - Flags: review?(mh+mozilla) β†’ review+
Comment on attachment 8842129 [details] [diff] [review] NEON non-compatibility kill-switch v1.1 Review of attachment 8842129 [details] [diff] [review]: ----------------------------------------------------------------- This will have the same mozglue loading problem as the other patch, so I would revisit this patch after that one is done.
Attachment #8842129 - Flags: review?(nchen)
(In reply to Dylan Roeh (:droeh) from comment #21) > (In reply to Jim Chen [:jchen] [:darchons] from comment #18) > > Have you tested this? I don't think mozglue is guaranteed to be loaded at > > this point in startup. You also don't want to load mozglue here because > > it'll impact startup time. So you probably have to move the check to > > somewhere later in startup. > > Good catch, I tested that before putting the patch up but must have gotten > lucky on the timing; further testing crashed intermittently on startup. Can > you recommend a stage of startup where I can be sure mozglue will be loaded? I think it's best to do it somewhere after loading mozglue on the Gecko thread [1]. [1] http://searchfox.org/mozilla-central/rev/9c1c7106eef137e3413fd867fc1ddfb1d3f6728c/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoThread.java#416
Flags: needinfo?(nchen)
For the EOL warning it suffices to just do the check after Gecko:Ready.
Attachment #8841557 - Attachment is obsolete: true
Attachment #8842552 - Flags: review?(nchen)
Attachment #8842552 - Flags: review?(nchen) β†’ review+

Comment 26

β€’
9 years ago
Pushed by droeh@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/a3f7b4d54578 Issue EOL warning if non-NEON-compatible device detected. r=glandium

Comment 27

β€’
9 years ago
bugherder
Status: NEW β†’ RESOLVED
Closed: 9 years ago
Resolution: --- β†’ FIXED
Target Milestone: --- β†’ Firefox 54
Keywords: leave-open
Status: RESOLVED β†’ REOPENED
Resolution: FIXED β†’ ---
Comment on attachment 8842552 [details] [diff] [review] NEON non-compatibility EOL warning v1.2 Approval Request Comment [Feature/Bug causing the regression]: [User impact if declined]: Without this patch, 53 will end support for non-NEON devices without any warning. [Is this code covered by automated tests?]: No [Has the fix been verified in Nightly?]: Yes [Needs manual test from QE? If yes, steps to reproduce]: [List of other uplifts needed for the feature/fix]: N/A [Is the change risky?]: No [Why is the change risky/not risky?]: Simply adds a NEON support check using existing functionality and calls existing EOL notification function if it is not supported. [String changes made/needed]:
Attachment #8842552 - Flags: approval-mozilla-beta?
This bug seems extremely confusing. It's ostensibly about excluding non-neon devices in 53, then somewhere along the way switched to adding a "future EOL" warning to a version that still supports non-neon (52), but the status flags and title haven't been updated :( Liz, FYI 53 won't run on non-neon arm devices so it might be good to block the most popular ones from updating if we can do that. Dylan, as far as I can tell the warning will point people at https://support.mozilla.org/t5/Install-and-Update/Firefox-no-longer-supported-on-this-version-of-Android/ta-p/29312? Should https://support.mozilla.org/t5/Basic-Browsing/Will-Firefox-work-on-my-mobile-device/ta-p/4534 get updated?
Flags: needinfo?(lhenry)
Flags: needinfo?(droeh)
Comment on attachment 8842552 [details] [diff] [review] NEON non-compatibility EOL warning v1.2 AIUI this now wants to go to a 52 dot release to warn people of impending EOL of firefox on those devices in 53.
Attachment #8842552 - Flags: approval-mozilla-release?
OK, as I understand it we want to block devices that use the Nvidia Tegra 2 processor (I'm getting my list of them from here: https://en.wikipedia.org/wiki/Tegra#Tegra_2) I can do that in the Google Play interface now (before we release beta 53). I'll come back with a specific list of the devices blocked from updating to 53.
Flags: needinfo?(lhenry)
There's still follow-up work to land on trunk, but given that today is merge day, tracking that work across releases gets increasingly tricky. Per IRC discussion with Dylan, I'm closing this one to ease that difficulty. Dylan will open a new bug for that when his next patch is ready to go.
Status: REOPENED β†’ RESOLVED
Closed: 9 years ago β†’ 9 years ago
Keywords: leave-open
Resolution: --- β†’ FIXED
Here's the list of devices I'm excluding tomorrow for beta 53 on the Play Store: Motorola Atrix 4G: qinara, olympus DROIDX2 Motorola Photon– asanti_c, sunfire LGEOptimus 2X– p990, p999 Samsung Galaxy R, (jaguarl, jaguars, jaguark) Samsung Captivate Glide, MotorolaXOOM– wifi_hubble, umts_everest Sony Tablet S Dell Streak 7 Asus Slider Olivetti OliPad 100 ASUS Eee Pad Transformer Samsung Galaxy Tab 10.1 Hannspree Hannspad We'll need to exclude them again for 53 release, tracked in bug 1344906.
(In reply to Julien Cristau [:jcristau] from comment #29) > Dylan, as far as I can tell the warning will point people at > https://support.mozilla.org/t5/Install-and-Update/Firefox-no-longer- > supported-on-this-version-of-Android/ta-p/29312? Should > https://support.mozilla.org/t5/Basic-Browsing/Will-Firefox-work-on-my-mobile- > device/ta-p/4534 get updated? Yes, that's where BrowserApp.conditionallyNotifyEOL(); and yeah, we should probably update the text of the second link for the release of 53 to indicate that non-NEON ARM devices are no longer supported.
Flags: needinfo?(droeh)
Blocks: 1345267
Comment on attachment 8842552 [details] [diff] [review] NEON non-compatibility EOL warning v1.2 let's land this on beta and release to eventually include this warning in a 52 dot release.
Attachment #8842552 - Flags: approval-mozilla-release?
Attachment #8842552 - Flags: approval-mozilla-release+
Attachment #8842552 - Flags: approval-mozilla-beta?
Attachment #8842552 - Flags: approval-mozilla-beta+
on beta this hit conflicts like warning: conflicts while merging mobile/android/geckoview/src/main/java/org/mozilla/gecko/mozglue/GeckoLoader.java! (edit, then use 'hg resolve --mark') abort: unresolved conflicts, can't continue (use 'hg resolve' and 'hg graft --continue') could you take a look (i guess this needs a rebase patch for beta)? Thanks
Flags: needinfo?(droeh)
Flags: needinfo?(droeh)
Well, turns out it's really lucky we didn't land this in time to get uplifted to the release of 52: the follow up patch caused test failures that made me realize both it and this will wrongly detect x86 devices as non-NEON ARM devices. Julien, can you back this out of release ASAP? I will put up an updated patch that addresses the problem soon.
Status: RESOLVED β†’ REOPENED
Flags: needinfo?(jcristau)
Resolution: FIXED β†’ ---
This fixes the x86 false positives from the previous patch.
Attachment #8842129 - Attachment is obsolete: true
Flags: needinfo?(droeh)
Attachment #8846809 - Flags: review?(snorp)
This is the two existing patches folded and rebased on mozilla-release, to be uplifted to release once the x86 fix is r+'ed.

Comment 43

β€’
9 years ago
Pushed by droeh@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/fd8e7d9053dc Fix false positives for x86 devices. r=snorp
Status: REOPENED β†’ RESOLVED
Closed: 9 years ago β†’ 9 years ago
status-firefox55: --- β†’ fixed
Resolution: --- β†’ FIXED
Comment on attachment 8846809 [details] [diff] [review] Fix for x86 false positives Approval Request Comment [Feature/Bug causing the regression]: Falsely detected x86 processors as non-NEON ARM processors in earlier patch for this bug. [User impact if declined]: Will incorrectly give EOL warning for x86 devices. [Is this code covered by automated tests?]: No [Has the fix been verified in Nightly?]: Yes [Needs manual test from QE? If yes, steps to reproduce]: No [List of other uplifts needed for the feature/fix]: [Is the change risky?]: Not very [Why is the change risky/not risky?]: The patch ensures that it's not possible for an x86 device to register as not supporting NEON. [String changes made/needed]: None
Attachment #8846809 - Flags: approval-mozilla-beta?
Attachment #8846809 - Flags: approval-mozilla-aurora?
Comment on attachment 8847240 [details] [diff] [review] Both patches folded for release (This patch folds the other two patches together and rebases on m-r, carrying over r+'s.) Approval Request Comment [Feature/Bug causing the regression]: Support for non-NEON devices will be dropped in 53; this is necessary to provide an EOL warning for such devices in 52. [User impact if declined]: Fennec will stop running on non-NEON devices in 53 without warning. [Is this code covered by automated tests?]: No [Has the fix been verified in Nightly?]: Yes [Needs manual test from QE? If yes, steps to reproduce]: No [List of other uplifts needed for the feature/fix]: [Is the change risky?]: Not very [Why is the change risky/not risky?]: Problems with false positives for x86 devices has been addressed; the patch did not show any other problems in testing. [String changes made/needed]: None
Attachment #8847240 - Flags: review+
Attachment #8847240 - Flags: approval-mozilla-release?
Comment on attachment 8846809 [details] [diff] [review] Fix for x86 false positives Fix incorrectly give EOL warning for x86 devices. Beta53+ & Aurora54+.
Attachment #8846809 - Flags: approval-mozilla-beta?
Attachment #8846809 - Flags: approval-mozilla-beta+
Attachment #8846809 - Flags: approval-mozilla-aurora?
Attachment #8846809 - Flags: approval-mozilla-aurora+
Comment on attachment 8847240 [details] [diff] [review] Both patches folded for release warn users on non-neon arm cpus they're about to go EOL. 52+
Attachment #8847240 - Flags: approval-mozilla-release? β†’ approval-mozilla-release+
(In reply to Dylan Roeh (:droeh) from comment #34) > (In reply to Julien Cristau [:jcristau] from comment #29) > > Dylan, as far as I can tell the warning will point people at > > https://support.mozilla.org/t5/Install-and-Update/Firefox-no-longer- > > supported-on-this-version-of-Android/ta-p/29312? Should > > https://support.mozilla.org/t5/Basic-Browsing/Will-Firefox-work-on-my-mobile- > > device/ta-p/4534 get updated? > > Yes, that's where BrowserApp.conditionallyNotifyEOL(); and yeah, we should > probably update the text of the second link for the release of 53 to > indicate that non-NEON ARM devices are no longer supported. Joni, can we get the "Will-Firefox-work-on-my-mobile-device" page updated to note that non-neon arm cpus aren't supported starting with Firefox for android 53? Also, the actual in-product URL for this notification is https://support.mozilla.org/1/mobile/%VERSION%/%OS%/%LOCALE%/unsupported-version Testing with https://support.mozilla.org/1/mobile/52.0/android/fr/unsupported-version I am redirected to https://support.mozilla.org/t5/Administration/Firefox-will-no-longer-be-supported-on-this-version-of-Android/ta-p/30829 instead of https://support.mozilla.org/t5/Install-and-Update/Firefox-no-longer-supported-on-this-version-of-Android/ta-p/29312 which has the actual content (in English, though), so I'm wondering if we can fix the redirect as well?
Flags: needinfo?(jsavage)
Ioana, hopefully you have access to one of the affected devices, it'd be good to verify this when it lands on release.
Flags: qe-verify+
Flags: needinfo?(ioana.chiorean)
(In reply to Carsten Book [:Tomcat] from comment #51) > https://hg.mozilla.org/releases/mozilla-release/rev/ > 2eb1241d3fe541106fb920e608d6b3b3f828019b This time with less bustage. https://hg.mozilla.org/releases/mozilla-release/rev/411e97fd8ffa8f29d96241b6bcaa090b95374c66
I am suspicious from bug 1349222 that the amended fix may not have landed on aurora or beta (since the flags weren't set back to "affected" the sheriffs may not have noticed the new patches. Dylan, or maybe tomcat, can you check?
Flags: needinfo?(droeh)
Flags: needinfo?(cbook)
Hi Liz, thanks - should be ok now!
Flags: needinfo?(droeh)
Flags: needinfo?(cbook)
Unfortunately on SOFTVISION side we do not have such device (it either doesn't work anymore or it is blocked on an older version of OS that we already blocked 2.x or 3.x) Kevin? Any chance here?
Flags: needinfo?(ioana.chiorean) β†’ needinfo?(kbrosnan)
I do not see any notices on v52 about EOL. In v53b the Galaxy Tab 2 is blocked on the Play Store.
Flags: needinfo?(kbrosnan)
(In reply to Kevin Brosnan [:kbrosnan] from comment #58) > I do not see any notices on v52 about EOL. In v53b the Galaxy Tab 2 is > blocked on the Play Store. If you're running your own build of beta, can you check whether or not BrowserApp.conditionallyNotifyEOL() is being called? That function uses SharedPreferences to only display the EOL notice once, and if it has been displayed on your profile it may not be displayed again.
v52 was from release. The beta version on the tablet is several releases old and won't update now that Firefox beta blocks the tablet.
It looks to me like this won't be in until 52.0.2, and my current (seemingly up-to-date) release build from the play store is 52.0.1; so I'm not sure there's cause for concern yet. If 52.0.2 does not give an EOL warning on your device, then we might have a problem -- the first step would probably be to test it with a clean profile.
FWIW: I found this bug after getting "Sorry. This Firefox Beta won't work on this device (armeabi-v7a, 19)" (or ,22) when trying to install 53.0b7, and investigating. I had 52.0.1 so reading comment 61 I installed 52.0.2. It did indeed put up an EOL notification, which linked to https://support.mozilla.org/t5/Administration/Firefox-will-no-longer-be-supported-on-this-version-of-Android/ta-p/30829 which didn't explain anything but includes a link to https://support.mozilla.org/t5/Install-and-Update/Firefox-no-longer-supported-on-this-version-of-Android/ta-p/29312 Both those pages say Firefox no longer supported on this version of Android which isn't true. It should say 'Your device is too old' or somthing similar. (I have 2 GT 10.1s running AOSP 4.4 and 5.1 and do not have playstore so my experience may be atypical.)
Thanks Dave, I think what you saw is what I described in comment 49. Hopefully that SUMO page can still be updated.
Fwiw, i was using aurora and nightly (updated from time to time) on a galaxy tab 10.1 (gt-p7510) running an old 4.2.2 (v17) and i got zero notice about support being dropped for it, only got the message afterwards - went looking on https://wiki.mozilla.org/Mobile/Platforms/Android which only mentions armv6/android 3 deprecation. Found this bug via the release notes for 52.0.2.. Oh well, will install ESR i guess..
And after installing 52.0.2, i got the eol notification, which redirected to a page on sumo, which apparently didnt exist and ended up showing sumo home.
(In reply to Landry Breuil (:gaston) from comment #64) > Fwiw, i was using aurora and nightly (updated from time to time) on a galaxy > tab 10.1 (gt-p7510) running an old 4.2.2 (v17) and i got zero notice about > support being dropped for it, only got the message afterwards - went looking > on https://wiki.mozilla.org/Mobile/Platforms/Android which only mentions > armv6/android 3 deprecation. Found this bug via the release notes for > 52.0.2.. > FWIW that device is blocked for 53.0 beta on the play store per comment 33, and will be blocked on 53.0 release. > Oh well, will install ESR i guess.. ESR is desktop only...
Hello, Is this still an issue? Is the qe-verify+ flag still valid? Thank you!
Flags: needinfo?(jcristau)
It would have been useful a year and a half ago, but probably not now, no.
Flags: qe-verify+
Flags: needinfo?(jcristau)
See Also: β†’ 1515602
Flags: needinfo?(jsavage)
Product: Firefox for Android β†’ Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.