Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash on launch on Android #10337

Closed
shinglyu opened this issue Apr 1, 2016 · 13 comments
Closed

Crash on launch on Android #10337

shinglyu opened this issue Apr 1, 2016 · 13 comments

Comments

@shinglyu
Copy link
Contributor

shinglyu commented Apr 1, 2016

I built a release build for Android following the guide, but it crashes immediately on launch with the following adb log: https://gist.github.com/shinglyu/5bce8a846e54c023a411aef5405fb4c6 (there are ./mach package log at the bottom)

The meat seems to be this:

03-30 15:36:38.402 17979 17979 I servo_wrapper: Loading the NativeActivity
03-30 15:36:38.734 17979 17979 W linker  : /data/app/com.mozilla.servo-1/lib/arm/libmain.so: is missing DT_SONAME will use basename as a replacement: "libmain.so"
03-30 15:36:38.751 17979 17979 D AndroidRuntime: Shutting down VM
03-30 15:36:38.752 17979 17979 E AndroidRuntime: FATAL EXCEPTION: main
03-30 15:36:38.752 17979 17979 E AndroidRuntime: Process: com.mozilla.servo, PID: 17979
03-30 15:36:38.752 17979 17979 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.mozilla.servo/com.mozilla.servo.MainActivity}: java.lang.IllegalArgumentException: Unable to load native library: /data/app/com.mozilla.servo-1/lib/arm/libmain.so
03-30 15:36:38.752 17979 17979 E AndroidRuntime:    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2444)
03-30 15:36:38.752 17979 17979 E AndroidRuntime:    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2504)
03-30 15:36:38.752 17979 17979 E AndroidRuntime:    at android.app.ActivityThread.-wrap11(ActivityThread.java)
03-30 15:36:38.752 17979 17979 E AndroidRuntime:    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1367)
03-30 15:36:38.752 17979 17979 E AndroidRuntime:    at android.os.Handler.dispatchMessage(Handler.java:102)
03-30 15:36:38.752 17979 17979 E AndroidRuntime:    at android.os.Looper.loop(Looper.java:148)
03-30 15:36:38.752 17979 17979 E AndroidRuntime:    at android.app.ActivityThread.main(ActivityThread.java:5461)
03-30 15:36:38.752 17979 17979 E AndroidRuntime:    at java.lang.reflect.Method.invoke(Native Method)
03-30 15:36:38.752 17979 17979 E AndroidRuntime:    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
03-30 15:36:38.752 17979 17979 E AndroidRuntime:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
03-30 15:36:38.752 17979 17979 E AndroidRuntime: Caused by: java.lang.IllegalArgumentException: Unable to load native library: /data/app/com.mozilla.servo-1/lib/arm/libmain.so
03-30 15:36:38.752 17979 17979 E AndroidRuntime:    at android.app.NativeActivity.onCreate(NativeActivity.java:182)
03-30 15:36:38.752 17979 17979 E AndroidRuntime:    at android.app.Activity.performCreate(Activity.java:6251)
03-30 15:36:38.752 17979 17979 E AndroidRuntime:    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
03-30 15:36:38.752 17979 17979 E AndroidRuntime:    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2397)
03-30 15:36:38.752 17979 17979 E AndroidRuntime:    ... 9 more
03-30 15:36:38.756   821 13606 W ActivityManager:   Force finishing activity com.mozilla.servo/.MainActivity
03-30 15:36:38.762 17979 17979 I Process : Sending signal. PID: 17979 SIG: 9
03-30 15:36:38.786   821  1834 I ActivityManager: Process com.mozilla.servo (pid 17979) has died

Build Environment:

  • Linux Mint (based on Ubuntu 14.04.3 LTS) x86_64
  • OpenJDK 8
  • Android NDK r11b
  • Android SDK r24.4.1
  • Servo commit 074c7e8

Runtime Environment

  • Sony Z3C with 6.0.1
  • Nexus 5 with 6.0.1
  • Nexus 7 ARM emulator with 5.1.1 (API Level 22, armeabi-v7a)
    All the above failed with similar issues.
@shinglyu
Copy link
Contributor Author

shinglyu commented Apr 1, 2016

@larsbergstrom this is what I was talking about on IRC

@shinglyu
Copy link
Contributor Author

shinglyu commented Apr 1, 2016

I also did a ./mach clean, then build a dev version, but the issues persists.

@larsbergstrom
Copy link
Contributor

Hrm, usually this failure mode means that there is an unresolved symbol. I will try to reproduce this locally, as I've been doing my Android development on a build that is based on a slightly older hash and that has a bunch of fixes for webrender :-)

@shinglyu
Copy link
Contributor Author

shinglyu commented Apr 2, 2016

I want to set up a nightly build server in Taipei, so I can bisect builds for this kind of problem. Does these script run on Jenkins on Linux? Or how do I reproduce your nightly build environment?

@larsbergstrom
Copy link
Contributor

Perfect timing! @edunham and I are just talking about setting up a full set of nightly builds for Servo :-)

I was originally looking at the servo-nightly repository as a way to get builds done by Travis/AppVeyor. However, as Emily pointed out, it would be nice to have the builds being produced by machines fully under our control. So she's thinking of expanding our current buildbot rules here to have a publishing step:
https://github.com/servo/saltfs/blob/master/buildbot/master/master.cfg

I think that there are a few things that we'd like to do to make all of this easier:

  1. Move the steps in these scripts out of the buildbot master.cfg file and instead into python scripts in the servo repository, in the etc/ci directory
  2. Change the buildbot config to just call these scripts
  3. Add nightly builds to the buildbot config, with push to an S3 bucket

@edunham Does this capture most of what we chatted about in our last meeting?

@aneeshusa
Copy link
Contributor

+1 from me on moving things out of Buildbot files and into the Servo repository - having less in the Buildbot files should decrease Buildbot's fragility. Ideally Buildbot knows as little as possible about Servo specifics.

@shinglyu
Copy link
Contributor Author

shinglyu commented Apr 4, 2016

It's always good to write runner-agnostic build scripts and keep the CI config as simple as possible. Ping me if you have a bug for the task and I can help. I'm quite familiar with python.

@Ms2ger
Copy link
Contributor

Ms2ger commented Apr 4, 2016

Is it possible to retain the separation into steps when the code is moved into the tree?

@larsbergstrom
Copy link
Contributor

@Ms2ger I would like to do so, as otherwise it will be hard to balance jobs across the trees. e.g., build, wpt, css, etc. should all be separate steps. And wpt/css should take "chunk" and "threads" parameters, as we're definitely going to want to use those... once they work :-)

@shinglyu
Copy link
Contributor Author

@larsbergstrom Back to the original question. Can you reproduce the problem? Or maybe I should try again with the latest code?

@larsbergstrom
Copy link
Contributor

Hrm, I don't get that, but I do get a failure to load with the debug master build with:

D/RustAndroidGlueStdouterr(12474): thread '<unnamed>' panicked at 'called `Option::unwrap()` on a `None` value', ../src/libcore/option.rs:326
D/RustAndroidGlueStdouterr(12474): note: Run with `RUST_BACKTRACE=1` for a backtrace.

I will try to work with @glennw to land the patches to use webrender and get them running :-)

@edunham
Copy link
Contributor

edunham commented Apr 15, 2016

To answer the question from earlier in this thread, I recently opened servo/saltfs#316 to track progress on moving build logic out of the Buildbot config.

@larsbergstrom
Copy link
Contributor

I cannot reproduce this build with debug master using Servo hash e7caaa7. I followed the steps in the Building for Android steps, and am targeting a (rooted) Nexus 9. This is not using any of the webrender patches.

Debug does take a little while to load, though!

I visited the site / ran using ./mach run --android https://www.mozilla.org.

Please reopen if this still reproduces.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants