Open rsvoboda opened 8 months ago
/cc @Sanne (core), @aloubyansky (core), @gsmet (core), @radcortez (core), @stuartwdouglas (core)
@zakkak @jerboaa @rsvoboda which application should I be using to ensure any potential fixes keep the Truffle functionality working?
I have no idea, sorry.
Me neither. The support was added on @chumer's request in https://github.com/quarkusio/quarkus/issues/36242
Hopefully Christian can help. I would start by using the reproducer from https://github.com/quarkusio/quarkus/issues/36242.
Hopefully Christian can help. I would start by using the reproducer from https://github.com/quarkusio/quarkus/issues/36242.
Can this be used as is with Quarkus 3.8? I am asking because of the Truffle dependencies. Nothing should change from our perspective?
Can this be used as is with Quarkus 3.8?
I gave it a go (by updating the POM file to use Quarkus 3.8.0 and graal-sdk 23.1.2) and I am getting:
java.lang.ClassNotFoundException: org.graalvm.polyglot.impl.AbstractPolyglotImpl
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1027)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150)
at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:862)
at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:760)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:681)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:639)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
at io.quarkus.bootstrap.classloading.QuarkusClassLoader.loadClass(QuarkusClassLoader.java:496)
at io.quarkus.bootstrap.classloading.QuarkusClassLoader.loadClass(QuarkusClassLoader.java:468)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:534)
at java.base/java.lang.Class.forName(Class.java:513)
at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.nextProviderClass(ServiceLoader.java:1217)
at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1228)
at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1273)
at java.base/java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1309)
at java.base/java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1393)
at org.graalvm.polyglot.Engine$1.searchServiceLoader(Engine.java:1735)
at org.graalvm.polyglot.Engine$1.run(Engine.java:1712)
at org.graalvm.polyglot.Engine$1.run(Engine.java:1707)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:319)
at org.graalvm.polyglot.Engine.initEngineImpl(Engine.java:1707)
at org.graalvm.polyglot.Engine$ImplHolder.<clinit>(Engine.java:190)
at org.graalvm.polyglot.Engine.getImpl(Engine.java:442)
at org.graalvm.polyglot.Engine$Builder.build(Engine.java:740)
at org.graalvm.polyglot.Context$Builder.build(Context.java:1925)
at org.graalvm.polyglot.Context.create(Context.java:979)
at org.quarkus.GreetingResource.hello(GreetingResource.java:15)
at org.quarkus.GreetingResource$quarkusrestinvoker$hello_e747664148511e1e5212d3e0f4b40d45c56ab8a1.invoke(Unknown Source)
at org.jboss.resteasy.reactive.server.handlers.InvocationHandler.handle(InvocationHandler.java:29)
at io.quarkus.resteasy.reactive.server.runtime.QuarkusResteasyReactiveRequestContext.invokeHandler(QuarkusResteasyReactiveRequestContext.java:141)
at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.run(AbstractResteasyReactiveContext.java:147)
at io.quarkus.vertx.core.runtime.VertxCoreRecorder$14.runWith(VertxCoreRecorder.java:582)
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)
at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:29)
at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:29)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:1583)
Resulted in: java.lang.NoClassDefFoundError: org/graalvm/polyglot/impl/AbstractPolyglotImpl
... 41 more
So not sure...
Yeah...
Hello @geoand, could you please provide some updates, when can we expect fixes for that and may be there is workaround this String too large to record
issue without awaiting of your fix? We need org.graalvm.polyglot
dependency in our project and we wanted to upgrade to LTS 3.8.3.
Thanks!
@rodion-lezhnyuk-tealium do you have a sample application I can try?
There is a super simple fix that I can make to get over the basic problem, but as I know there are other problems after that one is solved, I would like to be able to test things out on a sample.
Hi @geoand, thanks for the response. Sorry, I can't share the application as it's a private company repository. Could you please provide commit example on another repository so I can do same things but in my project?
Hi,
I don't need the actual application, just something that contains the proper dependencies and some sample code that causes the problem.
Hi @geoand, here is a repository with sample code which reproduces a bug. I put some descrption to readme.md
, please check this out. Feel free to contact me in case of any questions :)
Thanks, I'll have a look tomorrow
https://github.com/quarkusio/quarkus/pull/40549 is the fix to the immediate issue but I still need a reproducer that uses Quarkus and Truffle in order to come up with a final / complete fix
Hi @geoand, thanks a lot for the fix, appreciate it a lot. Got few questions regarding the fix: 1) Are you planning to merge this fix into the 3.8.3 LTS version of the library, or it will be merged only to the latest version of quarkus? 2) Could you provide an approximate estimate of when that fix will be available in one of artifacts? 3) Is it possible to not await for artifact release and apply this fix in our project via some buildstep replacement mechanism (I'm not sure that quarkus supports that) or some other way?
Hi,
Are you planning to merge this fix into the 3.8.3 LTS version of the library, or it will be merged only to the latest version of quarkus?
Yes, that's what the triage backport-3.8
label is meant to signify.
Could you provide an approximate estimate of when that fix will be available in one of artifacts?
Unfortunately I cannot.
Is it possible to not await for artifact release and apply this fix in our project via some buildstep replacement mechanism (I'm not sure that quarkus supports that) or some other way?
If you have truffle on the classpath, there is no way around it
@geoand thanks for the response, in case it would be helpful for someone, here is an example PR which fixes this issue on project side (not the framework side) https://github.com/rodion-lezhnyuk-tealium/quarkus-absolute-classpath-sample/pull/1
it simply replaces the classes with the fix that you provided above
Describe the bug
Absolute classpath gets recorded in ClassPathSystemPropBuildStep, used for "Make Truffle from GraalVM 23.1 work in all Quarkus modes" fix
This was noticed by @geoand as part of https://github.com/quarkusio/quarkus/issues/39350 discussions
https://github.com/quarkusio/quarkus/blob/main/core/deployment/src/main/java/io/quarkus/deployment/steps/ClassPathSystemPropBuildStep.java#L49
When graal-sdk 23.1 is on the classpath, one can see error like this (please check
Caused by
part):Expected behavior
According to https://github.com/quarkusio/quarkus/issues/39350#issuecomment-1991063557 absolute paths should not be recorded
Actual behavior
Absolute CP is passed
How to Reproduce?
graal-sdk
dependency to your app, use Quarkus 999-SNAPSHOTmvn clean verify
on the sample appAlternatively you can use reproducer from https://github.com/quarkusio/quarkus/issues/39350 but make sure to use Quarkus main revision before merging the fix, but with graal-sdk version set to 23.1.
Output of
uname -a
orver
macOS
Output of
java -version
Java 21
Quarkus version or git rev
Quarkus main 4ca065f
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response