geckoview_example fails on arm emulator
Categories
(GeckoView :: General, defect, P3)
Tracking
(firefox-esr60 wontfix, firefox-esr68 affected, firefox69 wontfix, firefox70 affected, firefox71 affected)
People
(Reporter: mjf, Unassigned)
References
Details
Attachments
(2 files)
Building from moz-central b3ecb5aef45a on Ubuntu 18.04.
Steps To Reproduce:
- ./mach bootstrap # select 4 for Android
- Use unmodified suggested .mozconfig
# Build GeckoView/Firefox for Android:
ac_add_options --enable-application=mobile/android
# Targeting the following architecture.
# For regular phones, no --target is needed.
# For x86 emulators (and x86 devices, which are uncommon):
# ac_add_options --target=i686
# For newer phones.
# ac_add_options --target=aarch64
# For x86_64 emulators (and x86_64 devices, which are even less common):
# ac_add_options --target=x86_64
- ./mach build
- ./mach run
Emulator displays message: “Unfortunately, GeckoView Example has stopped."
Reporter | ||
Comment 1•5 years ago
|
||
I just verified this also happens on macOS 10.14.6.
Comment 2•5 years ago
|
||
I have the same experience.
I also checked, with :mjf's mozconfig and the 4.3 arm emulator:
- ./mach build
- adb install ./gradle/build/mobile/android/geckoview_example/outputs/apk/withGeckoBinaries/debug/geckoview_example-withGeckoBinaries-debug.apk
- run geckoview_example manually by clicking on it in the emulator
...crashes just the same.
Logcat shows:
W/dalvikvm( 2086): VFY: unable to resolve virtual method 16369: Landroid/view/ViewStructure;.setClassName (Ljava/lang/String;)V
D/dalvikvm( 2086): VFY: replacing opcode 0x6e at 0x0012
I/dalvikvm( 2086): Could not find method android.view.ViewStructure.setEnabled, referenced from method org.mozilla.geckoview.SessionTextInput.onProvideAutofillVirtualStructure
W/dalvikvm( 2086): VFY: unable to resolve virtual method 16371: Landroid/view/ViewStructure;.setEnabled (Z)V
D/dalvikvm( 2086): VFY: replacing opcode 0x6e at 0x0016
I/DEBUG ( 649): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG ( 649): Build fingerprint: 'generic/sdk/generic:4.3.1/JB_MR2/3462034:eng/test-keys'
I/DEBUG ( 649): Revision: '0'
I/DEBUG ( 649): pid: 2086, tid: 2102, name: Gecko >>> org.mozilla.geckoview_example <<<
I/DEBUG ( 649): signal 4 (SIGILL), code 1 (ILL_ILLOPC), fault addr 99abaefa
I/DEBUG ( 649): r0 00000000 r1 835e97d9 r2 00000000 r3 ffffffff
I/DEBUG ( 649): r4 99b941c8 r5 b6feea06 r6 9abe7494 r7 99d9bc80
I/DEBUG ( 649): r8 0000000a r9 b6ff2650 sl 00000001 fp 99b90008
I/DEBUG ( 649): ip 99d9bc18 sp 99d9bc78 lr 99ab7c9b pc 99abaefa cpsr 60000170
I/DEBUG ( 649): d0 400000003eaaaaab d1 3ff0000040200000
I/DEBUG ( 649): d2 0000000000000000 d3 0000000000000000
I/DEBUG ( 649): d4 406bc00000000000 d5 0000000000000000
I/DEBUG ( 649): d6 0000000000000000 d7 4040000000000003
I/DEBUG ( 649): d8 0000000000000000 d9 0000000000000000
I/DEBUG ( 649): d10 0000000000000000 d11 0000000000000000
I/DEBUG ( 649): d12 0000000000000000 d13 0000000000000000
I/DEBUG ( 649): d14 0000000000000000 d15 0000000000000000
I/DEBUG ( 649): scr 80000010
I/DEBUG ( 649):
I/DEBUG ( 649): backtrace:
I/DEBUG ( 649): #00 pc 00012efa /data/app-lib/org.mozilla.geckoview_example-1/libmozglue.so
I/DEBUG ( 649): #01 pc 0000fc97 /data/app-lib/org.mozilla.geckoview_example-1/libmozglue.so
I/DEBUG ( 649):
I/DEBUG ( 649): stack:
I/DEBUG ( 649): 99d9bc38 00000000
I/DEBUG ( 649): 99d9bc3c 40000004
I/DEBUG ( 649): 99d9bc40 00000000
I/DEBUG ( 649): 99d9bc44 b6fe2a41 /system/bin/linker
I/DEBUG ( 649): 99d9bc48 00000000
I/DEBUG ( 649): 99d9bc4c 10000004
I/DEBUG ( 649): 99d9bc50 00000000
I/DEBUG ( 649): 99d9bc54 835e97d9
I/DEBUG ( 649): 99d9bc58 0000000a
I/DEBUG ( 649): 99d9bc5c b6ff2650 /system/bin/linker
I/DEBUG ( 649): 99d9bc60 00000001
I/DEBUG ( 649): 99d9bc64 99b941c8
I/DEBUG ( 649): 99d9bc68 b6feea06 /system/bin/linker
I/DEBUG ( 649): 99d9bc6c 9abe7494
I/DEBUG ( 649): 99d9bc70 df0027ad
I/DEBUG ( 649): 99d9bc74 00000000
I/DEBUG ( 649): #00 99d9bc78 99b941c8
I/DEBUG ( 649): ........ ........
I/DEBUG ( 649): #01 99d9bc78 99b941c8
I/DEBUG ( 649): 99d9bc7c 9abe7494
I/DEBUG ( 649): 99d9bc80 99d9bc90 [stack:2102]
I/DEBUG ( 649): 99d9bc84 99abb9a5 /data/app-lib/org.mozilla.geckoview_example-1/libmozglue.so
I/DEBUG ( 649): 99d9bc88 99abb995 /data/app-lib/org.mozilla.geckoview_example-1/libmozglue.so
I/DEBUG ( 649): 99d9bc8c 9abe7494
I/DEBUG ( 649): 99d9bc90 b6feeac9 /system/bin/linker
I/DEBUG ( 649): 99d9bc94 b6fe4907 /system/bin/linker
I/DEBUG ( 649): 99d9bc98 9abe7494
I/DEBUG ( 649): 99d9bc9c b6feea06 /system/bin/linker
I/DEBUG ( 649): 99d9bca0 00000002
I/DEBUG ( 649): 99d9bca4 00000004
I/DEBUG ( 649): 99d9bca8 9abe7494
I/DEBUG ( 649): 99d9bcac b6fe49df /system/bin/linker
I/DEBUG ( 649): 99d9bcb0 0000002a
I/DEBUG ( 649): 99d9bcb4 b8bd5620 [heap]
I/DEBUG ( 649):
...
I/DEBUG ( 649): memory map around fault addr 99abaefa:
I/DEBUG ( 649): 99a21000-99aa8000 r-- /data/app-lib/org.mozilla.geckoview_example-1/libmozglue.so
I/DEBUG ( 649): 99aa8000-99b5d000 r-x /data/app-lib/org.mozilla.geckoview_example-1/libmozglue.so
I/DEBUG ( 649): 99b5d000-99b94000 rw- /data/app-lib/org.mozilla.geckoview_example-1/libmozglue.so
W/ActivityManager( 954): Force finishing activity org.mozilla.geckoview_example/.GeckoViewActivity
D/Zygote ( 652): Process 2086 terminated by signal (4)
Comment 3•5 years ago
|
||
So, this is odd:
I/DEBUG ( 649): signal 4 (SIGILL), code 1 (ILL_ILLOPC), fault addr 99abaefa
We've definitely seen tickets like that in the past, usually due to compiler and/or NDK toolchain issues. I have no insight into this: if you really care to run on the ARM emulator, the GV folks will have to investigate further. You could try attaching the debugger (in Android Studio, or try to make it work following some WIP notes). If this reproduces with an artifact build, you might be able to use --enable-artifact-build-symbols
to get the backtrace more easily. (Note that I witness an issue with full artifact build symbols locally where we don't pick builds with full build symbols properly. I haven't filed/fixed that yet.)
Reporter | ||
Comment 4•5 years ago
|
||
For the record, I tried it on an artifact build from macOS and the problem is reproducible with the artifact build.
Comment 5•5 years ago
|
||
This is blocking me too. I tried to investigate bug 1583907 (crashes on ARM when upgrading to Clang 9) but I can't get anything to run in the emulator.
Updated•5 years ago
|
Comment 6•5 years ago
|
||
Running in emulator 29.2.1 on ubuntu 16.04 I tried installing geckoview_example.apk and geckoview-androidTest.apk from recent mozilla-central "Android 4.0 API16+" builds; they both consistently crashed on startup with SIGILL. I also tried installing a fennec build (target.apk) from esr68; it crashed on startup with SIGILL.
This seems particularly odd in that the esr68 fennec successfully runs tests in the arm emulator running android 4.3 in continuous integration. However, the arm emulator used in esr68 continuous integration is quite old (2017 or earlier).
Also, on mozilla-central, arm builds of geckoview_example are successfully run on bitbar Pixel 2 devices, for raptor tests. I even used the download link from a raptor test log to download a geckoview_example apk and installed that on my 4.3 emulator -- it crashed with SIGILL.
The 29.2.1 arm emulator appears to work in every other way: I can start Android apps like "Settings".
I think all of that points to some sort of incompatibility between our binaries and the 29.2.1 arm emulator.
Comment 7•5 years ago
|
||
btw, I verified that mozilla-central x86_64 builds of geckoview_example install and run well on the x86 emulator ('mach android-emulator --version x86-7.0') -- this problem appears to be confined to arm builds on the arm emulator.
Comment 8•5 years ago
|
||
Comment 9•5 years ago
|
||
Comment 11•5 years ago
|
||
Summary: this appears to be a regression in Android's ARM emulator version 29.2.1. Fennec and GeckoView ARM builds crash with SIGILL in ARM emulator 29.2.1, but they ran fine in old ARM emulator versions and the current x86 emulator.
What is the illegal instruction? Is this NEON code? Why would we have NEON code in mozglue?
Comment 12•5 years ago
|
||
lower priority because this is an ARM emulator regression, but most devs using ARM devices or x86 emulator. Is this bug Mac-specific?
Should we report this bug upstream?
Comment 13•5 years ago
|
||
It is not Mac-specific: it fails just the same on Linux.
Comment 14•5 years ago
|
||
I downgraded my emulator to 28.0.25.0, from https://dl.google.com/android/repository/emulator-linux-5395263.zip and then was able to run geckoview_example without any problem.
Updated•5 years ago
|
Reporter | ||
Comment 15•5 years ago
|
||
(In reply to Geoff Brown [:gbrown] from comment #14)
I downgraded my emulator to 28.0.25.0, from https://dl.google.com/android/repository/emulator-linux-5395263.zip and then was able to run geckoview_example without any problem.
Should 'mach bootstrap' change to download 28.0.25.0 instead of 29.2.1? Seems a shame to have to go get a different version of the emulator after bootstrap.
Comment 16•5 years ago
|
||
(In reply to Michael Froman [:mjf] from comment #15)
Should 'mach bootstrap' change to download 28.0.25.0 instead of 29.2.1?
Maybe? But on the whole, I think no. The 29.2.1 x86_64 emulator gives us no trouble, has important/relevant bug fixes, and is the version used by our tests in continuous integration. I think it may be more important to provide the same/best/latest version of the x86_64 emulator (which we encourage everyone to use whenever possible) than to provide a working arm emulator.
Updated•4 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Description
•