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

make io.grpc.testing.integration.Http2OkHttpTest pass on ARM #7822

Merged
merged 1 commit into from
Jan 19, 2021

Conversation

jtattermusch
Copy link
Contributor

(As discussed offline)
Currently concrypt doesn't offer an ARM version of the native components, so running Http2OkHttpTest ends up with a failure when ran on an ARM machine (which pollutes the otherwise green test results).

> Task :grpc-interop-testing:test
[jetty-alpn-agent][ warn] Could not parse java.version: 11.0.9.1
[jetty-alpn-agent][ warn] Could not find a matching alpn-boot jar for Java version: 11.0.9.1

io.grpc.testing.integration.Http2OkHttpTest > classMethod FAILED
    java.lang.RuntimeException: Could not create Conscrypt provider
        at io.grpc.internal.testing.TestUtils.installConscryptIfAvailable(TestUtils.java:198)
        at io.grpc.testing.integration.Http2OkHttpTest.loadConscrypt(Http2OkHttpTest.java:66)

        Caused by:
        java.lang.reflect.InvocationTargetException
            at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
            at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.base/java.lang.reflect.Method.invoke(Method.java:566)
            at io.grpc.internal.ConscryptLoader.newProvider(ConscryptLoader.java:78)
            at io.grpc.internal.testing.TestUtils.installConscryptIfAvailable(TestUtils.java:189)
            ... 1 more

            Caused by:
            java.lang.UnsatisfiedLinkError: no conscrypt_openjdk_jni-linux-aarch_64 in java.library.path: [/usr/java/packages/lib, /usr/lib/aarch64-linux-gnu/jni, /lib/aarch64-linux-gnu, /usr/lib/aarch64-linux-gnu, /usr/lib/jni, /lib, /usr/lib]
                at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2670)
                at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:830)
                at java.base/java.lang.System.loadLibrary(System.java:1873)
                at org.conscrypt.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:54)
                at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
                at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.base/java.lang.reflect.Method.invoke(Method.java:566)
                at org.conscrypt.NativeLibraryLoader$1.run(NativeLibraryLoader.java:297)
                at org.conscrypt.NativeLibraryLoader$1.run(NativeLibraryLoader.java:289)
                at java.base/java.security.AccessController.doPrivileged(Native Method)
                at org.conscrypt.NativeLibraryLoader.loadLibraryFromHelperClassloader(NativeLibraryLoader.java:289)
                at org.conscrypt.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:262)
                at org.conscrypt.NativeLibraryLoader.load(NativeLibraryLoader.java:162)
                at org.conscrypt.NativeLibraryLoader.loadFirstAvailable(NativeLibraryLoader.java:106)
                at org.conscrypt.NativeCryptoJni.init(NativeCryptoJni.java:50)
                at org.conscrypt.NativeCrypto.<clinit>(NativeCrypto.java:64)
                at org.conscrypt.Conscrypt.checkAvailability(Conscrypt.java:119)
                at org.conscrypt.Conscrypt.newProvider(Conscrypt.java:133)
                ... 7 more

328 tests completed, 1 failed, 29 skipped

@jtattermusch
Copy link
Contributor Author

CC @ejona86

@@ -180,6 +180,12 @@ public static void installConscryptIfAvailable() {
conscryptInstallAttempted = true;
return;
}
// Concrypt native libraries are not available for ARM architectures.
String osArch = System.getProperty("os.arch", "");
if (osArch.startsWith("aarch") || osArch.startsWith("arm")) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

qq: could this negatively affect something when testing on android?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method isn't used on Android. Android Conscrypt has to be set up quite different ways.

@ejona86 ejona86 merged commit b5a0d14 into grpc:master Jan 19, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants