dragonwell-project / dragonwell8

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

[dragonwell8.20.21]security/infra/java/security/cert/CertPathValidator/certification/CAInterop.java两个子项必现报错java.lang.NullPointerException #674

Closed sendaoYan closed 1 month ago

sendaoYan commented 1 month ago

https://tone.aliyun-inc.com/ws/xesljfzh/test_result/357506?tab=1
【环境准备】

BINARY_URL=oss://dragonwell/8.20.21-test-dragonwell_standard/Alibaba_Dragonwell_Standard_8.20.21_x64_linux.tar.gz
JTREG_URL=oss://compiler-ci-bucket/jdk/tools/jtreg5.1-b01.zip
JDK_REPO=https://github.com/dragonwell-project/dragonwell8.git
JDK_BRANCH=master
cd ~/tone/tone-matrix-compiler/common;./ossutil.bin_$(arch) -i;cd -
alias oss="~/tone/tone-matrix-compiler/common/ossutil.bin_$(arch) -e oss-cn-hangzhou.aliyuncs.com -u jvm_dev-b  ~/tone/tone-matrix-compiler/common/ossutil_bin/ossutil -o download -f -r"

部署二进制:
oss $BINARY_URL -l ${BINARY_URL##*/}
mkdir bin-dragonwell8;tar -xf ${BINARY_URL##*/} -C bin-dragonwell8

部署jtreg工具:
oss $JTREG_URL -l ${JTREG_URL##*/};unzip ${JTREG_URL##*/}

部署用例repo
git clone -b $JDK_BRANCH $JDK_REPO jdk-repo-dragonwell8

执行以下命令:
cd bin-dragonwell8/dragonwell-8.19.20/ && export JAVA_HOME=$PWD ; export PATH=$JAVA_HOME/bin:$PATH ; export TEST_JDK_HOME=$JAVA_HOME && cd -
cd jtreg ;export JT_HOME=$PWD ; export PATH=$PWD/bin:$PATH;cd -

jtreg  -nr -v:fail,error -w tmp  -Xmixed  jdk-repo-dragonwell8/jdk/test/security/infra/java/security/cert/CertPathValidator/certification/CAInterop.java

涉及x64和aarch64的Xmixed,-Xcomp,-XX:-UseCompressedOops,-XX:TieredStopAtLevel=1等4个选项
涉及子项:
security/infra/java/security/cert/CertPathValidator/certification/CAInterop.java#globalsignr46
security/infra/java/security/cert/CertPathValidator/certification/CAInterop.java#globalsigne46

这两个子项是本次版本测试新增的,上个release不涉及,但上个release执行也是失败
相关commit:https://kkgithub.com/dragonwell-project/dragonwell8/commit/012f59c7f63fc44c1949d905203ea3f449087cd4#diff-f4dde3180213d2811e3b25aeb6c57df2e3e9250a3ec2f3b7d906ed39e2596a20

【对比测试】
dragonwell8 release 同样失败
oss://dragonwell/8.19.20/Alibaba_Dragonwell_Standard_8.19.20_x64_linux.tar.gz

[dongzhichun@CompilerTest-x64-3 bin]$ ./java -version;./java -Xinternalversion
openjdk version "1.8.0_412"
OpenJDK Runtime Environment (Alibaba Dragonwell Standard Edition 8.19.20) (build 1.8.0_412-b01)
OpenJDK 64-Bit Server VM (Alibaba Dragonwell Standard Edition 8.19.20) (build 25.412-b01, mixed mode)
OpenJDK 64-Bit Server VM (25.412-b01) for linux-amd64 JRE (1.8.0_412-b01), built on May 10 2024 09:37:16 by "root" with gcc 7.5.0

Temruin8 同样失败
https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u422-b05/OpenJDK8U-jdk_x64_linux_hotspot_8u422b05.tar.gz

[dongzhichun@CompilerTest-x64-3 bin]$ ./java -version;./java -Xinternalversion
openjdk version "1.8.0_422"
OpenJDK Runtime Environment (Temurin)(build 1.8.0_422-b05)
OpenJDK 64-Bit Server VM (Temurin)(build 25.422-b05, mixed mode)
OpenJDK 64-Bit Server VM (25.422-b05) for linux-amd64 JRE (1.8.0_422-b05), built on Jul 18 2024 13:39:36 by "jenkins" with gcc 7.5.0

【用例日志】

STDOUT:
=====================================================
CONFIGURATION
=====================================================
http.proxyHost :null
http.proxyPort :null
https.proxyHost :null
https.proxyPort :null
https.socksProxyHost :null
https.socksProxyPort :null
jdk.certpath.disabledAlgorithms :MD2, MD5, SHA1 jdkCA & usage TLSServer, RSA keySize < 1024, DSA keySize < 1024, EC keySize < 224, SHA1 usage SignedJAR & denyAfter 2019-01-01, include jdk.disabled.namedCurves
com.sun.security.enableCRLDP :false
ocsp.enable :true
=====================================================
STDERR:
java.lang.NullPointerException
    at ValidatePathWithURL.<init>(ValidatePathWithURL.java:66)
    at CAInterop.validate(CAInterop.java:732)
    at CAInterop.main(CAInterop.java:677)
    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:750)

JavaTest Message: Test threw exception: java.lang.NullPointerException
JavaTest Message: shutting down test

【版本信息】

[dongzhichun@CompilerTest-x64-3 dragonwell8]$ uname -a ; cat /etc/os-release ; free -h ; lscpu | head -n 25 ; java -version ; java -Xinternalversion
Linux CompilerTest-x64-3 5.10.134-16.1.al8.x86_64 #1 SMP Thu Dec 7 14:11:24 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
NAME="Alibaba Cloud Linux"
VERSION="3 (Soaring Falcon)"
ID="alinux"
ID_LIKE="rhel fedora centos anolis"
VERSION_ID="3"
UPDATE_ID="9"
PLATFORM_ID="platform:al8"
PRETTY_NAME="Alibaba Cloud Linux 3 (Soaring Falcon)"
ANSI_COLOR="0;31"
HOME_URL="https://www.aliyun.com/"

              total        used        free      shared  buff/cache   available
Mem:          123Gi       1.3Gi        63Gi       113Mi        58Gi       120Gi
Swap:            0B          0B          0B
Architecture:        x86_64
CPU op-mode(s):      32-bit, 64-bit
Byte Order:          Little Endian
CPU(s):              32
On-line CPU(s) list: 0-31
Thread(s) per core:  2
Core(s) per socket:  16
Socket(s):           1
NUMA node(s):        1
Vendor ID:           GenuineIntel
CPU family:          6
Model:               106
Model name:          Intel(R) Xeon(R) Platinum 8369B CPU @ 2.70GHz
Stepping:            6
CPU MHz:             3501.339
BogoMIPS:            5399.99
Hypervisor vendor:   KVM
Virtualization type: full
L1d cache:           48K
L1i cache:           32K
L2 cache:            1280K
L3 cache:            49152K
NUMA node0 CPU(s):   0-31
Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq monitor ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch cpuid_fault invpcid_single ibrs_enhanced fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves wbnoinvd arat avx512vbmi pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid fsrm arch_capabilities
openjdk version "1.8.0_412"
OpenJDK Runtime Environment (Alibaba Dragonwell Standard Edition 8.19.20) (build 1.8.0_412-b01)
OpenJDK 64-Bit Server VM (Alibaba Dragonwell Standard Edition 8.19.20) (build 25.412-b01, mixed mode)
OpenJDK 64-Bit Server VM (25.412-b01) for linux-amd64 JRE (1.8.0_412-b01), built on Aug 19 2024 12:11:47 by "root" with gcc 7.5.0
sendaoYan commented 1 month ago

https://code.alibaba-inc.com/os-quality/tone-matrix-compiler/codereview/18026892

weixlu commented 1 month ago

fixed