-
Notifications
You must be signed in to change notification settings - Fork 708
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
Travis CI Android emulator-based tests for Android are broken #603
Comments
See rust-lang/rust#45580 for some inspiration. |
I think a change in Rust might have inadvertently broken the test suite. This glob in travis.sh matches two files so |
And here's a tombstone. |
@andrewtj That's great news! It seems like there were several problems. The problem I was experiencing previously was "adb: command not found" and "emulator: command not found" errors on Travis CI. Now it seems those errors aren't occurring! Maybe the problem was just that the Travis CI cache was in a corrupted state or something. Because of those "command not found" errors, I wasn't able to notice the problem that your patch fixes, which apparently is due to a change in rustc. Thanks for providing an example fix. I went back to tag 0.12.1 and applied that fix to the 0.12.1 tag and kicked off a Travis CI build. The illegal instruction error still occurs. However, back when I released 0.12.1, the build passed just fine; see https://travis-ci.org/briansmith/ring/builds/271520581. That indicates to me that there is probably a change in the emulator, or a change in rustc or some other part of the toolchain that makes it incompatible with the emulator. |
Okay I've run a few more builds and it looks like 1.21.0 works but 1.22.1 does not. So I guess something must have changed in Rust's jemalloc fork in 1.22? |
I've narrowed it down to something between nightly-2017-10-29 and nightly-2017-10-30:
It looks like rust-lang/rust#45656 landed in that window. I'm not familiar with the Android toolchain so I'm going to leave it here for the minute. |
I'm guessing that the version of the Android SDK that were'e using on Travis CI, in particular its emulator, is simply incompatible with the one that rustc uses. The Android SDK does warn us that it is out of date during installation. I think we need to switch to using a sdkmanager-based installation. I'll take a look at doing that. |
That sounds reasonable. It's noted in rust-lang/rust#45580 that the minimum supported version is 14 and the current script sets up a version 18 emulator, but emulator and device are probably different ball games. |
The Travis CI testing using the Android emulator was broken a while back. See #603. Until that is fixed, just don't run the tests on Android. This is unfortunate, however it is necessary to make progress on improvements for higher- priority platforms.
Commit 9e2bcb6 disables the Android emulator tests on Travis CI pending a solution to this. |
I don't anticipate working on this any time soon since Android is the least interesting target to me right now and simultaneously one of the most difficult targets to support. If anybody wants to volunteer to resolve this issue, I would greatly appreciate it and I'd be happy to review a PR that adds the tests back. Alternatively, if somebody has a business interest in keeping Android as a fully supported platform for ring, ping me at brian@briansmith.org. |
I tried using the latest SDK on both travis and locally and I get the same errors with both clang and gcc. If someone that knows more about debugging native libraries on android wants to help please ping me. |
This is all I got:
|
Now that stable doesn't ship jemalloc I decided to give this another try. Tests fail on different places depending if I'm doing a release build or not. For debug builds I get a panic on the AEAD tests, on a very innocent looking line on gcm.c:
The disassembled instruction
I got this grepping for neon in the macros defined by the compiler:
|
Using a system image with an API level > 23 works. @briansmith if that's ok with I'll do PR re-adding the android tests using an API 24 sys image and ndk. |
Yes, please use Android 8.0 (API level 26). According to https://developer.android.com/distribute/best-practices/develop/target-sdk that's the minimum for the Google Play store as of now. |
Also, what do you think about switching to |
Cool, I'll do a PR for armv7 and once that's merged I'll do one for aarch64. I'll try to take a look at using |
After researching more, I think if we can get things working the current way, that's better than using |
Darn, the latest available arm/aarch64 android system images are for API 22. I set up the NDK to use API 26 and tested with the 22 images and it worked. @briansmith how do you want to proceed? |
Let's just add a comment that we're using API 22 images because there are no API 26 images available. |
Re-opening this as it is happening again: "Illegal instruction" is reported in the ARM emulator. Perhaps it is an alignment issue. |
It seems like the Android SDK changed in some non-backward-compatible way. If somebody has a fix, I'd take a PR for it. Otherwise I think I might try rewriting all the non-Windows CI stuff using Docker and then using the Docker-ified stuff, ETA in Feburary.
The text was updated successfully, but these errors were encountered: