quarkus: JPAFunctionalityInGraalITCase.verifyJdkXmlParsersHavebeenEcludedFromNative test fails with GraalVM 22.3.0-dev
Describe the bug
This last worked with quarkus revision 4f53bdd6f377edcc783e3a91b3ea3e24794cfc81. So some change between 4f53bdd6f377edcc783e3a91b3ea3e24794cfc81 and bc451819b26ba4a084349ebdac3532e732b618ae caused this issue to appear.
When running the jpa-postgresql integration test in native mode with a recent GraalVM 22.3 dev build the integration test fails with:
31.11MB (51.20%) for image heap: 368,388 objects and 188 resources
320.08KB ( 0.51%) for other data
60.76MB in total
------------------------------------------------------------------------------------------------------------------------
Top 10 packages in code area: Top 10 object types in image heap:
1.63MB sun.security.ssl 6.61MB byte[] for code metadata
1018.06KB java.util 3.78MB java.lang.Class
719.84KB com.sun.crypto.provider 3.48MB java.lang.String
573.59KB org.hibernate.hql.internal.antlr 2.96MB byte[] for general heap data
551.30KB java.lang.invoke 2.87MB byte[] for java.lang.String
492.49KB org.postgresql.jdbc 1.33MB com.oracle.svm.core.hub.DynamicHubCompanion
454.82KB java.lang 1004.02KB byte[] for embedded resources
452.09KB sun.security.x509 755.10KB byte[] for reflection metadata
441.80KB c.s.org.apache.xerces.internal.impl.xs.traversers 709.55KB java.util.HashMap$Node
429.57KB java.util.concurrent 698.82KB java.lang.String[]
22.33MB for 688 more packages 6.16MB for 3674 more object types
------------------------------------------------------------------------------------------------------------------------
8.0s (5.1% of total time) in 38 GCs | Peak RSS: 6.52GB | CPU load: 6.10
------------------------------------------------------------------------------------------------------------------------
Produced artifacts:
/home/sgehwolf/Documents/openjdk/quarkus/quarkus-source/integration-tests/jpa-postgresql/target/quarkus-integration-test-jpa-postgresql-999-SNAPSHOT-native-image-source-jar/quarkus-integration-test-jpa-postgresql-999-SNAPSHOT-runner (executable)
/home/sgehwolf/Documents/openjdk/quarkus/quarkus-source/integration-tests/jpa-postgresql/target/quarkus-integration-test-jpa-postgresql-999-SNAPSHOT-native-image-source-jar/quarkus-integration-test-jpa-postgresql-999-SNAPSHOT-runner-build-output-stats.json (json)
/home/sgehwolf/Documents/openjdk/quarkus/quarkus-source/integration-tests/jpa-postgresql/target/quarkus-integration-test-jpa-postgresql-999-SNAPSHOT-native-image-source-jar/quarkus-integration-test-jpa-postgresql-999-SNAPSHOT-runner-timing-stats.json (raw)
/home/sgehwolf/Documents/openjdk/quarkus/quarkus-source/integration-tests/jpa-postgresql/target/quarkus-integration-test-jpa-postgresql-999-SNAPSHOT-native-image-source-jar/quarkus-integration-test-jpa-postgresql-999-SNAPSHOT-runner.build_artifacts.txt (txt)
========================================================================================================================
Finished generating 'quarkus-integration-test-jpa-postgresql-999-SNAPSHOT-runner' in 2m 36s.
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildRunner] objcopy --strip-debug quarkus-integration-test-jpa-postgresql-999-SNAPSHOT-runner
[INFO] [io.quarkus.deployment.QuarkusAugmentor] Quarkus augmentation completed in 161196ms
[INFO]
[INFO] --- maven-failsafe-plugin:3.0.0-M7:integration-test (default) @ quarkus-integration-test-jpa-postgresql ---
[INFO] Using auto detected provider org.apache.maven.surefire.junitplatform.JUnitPlatformProvider
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running io.quarkus.it.jpa.postgresql.JPAFunctionalityInGraalITCase
2022-09-07 18:41:25,657 INFO [org.jbo.threads] (main) JBoss Threads version 3.4.2.Final
Executing "/home/sgehwolf/Documents/openjdk/quarkus/quarkus-source/integration-tests/jpa-postgresql/target/quarkus-integration-test-jpa-postgresql-999-SNAPSHOT-runner -Dquarkus.http.port=8081 -Dquarkus.http.ssl-port=8444 -Dtest.url=http://localhost:8081 -Dquarkus.log.file.path=/home/sgehwolf/Documents/openjdk/quarkus/quarkus-source/integration-tests/jpa-postgresql/target/quarkus.log -Dquarkus.log.file.enable=true"
__ ____ __ _____ ___ __ ____ ______
--/ __ \/ / / / _ | / _ \/ //_/ / / / __/
-/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \
--\___\_\____/_/ |_/_/|_/_/|_|\____/___/
2022-09-07 18:41:26,033 WARN [org.hib.eng.jdb.spi.SqlExceptionHelper] (JPA Startup Thread: <default>) SQL Warning Code: 0, SQLState: 00000
2022-09-07 18:41:26,034 WARN [org.hib.eng.jdb.spi.SqlExceptionHelper] (JPA Startup Thread: <default>) relation "person" does not exist, skipping
2022-09-07 18:41:26,034 WARN [org.hib.eng.jdb.spi.SqlExceptionHelper] (JPA Startup Thread: <default>) SQL Warning Code: 0, SQLState: 00000
2022-09-07 18:41:26,034 WARN [org.hib.eng.jdb.spi.SqlExceptionHelper] (JPA Startup Thread: <default>) schema "myschema" does not exist, skipping
2022-09-07 18:41:26,034 WARN [org.hib.eng.jdb.spi.SqlExceptionHelper] (JPA Startup Thread: <default>) SQL Warning Code: 0, SQLState: 00000
2022-09-07 18:41:26,034 WARN [org.hib.eng.jdb.spi.SqlExceptionHelper] (JPA Startup Thread: <default>) table "customer" does not exist, skipping
2022-09-07 18:41:26,035 WARN [org.hib.eng.jdb.spi.SqlExceptionHelper] (JPA Startup Thread: <default>) SQL Warning Code: 0, SQLState: 00000
2022-09-07 18:41:26,035 WARN [org.hib.eng.jdb.spi.SqlExceptionHelper] (JPA Startup Thread: <default>) table "sequencedaddress" does not exist, skipping
2022-09-07 18:41:26,035 WARN [org.hib.eng.jdb.spi.SqlExceptionHelper] (JPA Startup Thread: <default>) SQL Warning Code: 0, SQLState: 00000
2022-09-07 18:41:26,035 WARN [org.hib.eng.jdb.spi.SqlExceptionHelper] (JPA Startup Thread: <default>) sequence "addressseq" does not exist, skipping
2022-09-07 18:41:26,035 WARN [org.hib.eng.jdb.spi.SqlExceptionHelper] (JPA Startup Thread: <default>) SQL Warning Code: 0, SQLState: 00000
2022-09-07 18:41:26,035 WARN [org.hib.eng.jdb.spi.SqlExceptionHelper] (JPA Startup Thread: <default>) sequence "personseq" does not exist, skipping
2022-09-07 18:41:26,036 WARN [org.hib.too.sch.int.ExceptionHandlerLoggedImpl] (JPA Startup Thread: <default>) GenerationTarget encountered exception accepting command : Error executing DDL "drop schema myschema" via JDBC Statement: org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL "drop schema myschema" via JDBC Statement
at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:67)
at org.hibernate.tool.schema.internal.SchemaDropperImpl.applySqlString(SchemaDropperImpl.java:387)
at org.hibernate.tool.schema.internal.SchemaDropperImpl.applySqlStrings(SchemaDropperImpl.java:371)
at org.hibernate.tool.schema.internal.SchemaDropperImpl.dropFromMetadata(SchemaDropperImpl.java:288)
at org.hibernate.tool.schema.internal.SchemaDropperImpl.performDrop(SchemaDropperImpl.java:156)
at org.hibernate.tool.schema.internal.SchemaDropperImpl.doDrop(SchemaDropperImpl.java:128)
at org.hibernate.tool.schema.internal.SchemaDropperImpl.doDrop(SchemaDropperImpl.java:114)
at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.performDatabaseAction(SchemaManagementToolCoordinator.java:157)
at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.process(SchemaManagementToolCoordinator.java:85)
at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:335)
at io.quarkus.hibernate.orm.runtime.boot.FastBootEntityManagerFactoryBuilder.build(FastBootEntityManagerFactoryBuilder.java:74)
at io.quarkus.hibernate.orm.runtime.FastBootHibernatePersistenceProvider.createEntityManagerFactory(FastBootHibernatePersistenceProvider.java:72)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:80)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:55)
at io.quarkus.hibernate.orm.runtime.JPAConfig$LazyPersistenceUnit.get(JPAConfig.java:165)
at io.quarkus.hibernate.orm.runtime.JPAConfig$1.run(JPAConfig.java:66)
at java.base@17.0.4/java.lang.Thread.run(Thread.java:833)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:755)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.posix.thread.PosixPlatformThreads.pthreadStartRoutine(PosixPlatformThreads.java:202)
Caused by: org.postgresql.util.PSQLException: ERROR: schema "myschema" does not exist
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2676)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2366)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:356)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:496)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:413)
at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:333)
at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:319)
at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:295)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:290)
at io.agroal.pool.wrapper.StatementWrapper.execute(StatementWrapper.java:235)
at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:54)
... 18 more
2022-09-07 18:41:26,134 INFO [io.quarkus] (main) quarkus-integration-test-jpa-postgresql 999-SNAPSHOT native (powered by Quarkus 999-SNAPSHOT) started in 0.162s. Listening on: http://0.0.0.0:8081
2022-09-07 18:41:26,134 INFO [io.quarkus] (main) Profile prod activated.
2022-09-07 18:41:26,134 INFO [io.quarkus] (main) Installed features: [agroal, cdi, hibernate-orm, jdbc-postgresql, narayana-jta, servlet, smallrye-context-propagation, vertx]
list of stored Person names:
Person with id=1, name='Gizmo', status='LIVING', address { Address with id=1, street='Street db0c083b-c7d7-4dc6-9ff1-233f329b5c2c' }
Person with id=3, name='Hibernate ORM', status='LIVING', address { Address with id=3, street='Street 6ba453f2-73e1-43f9-a760-06450f8c8f16' }
Person with id=2, name='Quarkus', status='LIVING', address { Address with id=2, street='Street ac9b621e-2ee5-4588-92a5-2841fc024160' }
List complete.
[ERROR] Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 5.638 s <<< FAILURE! - in io.quarkus.it.jpa.postgresql.JPAFunctionalityInGraalITCase
[ERROR] io.quarkus.it.jpa.postgresql.JPAFunctionalityInGraalITCase.verifyJdkXmlParsersHavebeenEcludedFromNative Time elapsed: 0.07 s <<< FAILURE!
org.opentest4j.AssertionFailedError: Type 'javax.xml.transform.TransformerFactory' was found in the report in target/quarkus-integration-test-jpa-postgresql-999-SNAPSHOT-native-image-source-jar/reports/used_classes_quarkus-integration-test-jpa-postgresql-999-SNAPSHOT-runner_20220907_184005.txt
at org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:38)
at org.junit.jupiter.api.Assertions.fail(Assertions.java:134)
at io.quarkus.test.junit.nativeimage.ClassInclusionReport.assertContainsNot(ClassInclusionReport.java:67)
at io.quarkus.test.junit.nativeimage.ClassInclusionReport.assertContainsNot(ClassInclusionReport.java:53)
at io.quarkus.it.jpa.postgresql.JPAFunctionalityInGraalITCase.verifyJdkXmlParsersHavebeenEcludedFromNative(JPAFunctionalityInGraalITCase.java:25)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:727)
at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
at io.quarkus.test.junit.QuarkusTestExtension.interceptTestMethod(QuarkusTestExtension.java:904)
at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(InterceptingExecutableInvoker.java:103)
at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.lambda$invoke$0(InterceptingExecutableInvoker.java:93)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:156)
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:147)
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:86)
at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(InterceptingExecutableInvoker.java:103)
at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.lambda$invoke$0(InterceptingExecutableInvoker.java:93)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:92)
at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:86)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$7(TestMethodTestDescriptor.java:217)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:213)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:138)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:68)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:151)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:147)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:127)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:90)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:55)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:102)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:54)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86)
at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86)
at org.apache.maven.surefire.junitplatform.LazyLauncher.execute(LazyLauncher.java:55)
at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.execute(JUnitPlatformProvider.java:223)
at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invokeAllTests(JUnitPlatformProvider.java:175)
at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:139)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:456)
at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:169)
at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:595)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:581)
[INFO] Running io.quarkus.it.jpa.postgresql.JPAReflectionInGraalITCase
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.021 s - in io.quarkus.it.jpa.postgresql.JPAReflectionInGraalITCase
[INFO]
[INFO] Results:
[INFO]
[ERROR] Failures:
[ERROR] JPAFunctionalityInGraalITCase.verifyJdkXmlParsersHavebeenEcludedFromNative:25 Type 'javax.xml.transform.TransformerFactory' was found in the report in target/quarkus-integration-test-jpa-postgresql-999-SNAPSHOT-native-image-source-jar/reports/used_classes_quarkus-integration-test-jpa-postgresql-999-SNAPSHOT-runner_20220907_184005.txt
[INFO]
[ERROR] Tests run: 3, Failures: 1, Errors: 0, Skipped: 0
We’ve first discovered it here: https://github.com/graalvm/mandrel/runs/8220972351?check_suite_focus=true
Expected behavior
JPAFunctionalityInGraalITCase.verifyJdkXmlParsersHavebeenEcludedFromNative test passes.
Actual behavior
It fails.
How to Reproduce?
Reproducer:
- Build quarkus at revision bc451819b26ba4a084349ebdac3532e732b618ae
- Download a GraalVM 22.3 dev build and set as GRAALVM_HOME
- Run
jpa-postgresqlquarkus integration test in native mode.
Output of uname -a or ver
No response
Output of java -version
17
GraalVM version (if different from Java)
22.3.0-dev
Quarkus version or git rev
bc451819b26ba4a084349ebdac3532e732b618ae
Build tool (ie. output of mvnw --version or gradlew --version)
No response
Additional information
Last worked with 4f53bdd6f377edcc783e3a91b3ea3e24794cfc81
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 19 (18 by maintainers)
Commits related to this issue
- Replace usage of NeverInline in jdbc-pgsql The previous implementation relied on a graal compiler optimization to never inline a method. By doing so it tricked native-image into not including XML pro... — committed to jerboaa/quarkus by jerboaa 2 years ago
- Replace usage of NeverInline in jdbc-pgsql The previous implementation relied on a graal compiler optimization to never inline a method. By doing so it tricked native-image into not including XML pro... — committed to gsmet/quarkus by jerboaa 2 years ago
- Replace usage of NeverInline in jdbc-pgsql The previous implementation relied on a graal compiler optimization to never inline a method. By doing so it tricked native-image into not including XML pro... — committed to igorregis/quarkus by jerboaa 2 years ago
- Replace usage of NeverInline in jdbc-pgsql The previous implementation relied on a graal compiler optimization to never inline a method. By doing so it tricked native-image into not including XML pro... — committed to igorregis/quarkus by jerboaa 2 years ago
- Replace usage of NeverInline in jdbc-pgsql The previous implementation relied on a graal compiler optimization to never inline a method. By doing so it tricked native-image into not including XML pro... — committed to igorregis/quarkus by jerboaa 2 years ago
- Replace usage of NeverInline in jdbc-pgsql The previous implementation relied on a graal compiler optimization to never inline a method. By doing so it tricked native-image into not including XML pro... — committed to igorregis/quarkus by jerboaa 2 years ago
Thanks!
Was it effective in this case, though? This particular use-case seemed very strange to me. It used reflection and
@NeverInlinein order to not pull in some code in some circumstances (reachability). Given it’s fragility, I went with the proposed solution which - to me - conveys the intent more clearly. The side effect is that another instance of relying on non-API annotations is gone.@jerboaa thanks! Well check it out more in detail next week.
Let’s not forget about the general effectiveness of these annotations?
Well that’s the whole issue - we don’t know from one release to the next how much of a problem it will be, or even if it will be a problem. All we can do is observe that the problem did exist once. And when it comes to heuristics, we cannot reliably predict the behavior even with testing because things like program size might impact (to give just one example) the number of call sites which in turn might impact the overall scoring methodology used by the inliner. So, it could be fine, or it could be quite bad.
For foundational things like logging, we can be reasonably assured that our static inline/don’t inline decisions are correct. So if we have the ability to express this, then we can therefore be assured that we won’t have a problem. Without that ability, we may or may not have a problem, and even if we don’t see a problem, users might see issues depending on environmental factors that we do not replicate.
I think your comment suggests the correct approach, and easier than drastic measures like bytecode rewriting or just hoping things work out OK.