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

[WIP] Support both GraalVM 19.2.1 and 19.3.0.2 - 19.3.0.2 SDK & 19.2.1 GraalVM image #6487

Closed

Conversation

gwenneg
Copy link
Member

@gwenneg gwenneg commented Jan 10, 2020

Fixes #6483

svm version (SDK): 19.3.0.2
GraalVM image version : 19.2.1

I'm submitting this to get an early CI result. I only ran a small part of the full Quarkus native build, so CI might fail (and it will probably be related to substitutions) in multiple modules.

I'll continue testing this PR locally while CI builds it (and hopefully succeeds!).

@gwenneg
Copy link
Member Author

gwenneg commented Jan 10, 2020

The results are not so bad!

Many quarkus-integration-test-main tests failed because of a single multiple errors, including:

2020-01-10 01:32:41,157 ERROR [io.und.req.io] (executor-thread-2) Exception handling request 5581ca55-1f71-455b-a3f6-43c6045de241-5 to /client/annotation/configKey: com.oracle.svm.core.jdk.UnsupportedFeatureError: Proxy class defined by interfaces [interface io.quarkus.it.rest.RestClientBaseUriConfigKeyInterface, interface org.jboss.resteasy.client.jaxrs.internal.proxy.ResteasyClientProxy] not found. Generating proxy classes at runtime is not supported. Proxy classes need to be defined at image build time by specifying the list of interfaces that they implement. To define proxy classes use -H:DynamicProxyConfigurationFiles=<comma-separated-config-files> and -H:DynamicProxyConfigurationResources=<comma-separated-config-resources> options.
	at com.oracle.svm.core.util.VMError.unsupportedFeature(VMError.java:102)
	at com.oracle.svm.reflect.proxy.DynamicProxySupport.getProxyClass(DynamicProxySupport.java:113)
	at java.lang.reflect.Proxy.getProxyClass0(Proxy.java:54)
	at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:719)
	at org.jboss.resteasy.client.jaxrs.internal.proxy.ProxyBuilderImpl.build(ProxyBuilderImpl.java:169)
	at org.jboss.resteasy.client.jaxrs.internal.proxy.ProxyBuilderImpl.build(ProxyBuilderImpl.java:108)
	at org.jboss.resteasy.microprofile.client.RestClientBuilderImpl.build(RestClientBuilderImpl.java:269)
	at io.quarkus.restclient.runtime.RestClientBase.create(RestClientBase.java:54)
	at io.quarkus.it.rest.RestClientBaseUriConfigKeyInterface_caffaa3bd97f1b9d0c34e49d33d7971db9ee59b8_Synthetic_Bean.create(RestClientBaseUriConfigKeyInterface_caffaa3bd97f1b9d0c34e49d33d7971db9ee59b8_Synthetic_Bean.zig:216)
	at io.quarkus.it.rest.RestClientBaseUriConfigKeyInterface_caffaa3bd97f1b9d0c34e49d33d7971db9ee59b8_Synthetic_Bean.get(RestClientBaseUriConfigKeyInterface_caffaa3bd97f1b9d0c34e49d33d7971db9ee59b8_Synthetic_Bean.zig:99)
	at io.quarkus.it.rest.RestClientBaseUriConfigKeyInterface_caffaa3bd97f1b9d0c34e49d33d7971db9ee59b8_Synthetic_Bean.get(RestClientBaseUriConfigKeyInterface_caffaa3bd97f1b9d0c34e49d33d7971db9ee59b8_Synthetic_Bean.zig:72)
[...]

NativeImageProxyDefinitionBuildItem may help fixing this, I'll give it a try tonight.

The quarkus-integration-test-jsch tests failed because of this:

[...]
Caused by: java.lang.UnsatisfiedLinkError: sun.security.ec.ECKeyPairGenerator.isCurveSupported([B)Z [symbol: Java_sun_security_ec_ECKeyPairGenerator_isCurveSupported or Java_sun_security_ec_ECKeyPairGenerator_isCurveSupported___3B]
	at com.oracle.svm.jni.access.JNINativeLinkage.getOrFindEntryPoint(JNINativeLinkage.java:145)
	at com.oracle.svm.jni.JNIGeneratedMethodSupport.nativeCallAddress(JNIGeneratedMethodSupport.java:57)
	at sun.security.ec.ECKeyPairGenerator.isCurveSupported(ECKeyPairGenerator.java)
	at sun.security.ec.ECKeyPairGenerator.ensureCurveIsSupported(ECKeyPairGenerator.java:135)
	at sun.security.ec.ECKeyPairGenerator.initialize(ECKeyPairGenerator.java:114)
	at java.security.KeyPairGenerator$Delegate.initialize(KeyPairGenerator.java:674)
	at java.security.KeyPairGenerator.initialize(KeyPairGenerator.java:411)
	at com.jcraft.jsch.jce.KeyPairGenECDSA.init(KeyPairGenECDSA.java:54)
	at com.jcraft.jsch.jce.ECDHN.init(ECDHN.java:46)
	at com.jcraft.jsch.DHECN.init(DHECN.java:81)
	at com.jcraft.jsch.Session.checkKex(Session.java:2542)
	at com.jcraft.jsch.Session.checkKexes(Session.java:2519)
	at com.jcraft.jsch.Session.send_kexinit(Session.java:634)
	at com.jcraft.jsch.Session.connect(Session.java:307)
	at com.jcraft.jsch.Session.connect(Session.java:183)
	at io.quarkus.it.jsch.JSchResource.connect(JSchResource.java:19)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:151)
	at org.jboss.resteasy.core.MethodInjectorImpl.lambda$invoke$3(MethodInjectorImpl.java:122)
	at java.util.concurrent.CompletableFuture.uniApply(CompletableFuture.java:616)
	at java.util.concurrent.CompletableFuture.uniApplyStage(CompletableFuture.java:628)
	at java.util.concurrent.CompletableFuture.thenApply(CompletableFuture.java:1996)
	at java.util.concurrent.CompletableFuture.thenApply(CompletableFuture.java:110)
	at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:122)
	at org.jboss.resteasy.core.ResourceMethodInvoker.internalInvokeOnTarget(ResourceMethodInvoker.java:594)
	at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTargetAfterFilter(ResourceMethodInvoker.java:468)
	at org.jboss.resteasy.core.ResourceMethodInvoker.lambda$invokeOnTarget$2(ResourceMethodInvoker.java:421)
	at org.jboss.resteasy.core.interception.jaxrs.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:363)
	at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:423)
	at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:391)
	at org.jboss.resteasy.core.ResourceMethodInvoker.lambda$invoke$1(ResourceMethodInvoker.java:365)
	at java.util.concurrent.CompletableFuture.uniComposeStage(CompletableFuture.java:995)
	at java.util.concurrent.CompletableFuture.thenCompose(CompletableFuture.java:2137)
	at java.util.concurrent.CompletableFuture.thenCompose(CompletableFuture.java:110)
	at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:365)
	at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:477)
	... 19 more

@gsmet
Copy link
Member

gsmet commented Jan 10, 2020

I'm puzzled by the first one tbh. I don't think we have changed anything in this area so I'm quite surprised we have this sort of error. I wonder if it won't be a tricky thing with the graal-sdk not being the right one.

For the second one, I'm thinking that we might have to add a JniBuildItem.

@gwenneg gwenneg changed the title [WIP] Support both GraalVM 19.2.1 and 19.3.0.2 [WIP] Support both GraalVM 19.2.1 and 19.3.0.2 - 19.3.0.2 SDK edition Jan 10, 2020
@gwenneg
Copy link
Member Author

gwenneg commented Jan 10, 2020

I created #6503 to run the same native tests using the 19.2.1 SDK instead of the 19.3.0.2 SDK which is used in this PR. CI won't build #6503 and I don't understand why, but I still had some interesting results locally. In #6503, quarkus-integration-test-main runs without any error. This probably means that using the 19.3.0.2 SDK in Quarkus while running the native image using GraalVM 19.2.1 won't work.

Next step for my local tests: run Quarkus with the 19.2.1 SDK and GraalVM 19.3.0.2.

@gwenneg
Copy link
Member Author

gwenneg commented Jan 10, 2020

quarkus-integration-test-main runs without any error locally using the 19.2.1 SDK and GraalVM 19.3.0.2 (JDK 8 edition).

Here's where I am so far:

ubi-quarkus-native-image:19.2.1 ubi-quarkus-native-image:19.3.0.2-java8 ubi-quarkus-native-image:19.3.0.2-java11
svm:19.2.1 (SDK) Tests in progress in #6503. One error in quarkus-integration-test-jsch. Tested in #6507. All tests passed successfully. Tests almost done, more details here.
svm:19.3.0.2 (SDK) Tested in #6487 (this PR). Multiple errors in quarkus-integration-test-main and quarkus-integration-test-jsch. Doesn't look like a good combination. Current Quarkus master. Nothing to test here. Current Quarkus master. Nothing to test here.

@gwenneg gwenneg changed the title [WIP] Support both GraalVM 19.2.1 and 19.3.0.2 - 19.3.0.2 SDK edition [WIP] Support both GraalVM 19.2.1 and 19.3.0.2 - 19.3.0.2 SDK & 19.2.1 GraalVM image Jan 11, 2020
@gwenneg
Copy link
Member Author

gwenneg commented Jan 16, 2020

Superseded by #6574.

@gwenneg gwenneg closed this Jan 16, 2020
@gwenneg gwenneg added the triage/invalid This doesn't seem right label Jan 16, 2020
@gwenneg gwenneg deleted the double-graalvm-compatibility branch January 17, 2020 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage/invalid This doesn't seem right
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Double GraalVM compatibility effort
2 participants