vlsi / vlsi-release-plugins

A set of plugins to simplify Gradle release tasks
Apache License 2.0
41 stars 13 forks source link

After upgrade to gradle 8.x com.github.vlsi.jandex.JandexWork fails with CIRCULAR REFERENCE ArrayIndexOutOfBoundsException #67

Closed snuyanzin closed 1 year ago

snuyanzin commented 1 year ago

an example of failure

2023-05-13T07:52:53.2691550Z             Suppressed: com.github.vlsi.jandex.JandexFileParseException: /home/runner/work/calcite/calcite/core/build/classes/java/main/org/apache/calcite/sql/fun/SqlInternalOperators$2.class
2023-05-13T07:52:53.2692405Z                 at com.github.vlsi.jandex.JandexWork.execute(JandexWork.kt:62)
2023-05-13T07:52:53.2693377Z                 at org.gradle.workers.internal.DefaultWorkerServer.execute(DefaultWorkerServer.java:63)
2023-05-13T07:52:53.2694403Z                 at org.gradle.workers.internal.AbstractClassLoaderWorker$1.create(AbstractClassLoaderWorker.java:54)
2023-05-13T07:52:53.2695449Z                 at org.gradle.workers.internal.AbstractClassLoaderWorker$1.create(AbstractClassLoaderWorker.java:48)
2023-05-13T07:52:53.2696532Z                 at org.gradle.internal.classloader.ClassLoaderUtils.executeInClassloader(ClassLoaderUtils.java:100)
2023-05-13T07:52:53.2697734Z                 at org.gradle.workers.internal.AbstractClassLoaderWorker.executeInClassLoader(AbstractClassLoaderWorker.java:48)
2023-05-13T07:52:53.2698879Z                 at org.gradle.workers.internal.IsolatedClassloaderWorker.run(IsolatedClassloaderWorker.java:49)
2023-05-13T07:52:53.2699928Z                 at org.gradle.workers.internal.IsolatedClassloaderWorker.run(IsolatedClassloaderWorker.java:30)
2023-05-13T07:52:53.2701086Z                 at org.gradle.workers.internal.IsolatedClassloaderWorkerFactory$1.lambda$execute$0(IsolatedClassloaderWorkerFactory.java:57)
2023-05-13T07:52:53.2702247Z                 at org.gradle.workers.internal.AbstractWorker$1.call(AbstractWorker.java:44)
2023-05-13T07:52:53.2703292Z                 at org.gradle.workers.internal.AbstractWorker$1.call(AbstractWorker.java:41)
2023-05-13T07:52:53.2704422Z                 at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
2023-05-13T07:52:53.2745007Z                 at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199)
2023-05-13T07:52:53.2746434Z                 at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
2023-05-13T07:52:53.2748086Z                 at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
2023-05-13T07:52:53.2749242Z                 at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
2023-05-13T07:52:53.2750428Z                 at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
2023-05-13T07:52:53.2751578Z                 at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
2023-05-13T07:52:53.2752736Z                 at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)
2023-05-13T07:52:53.2753908Z                 at org.gradle.workers.internal.AbstractWorker.executeWrappedInBuildOperation(AbstractWorker.java:41)
2023-05-13T07:52:53.2755119Z                 at org.gradle.workers.internal.IsolatedClassloaderWorkerFactory$1.execute(IsolatedClassloaderWorkerFactory.java:49)
2023-05-13T07:52:53.2756251Z                 at org.gradle.workers.internal.DefaultWorkerExecutor.lambda$submitWork$0(DefaultWorkerExecutor.java:169)
2023-05-13T07:52:53.2757156Z                 at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
2023-05-13T07:52:53.2758219Z                 at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.runExecution(DefaultConditionalExecutionQueue.java:187)
2023-05-13T07:52:53.2759475Z                 at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.access$700(DefaultConditionalExecutionQueue.java:120)
2023-05-13T07:52:53.2760690Z                 at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner$1.run(DefaultConditionalExecutionQueue.java:162)
2023-05-13T07:52:53.2761618Z                 at org.gradle.internal.Factories$1.create(Factories.java:31)
2023-05-13T07:52:53.2762549Z                 at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:249)
2023-05-13T07:52:53.2763703Z                 at org.gradle.internal.work.DefaultWorkerLeaseService.runAsWorkerThread(DefaultWorkerLeaseService.java:109)
2023-05-13T07:52:53.2764884Z                 at org.gradle.internal.work.DefaultWorkerLeaseService.runAsWorkerThread(DefaultWorkerLeaseService.java:114)
2023-05-13T07:52:53.2766100Z                 at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.runBatch(DefaultConditionalExecutionQueue.java:157)
2023-05-13T07:52:53.2767313Z                 at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.run(DefaultConditionalExecutionQueue.java:126)
2023-05-13T07:52:53.2768321Z                 at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
2023-05-13T07:52:53.2769114Z                 at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
2023-05-13T07:52:53.2770046Z                 at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
2023-05-13T07:52:53.2771203Z                 at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:49)
2023-05-13T07:52:53.2772182Z                 at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
2023-05-13T07:52:53.2773122Z                 at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
2023-05-13T07:52:53.2773876Z                 at java.base/java.lang.Thread.run(Thread.java:829)
2023-05-13T07:52:53.2774562Z                 Caused by: [CIRCULAR REFERENCE ArrayIndexOutOfBoundsException]

also more logs are available at https://github.com/snuyanzin/calcite/actions/runs/4965785970/jobs/8886823521

vlsi commented 1 year ago

It does not look like JandexWork issue to me:

You might want trying to bump jandex tool version: https://github.com/vlsi/vlsi-release-plugins/blob/08e0523468aaf59fe4a9c1558418b8e281d1ee0f/plugins/jandex-plugin/src/main/kotlin/com/github/vlsi/jandex/JandexExtension.kt#L26

Please check the bytecode manually, and then follow up with Jandex team (https://github.com/smallrye/jandex) if the bytecode is valid or with your Java vendor if the bytecode is invalid.

Feel free to reopen if you really think it is vlsi-release-plugins-related

                Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0
                    at org.jboss.jandex.Indexer.updateTypeTarget(Indexer.java:898)
                    at org.jboss.jandex.Indexer.updateTypeTargets(Indexer.java:630)
                    at org.jboss.jandex.Indexer.index(Indexer.java:1698)
                    at com.github.vlsi.jandex.JandexWork.execute(JandexWork.kt:58)
Caused by: com.github.vlsi.jandex.JandexException: Unable to process 65 files. It might be caused by invalid bytecode in the class file or a defect in org.jboss:jandex; You might analyze the bytecode with the following command: javap -verbose -p <ClassName.class>; Unable to parse the following files: /home/runner/work/calcite/calcite/core/build/classes/java/main/org/apache/calcite/jdbc/MetadataSchema$1.class, /home/runner/work/calcite/calcite/core/build/classes/java/main/org/apache/calcite/jdbc/MetadataSchema$2.class, /home/runner/work/calcite/calcite/core/build/classes/java/main/org/apache/calcite/plan/RelOptUtil$9.class, /home/runner/work/calcite/calcite/core/build/classes/java/main/org/apache/calcite/plan/volcano/VolcanoCost$1.class, /home/runner/work/calcite/calcite/core/build/classes/java/main/org/apache/calcite/plan/volcano/VolcanoCost$2.class, /home/runner/work/calcite/calcite/core/build/classes/java/main/org/apache/calcite/plan/volcano/VolcanoCost$3.class, /home/runner/work/calcite/calcite/core/build/classes/java/main/org/apache/calcite/plan/volcano/VolcanoCost$4.class, 
...