Closed privatejava closed 3 years ago
/cc @patriot1burke
I did try out quarkus : 1.6.0.Final
and pushed the code to github but the problem is still the same.
Hello @privatejava, your environment details states that you are using 20.1.0
of Graal VM whereas your screenshots show that it's using 20.0.0
. Can you make sure it really uses 20.1.0
version and see if there's an change in build timings?
By the way, the classlist
phase taking 24 seconds is extremely high. That's a sign that it perhaps has picked up way too many classes/jars in the classpath. Unfortunately, given that this requires a AWS account to try and reproduce, I won't be able to give it a try. I also notice that you are triggering this build from your IDE (Netbeans?). Can you give it a try outside of the IDE, from the command line and see if there's any improvement?
There was another user with a similar issue. I could reproduce that issue. I have added a suggestion to that issue here https://github.com/quarkusio/quarkus/issues/10589#issuecomment-656667649. Can you follow that one and give it a try and see if that helps (make sure you are on 20.1.0
of GraalVM to try that)?
By the way, the
classlist
phase taking 24 seconds is extremely high. That's a sign that it perhaps has picked up way too many classes/jars in the classpath. Unfortunately, given that this requires a AWS account to try and reproduce, I won't be able to give it a try. I also notice that you are triggering this build from your IDE (Netbeans?). Can you give it a try outside of the IDE, from the command line and see if there's any improvement?
FYI - you can run AWS Lambda locally, it doesn't require an AWS account - the SAM CLI mounts a docker container (Quarkus Amazon Lambda guide has good docs on this).
By the way, the
classlist
phase taking 24 seconds is extremely high. That's a sign that it perhaps has picked up way too many classes/jars in the classpath. Unfortunately, given that this requires a AWS account to try and reproduce, I won't be able to give it a try. I also notice that you are triggering this build from your IDE (Netbeans?). Can you give it a try outside of the IDE, from the command line and see if there's any improvement?
Is this because of all these extra index-dependencies added in the application.properties
? @privatejava May I ask why have added all the libraries to the Jandex index?
There was another user with a similar issue. I could reproduce that issue. I have added a suggestion to that issue here #10589 (comment). Can you follow that one and give it a try and see if that helps (make sure you are on
20.1.0
of GraalVM to try that)?
I tried that build args and now it is showing some output unlike before. But there are now a lot of error messages. It seems i need to now follow some standards according to graalvm for class initialization. I have put my native compilation error logs at here : https://gist.github.com/privatejava/b64260713e0374db98e94ebfdb1adfdd
By the way, the
classlist
phase taking 24 seconds is extremely high. That's a sign that it perhaps has picked up way too many classes/jars in the classpath. Unfortunately, given that this requires a AWS account to try and reproduce, I won't be able to give it a try. I also notice that you are triggering this build from your IDE (Netbeans?). Can you give it a try outside of the IDE, from the command line and see if there's any improvement?Is this because of all these extra index-dependencies added in the
application.properties
? @privatejava May I ask why have added all the libraries to the Jandex index?
Because so that it would not complain about the aws dependency compatibility. eg.
[WARNING] [io.quarkus.deployment.steps.ReflectiveHierarchyStep] Unable to properly register the hierarchy of the following classes for reflection as they are not in the Jandex index:
- javax.crypto.Cipher (source: com.mkflow.service.ProvisionService[com.mkflow.model.Server provision(com.mkflow.model.Server server)])
- javax.crypto.Mac (source: com.mkflow.service.ProvisionService[com.mkflow.model.Server provision(com.mkflow.model.Server server)])
- org.apache.logging.log4j.Logger (source: com.mkflow.service.ProvisionService[com.mkflow.model.Server provision(com.mkflow.model.Server server)])
- software.amazon.awssdk.services.ec2.Ec2Client (source: com.mkflow.service.ProvisionService[com.mkflow.model.Server provision(com.mkflow.model.Server server)])
- software.amazon.awssdk.services.ec2.model.Instance (source: com.mkflow.service.ProvisionService[com.mkflow.model.Server provision(com.mkflow.model.Server server)])
- software.amazon.awssdk.services.ec2.model.Subnet (source: com.mkflow.service.ProvisionService[com.mkflow.model.Server provision(com.mkflow.model.Server server)])
- software.amazon.awssdk.services.ec2.model.Vpc (source: com.mkflow.service.ProvisionService[com.mkflow.model.Server provision(com.mkflow.model.Server server)])
There was another user with a similar issue. I could reproduce that issue. I have added a suggestion to that issue here #10589 (comment). Can you follow that one and give it a try and see if that helps (make sure you are on
20.1.0
of GraalVM to try that)?I tried that build args and now it is showing some output unlike before. But there are now a lot of error messages. It seems i need to now follow some standards according to graalvm for class initialization. I have put my native compilation error logs at here : https://gist.github.com/privatejava/b64260713e0374db98e94ebfdb1adfdd
Finally I fixed the issue , I have replaced log4j with slf4j and also fixed the JGit using quarkus extension's jgit dependency. @jaikiran that one really helped me thank you
I deployed today that lambda to AWS but now there is again another problem :
| 2020-07-14T10:45:14.542+05:45 | --/ __ \/ / / / _ \| / _ \/ //_/ / / / __/
| 2020-07-14T10:45:14.542+05:45 | -/ /_/ / /_/ / __ \|/ , _/ ,< / /_/ /\ \
| 2020-07-14T10:45:14.542+05:45 | --\___\_\____/_/ \|_/_/\|_/_/\|_\|\____/___/
| 2020-07-14T10:45:14.542+05:45 | 2020-07-14 05:00:14,542 ERROR [io.qua.application] (main) Failed to start application: com.oracle.svm.core.jdk.UnsupportedFeatureError: Target_java_lang_ClassLoader.getClassLoadingLock(String)
| 2020-07-14T10:45:14.542+05:45 | at com.oracle.svm.core.util.VMError.unsupportedFeature(VMError.java:86)
| 2020-07-14T10:45:14.542+05:45 | at java.lang.ClassLoader.getClassLoadingLock(ClassLoader.java:275)
| 2020-07-14T10:45:14.542+05:45 | at com.fasterxml.jackson.module.afterburner.util.MyClassLoader.loadAndResolve(MyClassLoader.java:76)
| 2020-07-14T10:45:14.542+05:45 | at com.fasterxml.jackson.module.afterburner.deser.PropertyMutatorCollector.generateMutatorClass(PropertyMutatorCollector.java:176)
| 2020-07-14T10:45:14.542+05:45 | at com.fasterxml.jackson.module.afterburner.deser.PropertyMutatorCollector.buildMutator(PropertyMutatorCollector.java:102)
| 2020-07-14T10:45:14.542+05:45 | at com.fasterxml.jackson.module.afterburner.deser.DeserializerModifier.updateBuilder(DeserializerModifier.java:62)
| 2020-07-14T10:45:14.542+05:45 | at com.fasterxml.jackson.databind.deser.BeanDeserializerFactory.buildBeanDeserializer(BeanDeserializerFactory.java:244)
| 2020-07-14T10:45:14.542+05:45 | at com.fasterxml.jackson.databind.deser.BeanDeserializerFactory.createBeanDeserializer(BeanDeserializerFactory.java:143)
| 2020-07-14T10:45:14.542+05:45 | at com.fasterxml.jackson.databind.deser.DeserializerCache._createDeserializer2(DeserializerCache.java:414)
| 2020-07-14T10:45:14.542+05:45 | at com.fasterxml.jackson.databind.deser.DeserializerCache._createDeserializer(DeserializerCache.java:349)
| 2020-07-14T10:45:14.542+05:45 | at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCache2(DeserializerCache.java:264)
| 2020-07-14T10:45:14.542+05:45 | at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCacheValueDeserializer(DeserializerCache.java:244)
| 2020-07-14T10:45:14.542+05:45 | at com.fasterxml.jackson.databind.deser.DeserializerCache.findValueDeserializer(DeserializerCache.java:142)
| 2020-07-14T10:45:14.542+05:45 | at com.fasterxml.jackson.databind.DeserializationContext.findRootValueDeserializer(DeserializationContext.java:491)
| 2020-07-14T10:45:14.542+05:45 | at com.fasterxml.jackson.databind.ObjectReader._prefetchRootDeserializer(ObjectReader.java:2432)
| 2020-07-14T10:45:14.542+05:45 | at com.fasterxml.jackson.databind.ObjectReader.<init>(ObjectReader.java:191)
| 2020-07-14T10:45:14.542+05:45 | at com.fasterxml.jackson.databind.ObjectMapper._newReader(ObjectMapper.java:719)
| 2020-07-14T10:45:14.542+05:45 | at com.fasterxml.jackson.databind.ObjectMapper.readerFor(ObjectMapper.java:3939)
| 2020-07-14T10:45:14.542+05:45 | at io.quarkus.amazon.lambda.runtime.AmazonLambdaRecorder.setHandlerClass(AmazonLambdaRecorder.java:48)
| 2020-07-14T10:45:14.542+05:45 | at io.quarkus.deployment.steps.AmazonLambdaProcessor$recordHandlerClass-1619263778.deploy_0(AmazonLambdaProcessor$recordHandlerClass-1619263778.zig:82)
| 2020-07-14T10:45:14.542+05:45 | at io.quarkus.deployment.steps.AmazonLambdaProcessor$recordHandlerClass-1619263778.deploy(AmazonLambdaProcessor$recordHandlerClass-1619263778.zig:36)
| 2020-07-14T10:45:14.542+05:45 | at io.quarkus.runner.ApplicationImpl.doStart(ApplicationImpl.zig:498)
| 2020-07-14T10:45:14.542+05:45 | at io.quarkus.runtime.Application.start(Application.java:90)
| 2020-07-14T10:45:14.542+05:45 | at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:91)
| 2020-07-14T10:45:14.542+05:45 | at io.quarkus.runtime.Quarkus.run(Quarkus.java:61)
| 2020-07-14T10:45:14.542+05:45 | at io.quarkus.runtime.Quarkus.run(Quarkus.java:38)
| 2020-07-14T10:45:14.542+05:45 | at io.quarkus.runner.GeneratedMain.main(GeneratedMain.zig:30)
| 2020-07-14T10:45:14.544+05:45 | 2020-07-14 05:00:14,544 ERROR [io.qua.run.Application] (main) Error running Quarkus application: java.lang.RuntimeException: Failed to start quarkus
| 2020-07-14T10:45:14.544+05:45 | at io.quarkus.runner.ApplicationImpl.doStart(ApplicationImpl.zig:575)
| 2020-07-14T10:45:14.544+05:45 | at io.quarkus.runtime.Application.start(Application.java:90)
| 2020-07-14T10:45:14.544+05:45 | at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:91)
| 2020-07-14T10:45:14.544+05:45 | at io.quarkus.runtime.Quarkus.run(Quarkus.java:61)
| 2020-07-14T10:45:14.544+05:45 | at io.quarkus.runtime.Quarkus.run(Quarkus.java:38)
| 2020-07-14T10:45:14.544+05:45 | at io.quarkus.runner.GeneratedMain.main(GeneratedMain.zig:30)
| 2020-07-14T10:45:14.544+05:45 | Caused by: com.oracle.svm.core.jdk.UnsupportedFeatureError: Target_java_lang_ClassLoader.getClassLoadingLock(String)
| 2020-07-14T10:45:14.544+05:45 | at com.oracle.svm.core.util.VMError.unsupportedFeature(VMError.java:86)
| 2020-07-14T10:45:14.544+05:45 | at java.lang.ClassLoader.getClassLoadingLock(ClassLoader.java:275)
| 2020-07-14T10:45:14.544+05:45 | at com.fasterxml.jackson.module.afterburner.util.MyClassLoader.loadAndResolve(MyClassLoader.java:76)
| 2020-07-14T10:45:14.544+05:45 | at com.fasterxml.jackson.module.afterburner.deser.PropertyMutatorCollector.generateMutatorClass(PropertyMutatorCollector.java:176)
| 2020-07-14T10:45:14.544+05:45 | at com.fasterxml.jackson.module.afterburner.deser.PropertyMutatorCollector.buildMutator(PropertyMutatorCollector.java:102)
| 2020-07-14T10:45:14.544+05:45 | at com.fasterxml.jackson.module.afterburner.deser.DeserializerModifier.updateBuilder(DeserializerModifier.java:62)
| 2020-07-14T10:45:14.544+05:45 | at com.fasterxml.jackson.databind.deser.BeanDeserializerFactory.buildBeanDeserializer(BeanDeserializerFactory.java:244)
| 2020-07-14T10:45:14.544+05:45 | at com.fasterxml.jackson.databind.deser.BeanDeserializerFactory.createBeanDeserializer(BeanDeserializerFactory.java:143)
| 2020-07-14T10:45:14.544+05:45 | at com.fasterxml.jackson.databind.deser.DeserializerCache._createDeserializer2(DeserializerCache.java:414)
| 2020-07-14T10:45:14.544+05:45 | at com.fasterxml.jackson.databind.deser.DeserializerCache._createDeserializer(DeserializerCache.java:349)
| 2020-07-14T10:45:14.544+05:45 | at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCache2(DeserializerCache.java:264)
| 2020-07-14T10:45:14.544+05:45 | at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCacheValueDeserializer(DeserializerCache.java:244)
| 2020-07-14T10:45:14.544+05:45 | at com.fasterxml.jackson.databind.deser.DeserializerCache.findValueDeserializer(DeserializerCache.java:142)
| 2020-07-14T10:45:14.544+05:45 | at com.fasterxml.jackson.databind.DeserializationContext.findRootValueDeserializer(DeserializationContext.java:491)
| 2020-07-14T10:45:14.544+05:45 | at com.fasterxml.jackson.databind.ObjectReader._prefetchRootDeserializer(ObjectReader.java:2432)
| 2020-07-14T10:45:14.544+05:45 | at com.fasterxml.jackson.databind.ObjectReader.<init>(ObjectReader.java:191)
| 2020-07-14T10:45:14.544+05:45 | at com.fasterxml.jackson.databind.ObjectMapper._newReader(ObjectMapper.java:719)
| 2020-07-14T10:45:14.544+05:45 | at com.fasterxml.jackson.databind.ObjectMapper.readerFor(ObjectMapper.java:3939)
| 2020-07-14T10:45:14.544+05:45 | at io.quarkus.amazon.lambda.runtime.AmazonLambdaRecorder.setHandlerClass(AmazonLambdaRecorder.java:48)
| 2020-07-14T10:45:14.544+05:45 | at io.quarkus.deployment.steps.AmazonLambdaProcessor$recordHandlerClass-1619263778.deploy_0(AmazonLambdaProcessor$recordHandlerClass-1619263778.zig:82)
| 2020-07-14T10:45:14.544+05:45 | at io.quarkus.deployment.steps.AmazonLambdaProcessor$recordHandlerClass-1619263778.deploy(AmazonLambdaProcessor$recordHandlerClass-1619263778.zig:36)
| 2020-07-14T10:45:14.544+05:45 | at io.quarkus.runner.ApplicationImpl.doStart(ApplicationImpl.zig:498)
| 2020-07-14T10:45:14.544+05:45 | ... 5 more
Hi @privatejava I downloaded your project to understand why you had all the Jandex additions, and whilst compiling I noticed you have a lot of unresolved dependency conflicts, which look like the cause of this error. Can I suggest you exclude any transitive dependencies, and ensure the Quarkus versions are being used? This is true for the way you are importing AWS libraries also, this is included in the Quarkus BOM. You're using a lot of dynamic proxies that require reflection, which is a little against the AOT model, is there another way to do what you're trying to achieve? I notice also you had the IP address of your SSH server hardcoded, I know you have a security group to protect you, but nevertheless be careful there.
Are you familiar with AWS SAM CLI, you can test all of this locally, and indeed there is a test harness that's possible per the AWS Lambda Quarkus Guide, that's generated via the Maven Archetype. This may help you with the pom.xml structure also, as that is the first thing I would do when looking at your project is remove some of the extras that are already imported by the Quarkus BOM. The test harness uses the same code (via the JVM) that the native version does - the native version has a bootstrap process that's slightly different as AWS wraps the JVM version -- when you use the test harness on the JVM it's the same code.
Hi @oztimpower thanks for the effort. I really appreciate it. Yes, there are a lot of things that I kept public in a git repository but none of them is persistent as it gets deleted automatically by this same application. As this is not good practice for the opensource project but soon I will clear everything.
I removed all other BOM but Quarkus and now the dependencies got resolved for some but not all. So for those, unresolved I have updated them by providing <version>
for each.
I already had deployed other small apps with Quarkus using Lambda in past but this one is kind of problem because it is a big one with many dependencies. I even removed some dependencies but it just does not work in Lambda. The standalone (desktop native) version works flawlessly. I looked to one of the issue similar to ours in Micronauts: https://github.com/micronaut-projects/micronaut-aws/issues/49#issuecomment-534136559 but still with no clue on the results. There is just the same exception of Caused by: com.oracle.svm.core.jdk.UnsupportedFeatureError: Target_java_lang_ClassLoader.getClassLoadingLock(String)
in AWS Lambda execution.
After doing close look up at that error . I came to know it is coming from amazon ec2 HTTP library. We already have quarqified Amazon Ec2 right ?
com.amazonaws.http.conn.ClientConnectionManagerFactory$Handler.invoke(ClientConnectionManagerFactory.java:76)
Error: com.oracle.svm.hosted.substitute.DeletedElementException: Unsupported method java.lang.ClassLoader.defineClass1(ClassLoader, String, byte[], int, int, ProtectionDomain, String) is reachable
To diagnose the issue, you can add the option --report-unsupported-elements-at-runtime. The unsupported element is then reported at run time when it is accessed the first time.
Detailed message:
Trace:
at parsing java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
Call path from entry point to java.lang.ClassLoader.defineClass(String, byte[], int, int, ProtectionDomain):
at java.lang.ClassLoader.defineClass(ClassLoader.java:1015)
at java.lang.ClassLoader.defineClass(ClassLoader.java:878)
at com.oracle.svm.reflect.ClassLoader_defineClass_c6c343b4d6dc22ca64eb2d8503b13ac9c340dcb3_65.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Method.java:566)
at com.amazonaws.http.conn.ClientConnectionManagerFactory$Handler.invoke(ClientConnectionManagerFactory.java:76)
at com.sun.proxy.$Proxy250.hashCode(Unknown Source)
at java.util.HashMap.hash(HashMap.java:339)
at java.util.HashMap.get(HashMap.java:552)
at com.oracle.svm.jni.access.JNIReflectionDictionary.getLinkage(JNIReflectionDictionary.java:145)
at com.oracle.svm.jni.functions.JNIFunctions.RegisterNatives(JNIFunctions.java:350)
at com.oracle.svm.core.code.IsolateEnterStub.JNIFunctions_RegisterNatives_7728ce15b57af339792ad95c60f247990e0df65e(generated:0)
com.oracle.svm.core.util.UserError$UserException: com.oracle.svm.hosted.substitute.DeletedElementException: Unsupported method java.lang.ClassLoader.defineClass1(ClassLoader, String, byte[], int, int, ProtectionDomain, String) is reachable
To diagnose the issue, you can add the option --report-unsupported-elements-at-runtime. The unsupported element is then reported at run time when it is accessed the first time.
Detailed message:
Trace:
at parsing java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
Call path from entry point to java.lang.ClassLoader.defineClass(String, byte[], int, int, ProtectionDomain):
at java.lang.ClassLoader.defineClass(ClassLoader.java:1015)
at java.lang.ClassLoader.defineClass(ClassLoader.java:878)
at com.oracle.svm.reflect.ClassLoader_defineClass_c6c343b4d6dc22ca64eb2d8503b13ac9c340dcb3_65.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Method.java:566)
at com.amazonaws.http.conn.ClientConnectionManagerFactory$Handler.invoke(ClientConnectionManagerFactory.java:76)
at com.sun.proxy.$Proxy250.hashCode(Unknown Source)
at java.util.HashMap.hash(HashMap.java:339)
at java.util.HashMap.get(HashMap.java:552)
at com.oracle.svm.jni.access.JNIReflectionDictionary.getLinkage(JNIReflectionDictionary.java:145)
at com.oracle.svm.jni.functions.JNIFunctions.RegisterNatives(JNIFunctions.java:350)
at com.oracle.svm.core.code.IsolateEnterStub.JNIFunctions_RegisterNatives_7728ce15b57af339792ad95c60f247990e0df65e(generated:0)
at com.oracle.svm.core.util.UserError.abort(UserError.java:79)
at com.oracle.svm.hosted.FallbackFeature.reportAsFallback(FallbackFeature.java:217)
at com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:753)
at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:538)
at com.oracle.svm.hosted.NativeImageGenerator.lambda$run$0(NativeImageGenerator.java:451)
at java.base/java.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1407)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)
Caused by: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: com.oracle.svm.hosted.substitute.DeletedElementException: Unsupported method java.lang.ClassLoader.defineClass1(ClassLoader, String, byte[], int, int, ProtectionDomain, String) is reachable
To diagnose the issue, you can add the option --report-unsupported-elements-at-runtime. The unsupported element is then reported at run time when it is accessed the first time.
Detailed message:
Trace:
at parsing java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
Call path from entry point to java.lang.ClassLoader.defineClass(String, byte[], int, int, ProtectionDomain):
at java.lang.ClassLoader.defineClass(ClassLoader.java:1015)
at java.lang.ClassLoader.defineClass(ClassLoader.java:878)
at com.oracle.svm.reflect.ClassLoader_defineClass_c6c343b4d6dc22ca64eb2d8503b13ac9c340dcb3_65.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Method.java:566)
at com.amazonaws.http.conn.ClientConnectionManagerFactory$Handler.invoke(ClientConnectionManagerFactory.java:76)
at com.sun.proxy.$Proxy250.hashCode(Unknown Source)
at java.util.HashMap.hash(HashMap.java:339)
at java.util.HashMap.get(HashMap.java:552)
at com.oracle.svm.jni.access.JNIReflectionDictionary.getLinkage(JNIReflectionDictionary.java:145)
at com.oracle.svm.jni.functions.JNIFunctions.RegisterNatives(JNIFunctions.java:350)
at com.oracle.svm.core.code.IsolateEnterStub.JNIFunctions_RegisterNatives_7728ce15b57af339792ad95c60f247990e0df65e(generated:0)
at com.oracle.graal.pointsto.constraints.UnsupportedFeatures.report(UnsupportedFeatures.java:126)
at com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:750)
... 8 more
Caused by: com.oracle.svm.hosted.substitute.DeletedElementException: Unsupported method java.lang.ClassLoader.defineClass1(ClassLoader, String, byte[], int, int, ProtectionDomain, String) is reachable
To diagnose the issue, you can add the option --report-unsupported-elements-at-runtime. The unsupported element is then reported at run time when it is accessed the first time.
at com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.lookup(AnnotationSubstitutionProcessor.java:183)
at com.oracle.graal.pointsto.infrastructure.SubstitutionProcessor$ChainedSubstitutionProcessor.lookup(SubstitutionProcessor.java:128)
at com.oracle.graal.pointsto.infrastructure.SubstitutionProcessor$ChainedSubstitutionProcessor.lookup(SubstitutionProcessor.java:128)
at com.oracle.graal.pointsto.meta.AnalysisUniverse.lookupAllowUnresolved(AnalysisUniverse.java:397)
at com.oracle.graal.pointsto.infrastructure.WrappedConstantPool.lookupMethod(WrappedConstantPool.java:116)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.lookupMethodInPool(BytecodeParser.java:4323)
at com.oracle.svm.hosted.phases.SharedGraphBuilderPhase$SharedBytecodeParser.lookupMethodInPool(SharedGraphBuilderPhase.java:107)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.lookupMethod(BytecodeParser.java:4317)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.genInvokeStatic(BytecodeParser.java:1659)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.processBytecode(BytecodeParser.java:5340)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.iterateBytecodesForBlock(BytecodeParser.java:3423)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.processBlock(BytecodeParser.java:3230)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.build(BytecodeParser.java:1088)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.buildRootMethod(BytecodeParser.java:982)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.GraphBuilderPhase$Instance.run(GraphBuilderPhase.java:84)
at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.run(Phase.java:49)
at jdk.internal.vm.compiler/org.graalvm.compiler.phases.BasePhase.apply(BasePhase.java:214)
at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.apply(Phase.java:42)
at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.apply(Phase.java:38)
at com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.parse(MethodTypeFlowBuilder.java:225)
at com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.apply(MethodTypeFlowBuilder.java:352)
at com.oracle.graal.pointsto.flow.MethodTypeFlow.doParse(MethodTypeFlow.java:322)
at com.oracle.graal.pointsto.flow.MethodTypeFlow.ensureParsed(MethodTypeFlow.java:311)
at com.oracle.graal.pointsto.flow.MethodTypeFlow.addContext(MethodTypeFlow.java:112)
at com.oracle.graal.pointsto.DefaultAnalysisPolicy$DefaultSpecialInvokeTypeFlow.onObservedUpdate(DefaultAnalysisPolicy.java:373)
at com.oracle.graal.pointsto.flow.TypeFlow.notifyObservers(TypeFlow.java:470)
at com.oracle.graal.pointsto.flow.TypeFlow.update(TypeFlow.java:542)
at com.oracle.graal.pointsto.BigBang$2.run(BigBang.java:530)
at com.oracle.graal.pointsto.util.CompletionExecutor.lambda$execute$0(CompletionExecutor.java:173)
at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1426)
... 5 more
Error: Image build request failed with exit status 1
com.oracle.svm.driver.NativeImage$NativeImageError: Image build request failed with exit status 1
at com.oracle.svm.driver.NativeImage.showError(NativeImage.java:1541)
at com.oracle.svm.driver.NativeImage.build(NativeImage.java:1299)
at com.oracle.svm.driver.NativeImage.performBuild(NativeImage.java:1260)
at com.oracle.svm.driver.NativeImage.main(NativeImage.java:1219)
at com.oracle.svm.driver.NativeImage$JDK9Plus.main(NativeImage.java:1722)
AWS SDK v2 is supported and there are specific Quarkus modules.
The package you highlight is AWS SDK v1 which is not supported.
AWS SDK v2 is supported and there are specific Quarkus modules.
The package you highlight is AWS SDK v1 which is not supported.
Hi @oztimpower ,
Yes you were right, I removed aws logs dependency and the codes and now there is another exception: Now the exception is coming from resteasy which seems odd: org.jboss.resteasy.core.ContextParameterInjector$GenericDelegatingProxy.invoke(ContextParameterInjector.java:122)
Printing analysis results stats to /home/ec2-user/target/mkflow-1.0-SNAPSHOT-native-image-source-jar/reports/analysis_stats_mkflow-1.0-SNAPSHOT-runner_20200714_160543.txt
Error: com.oracle.svm.hosted.substitute.DeletedElementException: Unsupported method java.lang.ClassLoader.defineClass1(ClassLoader, String, byte[], int, int, ProtectionDomain, String) is reachable
To diagnose the issue, you can add the option --report-unsupported-elements-at-runtime. The unsupported element is then reported at run time when it is accessed the first time.
Detailed message:
Trace:
at parsing java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
Call path from entry point to java.lang.ClassLoader.defineClass(String, byte[], int, int, ProtectionDomain):
at java.lang.ClassLoader.defineClass(ClassLoader.java:1015)
at java.lang.ClassLoader.defineClass(ClassLoader.java:878)
at com.oracle.svm.reflect.ClassLoader_defineClass_c6c343b4d6dc22ca64eb2d8503b13ac9c340dcb3_63.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Method.java:566)
at org.jboss.resteasy.core.ContextParameterInjector$GenericDelegatingProxy.invoke(ContextParameterInjector.java:122)
at com.sun.proxy.$Proxy20.hashCode(Unknown Source)
at java.util.HashMap.hash(HashMap.java:339)
at java.util.HashMap.get(HashMap.java:552)
at com.oracle.svm.jni.access.JNIReflectionDictionary.getLinkage(JNIReflectionDictionary.java:145)
at com.oracle.svm.jni.functions.JNIFunctions.RegisterNatives(JNIFunctions.java:350)
at com.oracle.svm.core.code.IsolateEnterStub.JNIFunctions_RegisterNatives_7728ce15b57af339792ad95c60f247990e0df65e(generated:0)
com.oracle.svm.core.util.UserError$UserException: com.oracle.svm.hosted.substitute.DeletedElementException: Unsupported method java.lang.ClassLoader.defineClass1(ClassLoader, String, byte[], int, int, ProtectionDomain, String) is reachable
To diagnose the issue, you can add the option --report-unsupported-elements-at-runtime. The unsupported element is then reported at run time when it is accessed the first time.
Detailed message:
Trace:
at parsing java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
Call path from entry point to java.lang.ClassLoader.defineClass(String, byte[], int, int, ProtectionDomain):
at java.lang.ClassLoader.defineClass(ClassLoader.java:1015)
at java.lang.ClassLoader.defineClass(ClassLoader.java:878)
at com.oracle.svm.reflect.ClassLoader_defineClass_c6c343b4d6dc22ca64eb2d8503b13ac9c340dcb3_63.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Method.java:566)
at org.jboss.resteasy.core.ContextParameterInjector$GenericDelegatingProxy.invoke(ContextParameterInjector.java:122)
at com.sun.proxy.$Proxy20.hashCode(Unknown Source)
at java.util.HashMap.hash(HashMap.java:339)
at java.util.HashMap.get(HashMap.java:552)
at com.oracle.svm.jni.access.JNIReflectionDictionary.getLinkage(JNIReflectionDictionary.java:145)
at com.oracle.svm.jni.functions.JNIFunctions.RegisterNatives(JNIFunctions.java:350)
at com.oracle.svm.core.code.IsolateEnterStub.JNIFunctions_RegisterNatives_7728ce15b57af339792ad95c60f247990e0df65e(generated:0)
at com.oracle.svm.core.util.UserError.abort(UserError.java:79)
at com.oracle.svm.hosted.FallbackFeature.reportAsFallback(FallbackFeature.java:217)
at com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:753)
at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:538)
at com.oracle.svm.hosted.NativeImageGenerator.lambda$run$0(NativeImageGenerator.java:451)
at java.base/java.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1407)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)
Caused by: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: com.oracle.svm.hosted.substitute.DeletedElementException: Unsupported method java.lang.ClassLoader.defineClass1(ClassLoader, String, byte[], int, int, ProtectionDomain, String) is reachable
To diagnose the issue, you can add the option --report-unsupported-elements-at-runtime. The unsupported element is then reported at run time when it is accessed the first time.
Detailed message:
Trace:
at parsing java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
Call path from entry point to java.lang.ClassLoader.defineClass(String, byte[], int, int, ProtectionDomain):
at java.lang.ClassLoader.defineClass(ClassLoader.java:1015)
at java.lang.ClassLoader.defineClass(ClassLoader.java:878)
at com.oracle.svm.reflect.ClassLoader_defineClass_c6c343b4d6dc22ca64eb2d8503b13ac9c340dcb3_63.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Method.java:566)
at org.jboss.resteasy.core.ContextParameterInjector$GenericDelegatingProxy.invoke(ContextParameterInjector.java:122)
at com.sun.proxy.$Proxy20.hashCode(Unknown Source)
at java.util.HashMap.hash(HashMap.java:339)
at java.util.HashMap.get(HashMap.java:552)
at com.oracle.svm.jni.access.JNIReflectionDictionary.getLinkage(JNIReflectionDictionary.java:145)
at com.oracle.svm.jni.functions.JNIFunctions.RegisterNatives(JNIFunctions.java:350)
at com.oracle.svm.core.code.IsolateEnterStub.JNIFunctions_RegisterNatives_7728ce15b57af339792ad95c60f247990e0df65e(generated:0)
at com.oracle.graal.pointsto.constraints.UnsupportedFeatures.report(UnsupportedFeatures.java:126)
at com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:750)
... 8 more
Caused by: com.oracle.svm.hosted.substitute.DeletedElementException: Unsupported method java.lang.ClassLoader.defineClass1(ClassLoader, String, byte[], int, int, ProtectionDomain, String) is reachable
To diagnose the issue, you can add the option --report-unsupported-elements-at-runtime. The unsupported element is then reported at run time when it is accessed the first time.
at com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.lookup(AnnotationSubstitutionProcessor.java:183)
at com.oracle.graal.pointsto.infrastructure.SubstitutionProcessor$ChainedSubstitutionProcessor.lookup(SubstitutionProcessor.java:128)
at com.oracle.graal.pointsto.infrastructure.SubstitutionProcessor$ChainedSubstitutionProcessor.lookup(SubstitutionProcessor.java:128)
at com.oracle.graal.pointsto.meta.AnalysisUniverse.lookupAllowUnresolved(AnalysisUniverse.java:397)
at com.oracle.graal.pointsto.infrastructure.WrappedConstantPool.lookupMethod(WrappedConstantPool.java:116)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.lookupMethodInPool(BytecodeParser.java:4323)
at com.oracle.svm.hosted.phases.SharedGraphBuilderPhase$SharedBytecodeParser.lookupMethodInPool(SharedGraphBuilderPhase.java:107)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.lookupMethod(BytecodeParser.java:4317)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.genInvokeStatic(BytecodeParser.java:1659)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.processBytecode(BytecodeParser.java:5340)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.iterateBytecodesForBlock(BytecodeParser.java:3423)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.processBlock(BytecodeParser.java:3230)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.build(BytecodeParser.java:1088)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.buildRootMethod(BytecodeParser.java:982)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.GraphBuilderPhase$Instance.run(GraphBuilderPhase.java:84)
at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.run(Phase.java:49)
at jdk.internal.vm.compiler/org.graalvm.compiler.phases.BasePhase.apply(BasePhase.java:214)
at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.apply(Phase.java:42)
at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.apply(Phase.java:38)
at com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.parse(MethodTypeFlowBuilder.java:225)
at com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.apply(MethodTypeFlowBuilder.java:352)
at com.oracle.graal.pointsto.flow.MethodTypeFlow.doParse(MethodTypeFlow.java:322)
at com.oracle.graal.pointsto.flow.MethodTypeFlow.ensureParsed(MethodTypeFlow.java:311)
at com.oracle.graal.pointsto.flow.MethodTypeFlow.addContext(MethodTypeFlow.java:112)
at com.oracle.graal.pointsto.DefaultAnalysisPolicy$DefaultSpecialInvokeTypeFlow.onObservedUpdate(DefaultAnalysisPolicy.java:373)
at com.oracle.graal.pointsto.flow.TypeFlow.notifyObservers(TypeFlow.java:470)
at com.oracle.graal.pointsto.flow.TypeFlow.update(TypeFlow.java:542)
at com.oracle.graal.pointsto.BigBang$2.run(BigBang.java:530)
at com.oracle.graal.pointsto.util.CompletionExecutor.lambda$execute$0(CompletionExecutor.java:173)
at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1426)
... 5 more
Error: Image build request failed with exit status 1
com.oracle.svm.driver.NativeImage$NativeImageError: Image build request failed with exit status 1
at com.oracle.svm.driver.NativeImage.showError(NativeImage.java:1541)
at com.oracle.svm.driver.NativeImage.build(NativeImage.java:1299)
at com.oracle.svm.driver.NativeImage.performBuild(NativeImage.java:1260)
at com.oracle.svm.driver.NativeImage.main(NativeImage.java:1219)
at com.oracle.svm.driver.NativeImage$JDK9Plus.main(NativeImage.java:1722)
Describe the bug I have created a project which runs good in desktop and I wanted to run it in AWS Lambda Environment so to do that I did exactly same procedure according to the guide. But the compilation never completes even after 2 hours so I have to quit the build. I build another project with very tiny dependencies and it builds and deployed correctly. However not this project. The project is opensource and pushed to https://github.com/privatejava/mkflow
Expected behavior The build should have been completed within 5-15 minutes according to my computer specs. I have 24GiB RAM, AMD Fx-8350 eight-core processors.
Actual behavior The build runs continuously with full processor usage for like 2 hours and going on and on.
To Reproduce Steps to reproduce the behavior:
Configuration
Screenshots
(If applicable, add screenshots to help explain your problem.)
Environment (please complete the following information):
Ubuntu 18.04 LTS: Linux server 4.15.0-109-generic #110-Ubuntu SMP Tue Jun 23 02:39:32 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
GraalVM CE 20.1.0
1.5.1.Final
mvnw --version
orgradlew --version
):Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Additional context I have used Graalvm latest dev version as well but it was the same.