You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2021/05/24 13:54:54 UTC

[GitHub] [camel-quarkus] ppalaga opened a new issue #2653: Native compilation issues on GraalVM 21.1

ppalaga opened a new issue #2653:
URL: https://github.com/apache/camel-quarkus/issues/2653


   An example in the AWS2 test module:
   
   ```
   Error: Detected an instance of Random/SplittableRandom class in the image heap. Instances created during image generation have cached seed values and don't behave as expected.  To see how this object got instantiated use --trace-object-instantiation=java.util.Random. The object was probably created by a class initializer and is reachable from a static field. You can request class initialization at image runtime by using the option --initialize-at-run-time=<class-name>. Or you can write your own initialization methods and call them explicitly from your main entry point.
   Trace: Object was reached by 
   	reading field software.amazon.awssdk.core.retry.backoff.FullJitterBackoffStrategy.random of
   		constant software.amazon.awssdk.core.retry.backoff.FullJitterBackoffStrategy@666fb1bf reached by 
   	scanning method software.amazon.awssdk.services.dynamodb.DynamoDbRetryPolicy.resolveRetryPolicy(DynamoDbRetryPolicy.java:83)
   Call path from entry point to software.amazon.awssdk.services.dynamodb.DynamoDbRetryPolicy.resolveRetryPolicy(SdkClientConfiguration): 
   	at software.amazon.awssdk.services.dynamodb.DynamoDbRetryPolicy.resolveRetryPolicy(DynamoDbRetryPolicy.java:68)
   	at software.amazon.awssdk.services.dynamodb.DefaultDynamoDbBaseClientBuilder.finalizeServiceConfiguration(DefaultDynamoDbBaseClientBuilder.java:67)
   	at software.amazon.awssdk.awscore.client.builder.AwsDefaultClientBuilder.finalizeChildConfiguration(AwsDefaultClientBuilder.java:139)
   	at software.amazon.awssdk.core.client.builder.SdkDefaultClientBuilder.syncClientConfiguration(SdkDefaultClientBuilder.java:158)
   	at software.amazon.awssdk.services.dynamodb.DefaultDynamoDbClientBuilder.buildClient(DefaultDynamoDbClientBuilder.java:44)
   	at software.amazon.awssdk.services.dynamodb.DefaultDynamoDbClientBuilder.buildClient(DefaultDynamoDbClientBuilder.java:22)
   	at software.amazon.awssdk.core.client.builder.SdkDefaultClientBuilder.build(SdkDefaultClientBuilder.java:130)
   	at org.apache.camel.component.aws2.ddbstream.Ddb2StreamEndpoint.createDdbStreamClient(Ddb2StreamEndpoint.java:156)
   	at com.oracle.svm.reflect.Ddb2StreamEndpoint_createDdbStreamClient_66beea1cc17f3e19d34ea704f07455e39bfd7aa1_2626.invoke(Unknown Source)
   	at java.lang.reflect.Method.invoke(Method.java:566)
   	at java.util.ServiceLoader$ProviderImpl.invokeFactoryMethod(ServiceLoader.java:737)
   	at java.util.ServiceLoader$ProviderImpl.get(ServiceLoader.java:720)
   	at com.oracle.svm.core.jdk.SystemPropertiesSupport.initializeLazyValue(SystemPropertiesSupport.java:216)
   	at com.oracle.svm.core.jdk.SystemPropertiesSupport.getProperty(SystemPropertiesSupport.java:169)
   	at com.oracle.svm.core.jdk.Target_java_lang_System.getProperty(JavaLangSubstitutions.java:291)
   	at com.oracle.svm.jni.JNIJavaCallWrappers.jniInvoke_VARARGS:Ljava_lang_System_2_0002egetProperty_00028Ljava_lang_String_2_00029Ljava_lang_String_2(generated:0)
   Error: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: Detected an instance of Random/SplittableRandom class in the image heap. Instances created during image generation have cached seed values and don't behave as expected.  To see how this object got instantiated use --trace-object-instantiation=java.security.SecureRandom. The object was probably created by a class initializer and is reachable from a static field. You can request class initialization at image runtime by using the option --initialize-at-run-time=<class-name>. Or you can write your own initialization methods and call them explicitly from your main entry point.
   Trace: 
   	at parsing org.apache.http.impl.auth.NTLMEngineImpl.access$000(NTLMEngineImpl.java:51)
   Call path from entry point to org.apache.http.impl.auth.NTLMEngineImpl.access$000(): 
   	at org.apache.http.impl.auth.NTLMEngineImpl.access$000(NTLMEngineImpl.java:51)
   	at org.apache.http.impl.auth.NTLMEngineImpl$Type3Message.<init>(NTLMEngineImpl.java:1505)
   	at org.apache.http.impl.auth.NTLMEngineImpl$Type3Message.<init>(NTLMEngineImpl.java:1474)
   	at org.apache.http.impl.auth.NTLMEngineImpl.getType3Message(NTLMEngineImpl.java:181)
   	at org.apache.http.impl.auth.NTLMEngineImpl.generateType3Msg(NTLMEngineImpl.java:2097)
   	at org.apache.http.impl.auth.NTLMScheme.authenticate(NTLMScheme.java:142)
   	at org.apache.http.impl.auth.AuthSchemeBase.authenticate(AuthSchemeBase.java:136)
   	at org.apache.http.impl.auth.HttpAuthenticator.doAuth(HttpAuthenticator.java:233)
   	at org.apache.http.impl.auth.HttpAuthenticator.generateAuthResponse(HttpAuthenticator.java:213)
   	at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:262)
   	at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186)
   	at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
   	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
   	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56)
   	at software.amazon.awssdk.http.apache.internal.impl.ApacheSdkHttpClient.execute(ApacheSdkHttpClient.java:72)
   	at software.amazon.awssdk.http.apache.ApacheHttpClient.execute(ApacheHttpClient.java:253)
   	at software.amazon.awssdk.http.apache.ApacheHttpClient.access$500(ApacheHttpClient.java:106)
   	at software.amazon.awssdk.http.apache.ApacheHttpClient$1.call(ApacheHttpClient.java:232)
   	at software.amazon.awssdk.http.apache.ApacheHttpClient$1.call(ApacheHttpClient.java:229)
   	at java.util.concurrent.FutureTask.run(FutureTask.java:264)
   	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1452)
   	at java.lang.Thread.run(Thread.java:829)
   	at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:553)
   	at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:192)
   	at com.oracle.svm.core.code.IsolateEnterStub.PosixJavaThreads_pthreadStartRoutine_e1f4a8c0039f8337338252cd8734f63a79b5e3df(generated:0)
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] ppalaga commented on issue #2653: Native compilation issues on GraalVM 21.1

Posted by GitBox <gi...@apache.org>.
ppalaga commented on issue #2653:
URL: https://github.com/apache/camel-quarkus/issues/2653#issuecomment-847694259


   In case of AWS, I am considering to make our AWS extensions depend on the Quarkus ones. I have a PoC and it seems to work quite well.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] ppalaga commented on issue #2653: Native compilation issues on GraalVM 21.1

Posted by GitBox <gi...@apache.org>.
ppalaga commented on issue #2653:
URL: https://github.com/apache/camel-quarkus/issues/2653#issuecomment-848892078


   Fixed via https://github.com/apache/camel-quarkus/pull/2663


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] ppalaga commented on issue #2653: Native compilation issues on GraalVM 21.1

Posted by GitBox <gi...@apache.org>.
ppalaga commented on issue #2653:
URL: https://github.com/apache/camel-quarkus/issues/2653#issuecomment-847712360


   > * star moving the components to use the async bits and drop apache-http in favor of netty
   
   +1 for the direction, but I doubt we'll have time for that in the coming months. I have filed https://github.com/apache/camel-quarkus/issues/2662
   
   > don't know if all the services we are covering in Camel have their respective Quarkus extensions.
   
   No, they do not, but I do not think it is an issue. We can leverage the ones that exist and do our stuff as we did so far with the rest.
   
   > Moving to async is an option, but I would probably create a second component for async, not all the components would have real advantages in moving to async.
   
   I wonder whether sync/async can be seen as an implementation detail? Well, probably not, as long as the user has the option to provide his custom client instance. And switching to async would be a backwards incompatible change. OTOH, having two component variants for each AWS service sounds after a lot of work and a lot of maintenance. I think we should avoid it as far as possible.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] lburgazzoli commented on issue #2653: Native compilation issues on GraalVM 21.1

Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on issue #2653:
URL: https://github.com/apache/camel-quarkus/issues/2653#issuecomment-847698031


   I think as a next step we should:
   
   - star moving the components to use the async bits and drop apache-http in favor of netty
   - see if we can integrate better with the aws extension provided by quarkus 
   
   I remember we had some discussions with @oscerd in the past but it's a huge task 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] oscerd commented on issue #2653: Native compilation issues on GraalVM 21.1

Posted by GitBox <gi...@apache.org>.
oscerd commented on issue #2653:
URL: https://github.com/apache/camel-quarkus/issues/2653#issuecomment-847706606


   I don't know if all the services we are covering in Camel have their respective Quarkus extensions.
   
   Moving to async is an option, but I would probably create a second component for async, not all the components would have real advantages in moving to async.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] ppalaga closed issue #2653: Native compilation issues on GraalVM 21.1

Posted by GitBox <gi...@apache.org>.
ppalaga closed issue #2653:
URL: https://github.com/apache/camel-quarkus/issues/2653


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] oscerd commented on issue #2653: Native compilation issues on GraalVM 21.1

Posted by GitBox <gi...@apache.org>.
oscerd commented on issue #2653:
URL: https://github.com/apache/camel-quarkus/issues/2653#issuecomment-847770495


   By the way, let's see, maybe we can start from the messaging ones.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] oscerd commented on issue #2653: Native compilation issues on GraalVM 21.1

Posted by GitBox <gi...@apache.org>.
oscerd commented on issue #2653:
URL: https://github.com/apache/camel-quarkus/issues/2653#issuecomment-847769842


   We can try to introduce the async option into the original components, but in the end you'll get some new code and some new maintenance to face. Not a whole new component, but for sure new stuff.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org