dragonwell-project/dragonwell11

[anolis]runtime/eagerappcds/TestClassLoaderWithJVMTIAgent.java fails Error: Could not find or load main class com.alibaba.jvm.cds.Classes4CDS

Opened this issue · 1 comments

代码仓:https://gitee.com/src-anolis-sig/java-11-alibaba-dragonwell/tree/a8/

测试命令:

yum-builddep -y *.spec
mkdir -p rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS,BUILDROOT}
\cp -rf jtreg-6.1.1.zip java-11-alibaba-dragonwell.spec dragonwell-extended-11.0.21.18_jdk-11.0.21-ga.tar.gz tapsets-icedtea-6.0.0pre00-c848b93a8598.tar.xz rpmbuild/SOURCES/
time rpmbuild -ba --define "_topdir $PWD/rpmbuild"  *.spec 2>&1 | tee build.log

报错日志:

[Fingerprint Modifier] 
[0] sed
[1] -i
[2] s/ fingerprint.*//
[3] ./TestDumpAndLoadClassWithNullURL.classlist

return value: 0
Command line: [/root/java-11-alibaba-dragonwell/rpmbuild/BUILD/dragonwell11-dragonwell-extended-11.0.21.18_jdk-11.0.21-ga/build/jdk11.build-slowdebug-main/images/jdk/bin/java -cp /root/java-11-alibaba-dragonwell/rpmbuild/BUILD/dragonwell11-dragonwell-extended-11.0.21.18_jdk-11.0.21-ga/build/jdk11.build-slowdebug-main/test-support/jtreg_test_hotspot_jtreg_tier1/classes/62/runtime/eagerappcds/TestClassLoaderWithJVMTIAgent.d:/root/java-11-alibaba-dragonwell/rpmbuild/BUILD/dragonwell11-dragonwell-extended-11.0.21.18_jdk-11.0.21-ga/dragonwell/test/hotspot/jtreg/runtime/eagerappcds:/root/java-11-alibaba-dragonwell/rpmbuild/BUILD/dragonwell11-dragonwell-extended-11.0.21.18_jdk-11.0.21-ga/build/jdk11.build-slowdebug-main/test-support/jtreg_test_hotspot_jtreg_tier1/classes/62/test/lib:/root/java-11-alibaba-dragonwell/rpmbuild/BUILD/dragonwell11-dragonwell-extended-11.0.21.18_jdk-11.0.21-ga/dragonwell/test/lib:/root/java-11-alibaba-dragonwell/rpmbuild/BUILD/dragonwell11-dragonwell-extended-11.0.21.18_jdk-11.0.21-ga/build/jdk11.build-slowdebug-main/test-support/jtreg_test_hotspot_jtreg_tier1/classes/62/test/hotspot/jtreg/runtime/appcds:/root/java-11-alibaba-dragonwell/rpmbuild/BUILD/dragonwell11-dragonwell-extended-11.0.21.18_jdk-11.0.21-ga/dragonwell/test/hotspot/jtreg/runtime/appcds:/root/java-11-alibaba-dragonwell/rpmbuild/BUILD/dragonwell11-dragonwell-extended-11.0.21.18_jdk-11.0.21-ga/jtreg/lib/javatest.jar:/root/java-11-alibaba-dragonwell/rpmbuild/BUILD/dragonwell11-dragonwell-extended-11.0.21.18_jdk-11.0.21-ga/jtreg/lib/jtreg.jar -XX:MaxRAMPercentage=0.195312 -Djava.io.tmpdir=/root/java-11-alibaba-dragonwell/rpmbuild/BUILD/dragonwell11-dragonwell-extended-11.0.21.18_jdk-11.0.21-ga/build/jdk11.build-slowdebug-main/test-support/jtreg_test_hotspot_jtreg_tier1/tmp --add-exports java.base/jdk.internal.misc=ALL-UNNAMED -cp /root/java-11-alibaba-dragonwell/rpmbuild/BUILD/dragonwell11-dragonwell-extended-11.0.21.18_jdk-11.0.21-ga/build/jdk11.build-slowdebug-main/images/jdk/lib/serverless/serverless-adapter.jar com.alibaba.jvm.cds.Classes4CDS ./TestDumpAndLoadClassWithNullURL.classlist ./TestDumpAndLoadClassWithNullURL.classlist2 ]
[2024-06-13T04:12:45.364319Z] Gathering output for process 2007082
[ELAPSED: 562 ms]
[STDERR]
Error: Could not find or load main class com.alibaba.jvm.cds.Classes4CDS
Caused by: java.lang.ClassNotFoundException: com.alibaba.jvm.cds.Classes4CDS

[STDOUT]

[2024-06-13T04:12:45.926213Z] Waiting for completion for process 2007082
[2024-06-13T04:12:45.926293Z] Waiting for completion finished for process 2007082
[2024-06-13T04:12:45.926384Z] Waiting for completion for process 2007082
[2024-06-13T04:12:45.926466Z] Waiting for completion finished for process 2007082
STDERR:
 stdout: [];
 stderr: [Error: Could not find or load main class com.alibaba.jvm.cds.Classes4CDS
Caused by: java.lang.ClassNotFoundException: com.alibaba.jvm.cds.Classes4CDS
]
 exitValue = 1

java.lang.RuntimeException: Expected to get exit value of [0]

	at jdk.test.lib.process.OutputAnalyzer.shouldHaveExitValue(OutputAnalyzer.java:431)
	at TestClassLoaderWithJVMTIAgent.convertClassList(TestClassLoaderWithJVMTIAgent.java:162)
	at TestClassLoaderWithJVMTIAgent.main(TestClassLoaderWithJVMTIAgent.java:104)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
	at java.base/java.lang.Thread.run(Thread.java:955)

build.log.tar.xz.zip

复现命令:

jtreg -va -nr -w tmp -nativepath:/root/java-11-alibaba-dragonwell/rpmbuild/BUILD/dragonwell11-dragonwell-extended-11.0.21.18_jdk-11.0.21-ga/build/jdk11.build-slowdebug-main/images/test/hotspot/jtreg/native/ -jdk:/root/java-11-alibaba-dragonwell/rpmbuild/BUILD/dragonwell11-dragonwell-extended-11.0.21.18_jdk-11.0.21-ga/build/jdk11.build-slowdebug-main/images/jdk test/hotspot/jtreg/runtime/eagerappcds/TestClassLoaderWithJVMTIAgent.java