dragonwell-project / dragonwell8

Alibaba Dragonwell8 JDK
http://dragonwell-jdk.io
GNU General Public License v2.0
4.21k stars 497 forks source link

-XX:-UseCompressedOops选项com/alibaba/cds/TestDumpAndLoadClass.java报错 #576

Closed sendaoYan closed 1 year ago

sendaoYan commented 1 year ago

https://tone.aliyun-inc.com/ws/xesljfzh/test_result/209172?tab=1 Steps to Reproduce Steps to reproduce the behavior:

git clone -b wip_dragonwell_extended_merge_branch "git@github.com:dragonwell-project/dragonwell8.git" jdk-repo
wget -nv https://compiler-ci-bucket.oss-cn-hangzhou.aliyuncs.com/jdk/tools/jtreg5.1-b01.zip -O jtreg.zip
unzip jtreg.zip
cd jtreg 
export JT_HOME=$PWD ; export PATH=$PWD/bin:$PATH
cd -
wget -nv https://dragonwell.oss-cn-shanghai.aliyuncs.com/test-46/OpenJDK8U-jdk_x64_linux_dragonwell_2023-07-21-07-36.tar.gz -O binary.tar.gz
tar zxvf binary.tar.gz
cd dragonwell-8.15.16
export JAVA_HOME=$PWD ; export PATH=$JAVA_HOME/bin:$PATH ; export TEST_JDK_HOME=$JAVA_HOME
cd -
test=./jdk-repo/jdk/test/com/alibaba/cds/TestDumpAndLoadClass.java
alias j='jtreg -w tmp -nr -v:fail,error'
j -XX:-UseCompressedOops $test

dragonwell失败日志: TestDumpAndLoadClass.java.log 关键错误信息:

STDERR:
 stdout: [Error occurred during initialization of VM
Cannot dump shared archive when UseCompressedOops or UseCompressedClassPointers is off.
];
 stderr: []
 exitValue = 1

java.lang.RuntimeException: 'Failed allocating metaspace object type' missing from stdout/stderr 

    at jdk.test.lib.process.OutputAnalyzer.shouldContain(OutputAnalyzer.java:150)
    at TestDumpAndLoadClass.dumpArchive(TestDumpAndLoadClass.java:130)
    at TestDumpAndLoadClass.main(TestDumpAndLoadClass.java:47)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
    at java.lang.Thread.run(Thread.java:855)

JavaTest Message: Test threw exception: java.lang.RuntimeException: 'Failed allocating metaspace object type' missing from stdout/stderr 

JavaTest Message: shutting down test

使用-Xmixed选项:未出现错误,成功pass

错误相同的用例:

com/alibaba/cds/TestDumpAndLoadClassWithException.java
com/alibaba/cds/TestDumpAndLoadClassWithNullURL.java
com/alibaba/cds/TestDumpAndLoadClassWithWisp.java
com/alibaba/cds/TestDumpAndLoadNotFound.java
com/alibaba/cds/TestDumpAndLoadVerficationFailure.java
com/alibaba/cds/TestDumpListInParallel.java
com/alibaba/cds/TestDumpUnsupportedCheck.java
com/alibaba/cds/TestLoadClassFlow.java
com/alibaba/cds/TestSuppressingAppCDSErrors.java
com/alibaba/cds/TestWispWithAppCDS.java
com/alibaba/cds/appcds/TestDumpAndLoadForAppCDS.java

环境信息: image

sendaoYan commented 1 year ago

已修复