The following test failed in the JDK18 CI:
tools/jpackage/share/jdk/jpackage/tests/MainClassTest.java
Here's a snippet from the log file:
[14:32:40.863] Command [PID: -1]:
jlink --output ./test.bc3c1980/output/MainClassTest.app/Contents/runtime/Contents/Home --module-path /System/Volumes/Data/mesos/work_dir/jib-master/install/jdk-18+31-2042/macosx-aarch64.jdk/jdk-18.jdk/Contents/Home/jmods --add-modules java.rmi,jdk.management.jfr,jdk.jdi,jdk.charsets,jdk.xml.dom,java.xml,java.datatransfer,jdk.jstatd,jdk.httpserver,java.desktop,java.security.sasl,jdk.zipfs,java.base,jdk.crypto.ec,jdk.javadoc,jdk.management.agent,jdk.jshell,jdk.editpad,jdk.jsobject,jdk.sctp,java.sql.rowset,jdk.unsupported,jdk.jlink,java.smartcardio,java.security.jgss,java.compiler,jdk.nio.mapmode,jdk.dynalink,jdk.unsupported.desktop,jdk.accessibility,jdk.security.jgss,jdk.incubator.vector,java.sql,java.xml.crypto,java.logging,java.transaction.xa,jdk.jfr,jdk.crypto.cryptoki,jdk.net,jdk.random,java.naming,jdk.internal.ed,java.prefs,java.net.http,jdk.compiler,jdk.naming.rmi,jdk.internal.opt,jdk.jconsole,jdk.attach,jdk.internal.le,java.management,jdk.jdwp.agent,jdk.incubator.foreign,jdk.internal.jvmstat,java.instrument,jdk.management,jdk.security.auth,java.scripting,jdk.jdeps,jdk.jartool,java.management.rmi,jdk.jpackage,jdk.naming.dns,jdk.localedata --strip-native-commands --strip-debug --no-man-pages --no-header-files
[14:32:40.863] Output:
WARNING: Using incubator modules: jdk.incubator.vector, jdk.incubator.foreign
Error: java.lang.ArrayIndexOutOfBoundsException: Index 53672 out of bounds for length 19949
java.io.IOException: java.lang.ArrayIndexOutOfBoundsException: Index 53672 out of bounds for length 19949
at jdk.jlink/jdk.tools.jlink.internal.ImageFileCreator.generateJImage(ImageFileCreator.java:194)
at jdk.jlink/jdk.tools.jlink.internal.ImageFileCreator.writeImage(ImageFileCreator.java:163)
at jdk.jlink/jdk.tools.jlink.internal.ImageFileCreator.create(ImageFileCreator.java:100)
at jdk.jlink/jdk.tools.jlink.internal.JlinkTask$ImageHelper.retrieve(JlinkTask.java:871)
at jdk.jlink/jdk.tools.jlink.internal.ImagePluginStack.operate(ImagePluginStack.java:194)
at jdk.jlink/jdk.tools.jlink.internal.JlinkTask.createImage(JlinkTask.java:436)
at jdk.jlink/jdk.tools.jlink.internal.JlinkTask.run(JlinkTask.java:276)
at jdk.jlink/jdk.tools.jlink.internal.Main.run(Main.java:55)
at jdk.jlink/jdk.tools.jlink.internal.Main$JlinkToolProvider.run(Main.java:66)
at jdk.jpackage/jdk.jpackage.internal.JLinkBundlerHelper.runJLink(JLinkBundlerHelper.java:191)
at jdk.jpackage/jdk.jpackage.internal.JLinkBundlerHelper.execute(JLinkBundlerHelper.java:81)
at jdk.jpackage/jdk.jpackage.internal.AppImageBundler.createAppBundle(AppImageBundler.java:166)
at jdk.jpackage/jdk.jpackage.internal.AppImageBundler.execute(AppImageBundler.java:91)
at jdk.jpackage/jdk.jpackage.internal.Arguments.generateBundle(Arguments.java:689)
at jdk.jpackage/jdk.jpackage.internal.Arguments.processArguments(Arguments.java:561)
at jdk.jpackage/jdk.jpackage.main.Main.execute(Main.java:91)
at jdk.jpackage/jdk.jpackage.main.Main.main(Main.java:52)
Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 53672 out of bounds for length 19949
at java.base/jdk.internal.org.objectweb.asm.ClassReader.<init>(ClassReader.java:247)
at java.base/jdk.internal.org.objectweb.asm.ClassReader.<init>(ClassReader.java:208)
at java.base/jdk.internal.org.objectweb.asm.ClassReader.<init>(ClassReader.java:194)
at jdk.jlink/jdk.tools.jlink.internal.plugins.AbstractPlugin.newClassReader(AbstractPlugin.java:88)
at jdk.jlink/jdk.tools.jlink.internal.plugins.StripJavaDebugAttributesPlugin.lambda$transform$1(StripJavaDebugAttributesPlugin.java:62)
at jdk.jlink/jdk.tools.jlink.plugin.ResourcePool.lambda$transformAndCopy$0(ResourcePool.java:112)
at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133)
at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1845)
at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762)
at jdk.jlink/jdk.tools.jlink.plugin.ResourcePool.transformAndCopy(ResourcePool.java:111)
at jdk.jlink/jdk.tools.jlink.internal.plugins.StripJavaDebugAttributesPlugin.transform(StripJavaDebugAttributesPlugin.java:54)
at jdk.jlink/jdk.tools.jlink.internal.plugins.DefaultStripDebugPlugin.transform(DefaultStripDebugPlugin.java:76)
at jdk.jlink/jdk.tools.jlink.internal.ImagePluginStack.visitResources(ImagePluginStack.java:262)
at jdk.jlink/jdk.tools.jlink.internal.ImageFileCreator.generateJImage(ImageFileCreator.java:184)
... 16 more
[14:32:40.864] Returned: 1
[14:32:40.865] jdk.jpackage.internal.PackagerException: jlink failed with: WARNING: Using incubator modules: jdk.incubator.vector, jdk.incubator.foreign
Error: java.lang.ArrayIndexOutOfBoundsException: Index 53672 out of bounds for length 19949
java.io.IOException: java.lang.ArrayIndexOutOfBoundsException: Index 53672 out of bounds for length 19949
at jdk.jlink/jdk.tools.jlink.internal.ImageFileCreator.generateJImage(ImageFileCreator.java:194)
at jdk.jlink/jdk.tools.jlink.internal.ImageFileCreator.writeImage(ImageFileCreator.java:163)
at jdk.jlink/jdk.tools.jlink.internal.ImageFileCreator.create(ImageFileCreator.java:100)
at jdk.jlink/jdk.tools.jlink.internal.JlinkTask$ImageHelper.retrieve(JlinkTask.java:871)
at jdk.jlink/jdk.tools.jlink.internal.ImagePluginStack.operate(ImagePluginStack.java:194)
at jdk.jlink/jdk.tools.jlink.internal.JlinkTask.createImage(JlinkTask.java:436)
at jdk.jlink/jdk.tools.jlink.internal.JlinkTask.run(JlinkTask.java:276)
at jdk.jlink/jdk.tools.jlink.internal.Main.run(Main.java:55)
at jdk.jlink/jdk.tools.jlink.internal.Main$JlinkToolProvider.run(Main.java:66)
at jdk.jpackage/jdk.jpackage.internal.JLinkBundlerHelper.runJLink(JLinkBundlerHelper.java:191)
at jdk.jpackage/jdk.jpackage.internal.JLinkBundlerHelper.execute(JLinkBundlerHelper.java:81)
at jdk.jpackage/jdk.jpackage.internal.AppImageBundler.createAppBundle(AppImageBundler.java:166)
at jdk.jpackage/jdk.jpackage.internal.AppImageBundler.execute(AppImageBundler.java:91)
at jdk.jpackage/jdk.jpackage.internal.Arguments.generateBundle(Arguments.java:689)
at jdk.jpackage/jdk.jpackage.internal.Arguments.processArguments(Arguments.java:561)
at jdk.jpackage/jdk.jpackage.main.Main.execute(Main.java:91)
at jdk.jpackage/jdk.jpackage.main.Main.main(Main.java:52)
Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 53672 out of bounds for length 19949
at java.base/jdk.internal.org.objectweb.asm.ClassReader.<init>(ClassReader.java:247)
at java.base/jdk.internal.org.objectweb.asm.ClassReader.<init>(ClassReader.java:208)
at java.base/jdk.internal.org.objectweb.asm.ClassReader.<init>(ClassReader.java:194)
at jdk.jlink/jdk.tools.jlink.internal.plugins.AbstractPlugin.newClassReader(AbstractPlugin.java:88)
at jdk.jlink/jdk.tools.jlink.internal.plugins.StripJavaDebugAttributesPlugin.lambda$transform$1(StripJavaDebugAttributesPlugin.java:62)
at jdk.jlink/jdk.tools.jlink.plugin.ResourcePool.lambda$transformAndCopy$0(ResourcePool.java:112)
at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133)
at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1845)
at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762)
at jdk.jlink/jdk.tools.jlink.plugin.ResourcePool.transformAndCopy(ResourcePool.java:111)
at jdk.jlink/jdk.tools.jlink.internal.plugins.StripJavaDebugAttributesPlugin.transform(StripJavaDebugAttributesPlugin.java:54)
at jdk.jlink/jdk.tools.jlink.internal.plugins.DefaultStripDebugPlugin.transform(DefaultStripDebugPlugin.java:76)
at jdk.jlink/jdk.tools.jlink.internal.ImagePluginStack.visitResources(ImagePluginStack.java:262)
at jdk.jlink/jdk.tools.jlink.internal.ImageFileCreator.generateJImage(ImageFileCreator.java:184)
... 16 more
at jdk.jpackage/jdk.jpackage.internal.JLinkBundlerHelper.runJLink(JLinkBundlerHelper.java:199)
at jdk.jpackage/jdk.jpackage.internal.JLinkBundlerHelper.execute(JLinkBundlerHelper.java:81)
at jdk.jpackage/jdk.jpackage.internal.AppImageBundler.createAppBundle(AppImageBundler.java:166)
at jdk.jpackage/jdk.jpackage.internal.AppImageBundler.execute(AppImageBundler.java:91)
at jdk.jpackage/jdk.jpackage.internal.Arguments.generateBundle(Arguments.java:689)
at jdk.jpackage/jdk.jpackage.internal.Arguments.processArguments(Arguments.java:561)
at jdk.jpackage/jdk.jpackage.main.Main.execute(Main.java:91)
at jdk.jpackage/jdk.jpackage.main.Main.main(Main.java:52)
[14:32:40.887] TRACE: exec: Done. Exit code: 1
[14:32:40.888] ERROR: Expected [0]. Actual [1]: Check command [/System/Volumes/Data/mesos/work_dir/jib-master/install/jdk-18+31-2042/macosx-aarch64.jdk/jdk-18.jdk/Contents/Home/bin/jpackage --input ./test.bc3c1980/input --dest ./test.bc3c1980/output --name MainClassTest --type app-image --main-jar hello.jar --main-class test.ThereIsNoSuchClass -J-Djlink.debug=true --verbose](15) exited with 0 code
[14:32:40.889] [ FAILED ] MainClassTest(modular=n; main-class=b; jar-main-class=b; jlink=y).test; checks=6
tools/jpackage/share/jdk/jpackage/tests/MainClassTest.java
Here's a snippet from the log file:
[14:32:40.863] Command [PID: -1]:
jlink --output ./test.bc3c1980/output/MainClassTest.app/Contents/runtime/Contents/Home --module-path /System/Volumes/Data/mesos/work_dir/jib-master/install/jdk-18+31-2042/macosx-aarch64.jdk/jdk-18.jdk/Contents/Home/jmods --add-modules java.rmi,jdk.management.jfr,jdk.jdi,jdk.charsets,jdk.xml.dom,java.xml,java.datatransfer,jdk.jstatd,jdk.httpserver,java.desktop,java.security.sasl,jdk.zipfs,java.base,jdk.crypto.ec,jdk.javadoc,jdk.management.agent,jdk.jshell,jdk.editpad,jdk.jsobject,jdk.sctp,java.sql.rowset,jdk.unsupported,jdk.jlink,java.smartcardio,java.security.jgss,java.compiler,jdk.nio.mapmode,jdk.dynalink,jdk.unsupported.desktop,jdk.accessibility,jdk.security.jgss,jdk.incubator.vector,java.sql,java.xml.crypto,java.logging,java.transaction.xa,jdk.jfr,jdk.crypto.cryptoki,jdk.net,jdk.random,java.naming,jdk.internal.ed,java.prefs,java.net.http,jdk.compiler,jdk.naming.rmi,jdk.internal.opt,jdk.jconsole,jdk.attach,jdk.internal.le,java.management,jdk.jdwp.agent,jdk.incubator.foreign,jdk.internal.jvmstat,java.instrument,jdk.management,jdk.security.auth,java.scripting,jdk.jdeps,jdk.jartool,java.management.rmi,jdk.jpackage,jdk.naming.dns,jdk.localedata --strip-native-commands --strip-debug --no-man-pages --no-header-files
[14:32:40.863] Output:
WARNING: Using incubator modules: jdk.incubator.vector, jdk.incubator.foreign
Error: java.lang.ArrayIndexOutOfBoundsException: Index 53672 out of bounds for length 19949
java.io.IOException: java.lang.ArrayIndexOutOfBoundsException: Index 53672 out of bounds for length 19949
at jdk.jlink/jdk.tools.jlink.internal.ImageFileCreator.generateJImage(ImageFileCreator.java:194)
at jdk.jlink/jdk.tools.jlink.internal.ImageFileCreator.writeImage(ImageFileCreator.java:163)
at jdk.jlink/jdk.tools.jlink.internal.ImageFileCreator.create(ImageFileCreator.java:100)
at jdk.jlink/jdk.tools.jlink.internal.JlinkTask$ImageHelper.retrieve(JlinkTask.java:871)
at jdk.jlink/jdk.tools.jlink.internal.ImagePluginStack.operate(ImagePluginStack.java:194)
at jdk.jlink/jdk.tools.jlink.internal.JlinkTask.createImage(JlinkTask.java:436)
at jdk.jlink/jdk.tools.jlink.internal.JlinkTask.run(JlinkTask.java:276)
at jdk.jlink/jdk.tools.jlink.internal.Main.run(Main.java:55)
at jdk.jlink/jdk.tools.jlink.internal.Main$JlinkToolProvider.run(Main.java:66)
at jdk.jpackage/jdk.jpackage.internal.JLinkBundlerHelper.runJLink(JLinkBundlerHelper.java:191)
at jdk.jpackage/jdk.jpackage.internal.JLinkBundlerHelper.execute(JLinkBundlerHelper.java:81)
at jdk.jpackage/jdk.jpackage.internal.AppImageBundler.createAppBundle(AppImageBundler.java:166)
at jdk.jpackage/jdk.jpackage.internal.AppImageBundler.execute(AppImageBundler.java:91)
at jdk.jpackage/jdk.jpackage.internal.Arguments.generateBundle(Arguments.java:689)
at jdk.jpackage/jdk.jpackage.internal.Arguments.processArguments(Arguments.java:561)
at jdk.jpackage/jdk.jpackage.main.Main.execute(Main.java:91)
at jdk.jpackage/jdk.jpackage.main.Main.main(Main.java:52)
Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 53672 out of bounds for length 19949
at java.base/jdk.internal.org.objectweb.asm.ClassReader.<init>(ClassReader.java:247)
at java.base/jdk.internal.org.objectweb.asm.ClassReader.<init>(ClassReader.java:208)
at java.base/jdk.internal.org.objectweb.asm.ClassReader.<init>(ClassReader.java:194)
at jdk.jlink/jdk.tools.jlink.internal.plugins.AbstractPlugin.newClassReader(AbstractPlugin.java:88)
at jdk.jlink/jdk.tools.jlink.internal.plugins.StripJavaDebugAttributesPlugin.lambda$transform$1(StripJavaDebugAttributesPlugin.java:62)
at jdk.jlink/jdk.tools.jlink.plugin.ResourcePool.lambda$transformAndCopy$0(ResourcePool.java:112)
at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133)
at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1845)
at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762)
at jdk.jlink/jdk.tools.jlink.plugin.ResourcePool.transformAndCopy(ResourcePool.java:111)
at jdk.jlink/jdk.tools.jlink.internal.plugins.StripJavaDebugAttributesPlugin.transform(StripJavaDebugAttributesPlugin.java:54)
at jdk.jlink/jdk.tools.jlink.internal.plugins.DefaultStripDebugPlugin.transform(DefaultStripDebugPlugin.java:76)
at jdk.jlink/jdk.tools.jlink.internal.ImagePluginStack.visitResources(ImagePluginStack.java:262)
at jdk.jlink/jdk.tools.jlink.internal.ImageFileCreator.generateJImage(ImageFileCreator.java:184)
... 16 more
[14:32:40.864] Returned: 1
[14:32:40.865] jdk.jpackage.internal.PackagerException: jlink failed with: WARNING: Using incubator modules: jdk.incubator.vector, jdk.incubator.foreign
Error: java.lang.ArrayIndexOutOfBoundsException: Index 53672 out of bounds for length 19949
java.io.IOException: java.lang.ArrayIndexOutOfBoundsException: Index 53672 out of bounds for length 19949
at jdk.jlink/jdk.tools.jlink.internal.ImageFileCreator.generateJImage(ImageFileCreator.java:194)
at jdk.jlink/jdk.tools.jlink.internal.ImageFileCreator.writeImage(ImageFileCreator.java:163)
at jdk.jlink/jdk.tools.jlink.internal.ImageFileCreator.create(ImageFileCreator.java:100)
at jdk.jlink/jdk.tools.jlink.internal.JlinkTask$ImageHelper.retrieve(JlinkTask.java:871)
at jdk.jlink/jdk.tools.jlink.internal.ImagePluginStack.operate(ImagePluginStack.java:194)
at jdk.jlink/jdk.tools.jlink.internal.JlinkTask.createImage(JlinkTask.java:436)
at jdk.jlink/jdk.tools.jlink.internal.JlinkTask.run(JlinkTask.java:276)
at jdk.jlink/jdk.tools.jlink.internal.Main.run(Main.java:55)
at jdk.jlink/jdk.tools.jlink.internal.Main$JlinkToolProvider.run(Main.java:66)
at jdk.jpackage/jdk.jpackage.internal.JLinkBundlerHelper.runJLink(JLinkBundlerHelper.java:191)
at jdk.jpackage/jdk.jpackage.internal.JLinkBundlerHelper.execute(JLinkBundlerHelper.java:81)
at jdk.jpackage/jdk.jpackage.internal.AppImageBundler.createAppBundle(AppImageBundler.java:166)
at jdk.jpackage/jdk.jpackage.internal.AppImageBundler.execute(AppImageBundler.java:91)
at jdk.jpackage/jdk.jpackage.internal.Arguments.generateBundle(Arguments.java:689)
at jdk.jpackage/jdk.jpackage.internal.Arguments.processArguments(Arguments.java:561)
at jdk.jpackage/jdk.jpackage.main.Main.execute(Main.java:91)
at jdk.jpackage/jdk.jpackage.main.Main.main(Main.java:52)
Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 53672 out of bounds for length 19949
at java.base/jdk.internal.org.objectweb.asm.ClassReader.<init>(ClassReader.java:247)
at java.base/jdk.internal.org.objectweb.asm.ClassReader.<init>(ClassReader.java:208)
at java.base/jdk.internal.org.objectweb.asm.ClassReader.<init>(ClassReader.java:194)
at jdk.jlink/jdk.tools.jlink.internal.plugins.AbstractPlugin.newClassReader(AbstractPlugin.java:88)
at jdk.jlink/jdk.tools.jlink.internal.plugins.StripJavaDebugAttributesPlugin.lambda$transform$1(StripJavaDebugAttributesPlugin.java:62)
at jdk.jlink/jdk.tools.jlink.plugin.ResourcePool.lambda$transformAndCopy$0(ResourcePool.java:112)
at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133)
at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1845)
at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762)
at jdk.jlink/jdk.tools.jlink.plugin.ResourcePool.transformAndCopy(ResourcePool.java:111)
at jdk.jlink/jdk.tools.jlink.internal.plugins.StripJavaDebugAttributesPlugin.transform(StripJavaDebugAttributesPlugin.java:54)
at jdk.jlink/jdk.tools.jlink.internal.plugins.DefaultStripDebugPlugin.transform(DefaultStripDebugPlugin.java:76)
at jdk.jlink/jdk.tools.jlink.internal.ImagePluginStack.visitResources(ImagePluginStack.java:262)
at jdk.jlink/jdk.tools.jlink.internal.ImageFileCreator.generateJImage(ImageFileCreator.java:184)
... 16 more
at jdk.jpackage/jdk.jpackage.internal.JLinkBundlerHelper.runJLink(JLinkBundlerHelper.java:199)
at jdk.jpackage/jdk.jpackage.internal.JLinkBundlerHelper.execute(JLinkBundlerHelper.java:81)
at jdk.jpackage/jdk.jpackage.internal.AppImageBundler.createAppBundle(AppImageBundler.java:166)
at jdk.jpackage/jdk.jpackage.internal.AppImageBundler.execute(AppImageBundler.java:91)
at jdk.jpackage/jdk.jpackage.internal.Arguments.generateBundle(Arguments.java:689)
at jdk.jpackage/jdk.jpackage.internal.Arguments.processArguments(Arguments.java:561)
at jdk.jpackage/jdk.jpackage.main.Main.execute(Main.java:91)
at jdk.jpackage/jdk.jpackage.main.Main.main(Main.java:52)
[14:32:40.887] TRACE: exec: Done. Exit code: 1
[14:32:40.888] ERROR: Expected [0]. Actual [1]: Check command [/System/Volumes/Data/mesos/work_dir/jib-master/install/jdk-18+31-2042/macosx-aarch64.jdk/jdk-18.jdk/Contents/Home/bin/jpackage --input ./test.bc3c1980/input --dest ./test.bc3c1980/output --name MainClassTest --type app-image --main-jar hello.jar --main-class test.ThereIsNoSuchClass -J-Djlink.debug=true --verbose](15) exited with 0 code
[14:32:40.889] [ FAILED ] MainClassTest(modular=n; main-class=b; jar-main-class=b; jlink=y).test; checks=6
- duplicates
-
JDK-8282954 java.util.zip reader intermittently fails with a jmod file
- Closed
- relates to
-
JDK-8277058 [macos] tools/jpackage/macosx/NameWithSpaceTest.java failed NameWithSpaceTest.test
- Open
-
JDK-8282954 java.util.zip reader intermittently fails with a jmod file
- Closed
-
JDK-8282535 Corrupted class files on OSX aarch64
- Closed
-
JDK-8282564 tools/jpackage/share/LicenseTest.java#id0 fails with "ArrayIndexOutOfBoundsException: arraycopy: last source index 9642141 out of bounds for byte[14056]"
- Closed
There are no Sub-Tasks for this issue.