dragonwell-project / dragonwell8

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

[upstream]Test RmiRegistrySslTest.sh/RmiSslBootstrapTest.sh fails Received fatal alert: handshake_failure #694

Open sendaoYan opened 1 week ago

sendaoYan commented 1 week ago

http://ci.dragonwell-jdk.io/job/Test_openjdk8_dragonwell_extended.openjdk_x86-64_linux/184/consoleFull
【环境准备】

BINARY_URL=oss://dragonwell/8.23.22-test-dragonwell_standard/Alibaba_Dragonwell_Standard_8.23.22_x64_linux.tar.gz
JTREG_URL=oss://compiler-ci-bucket/jdk/tools/jtreg5.1-b01.zip
JDK_REPO=git@github.com:dragonwell-project/dragonwell8.git
JDK_BRANCH=dragonwell_standard-8.23.22
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.20.21/ && 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  -XX:-UseCompressedOops  jdk-repo-dragonwell8/jdk/test/sun/management/jmxremote/bootstrap/RmiRegistrySslTest.sh

【测试分析】
tone没跑该用例
-Xmixed选项同样问题,x64和aarch64都有问题 ,涉及两个用例:

sun/management/jmxremote/bootstrap/RmiRegistrySslTest.sh  
sun/management/jmxremote/bootstrap/RmiSslBootstrapTest.sh  

【对比测试】

dragonwell8 release 同样问题
oss://dragonwell/8.20.21/Alibaba_Dragonwell_Standard_8.20.21_x64_linux.tar.gz

Temruin8 同样问题
oss://compiler-ci-bucket/openjdk/jdk8u432-ga/OpenJDK8U-jdk_x64_linux_hotspot_8u432b06.tar.gz

【用例日志】

STDERR:

ACTION: shell -- Failed. Execution failed: exit code 1
REASON: User specified action: run shell/timeout=300 RmiRegistrySslTest.sh
TIME:   1.657 seconds
messages:
command: shell RmiRegistrySslTest.sh
reason: User specified action: run shell/timeout=300 RmiRegistrySslTest.sh
elapsed time (seconds): 1.657
STDOUT:
-------------------------------------------------------------
RmiRegistrySslTest : Non SSL RMIRegistry - Non SSL Lookup
-------------------------------------------------------------
RmiRegistry lookup...
OK: Found jmxrmi entry in RMIRegistry!
-------------------------------------------------------------
RmiRegistrySslTest : SSL RMIRegistry - Non SSL Lookup
-------------------------------------------------------------
RmiRegistry lookup...
OK: Got expected exception!
java.rmi.ConnectIOException: non-JRMP server at remote endpoint
        at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:248)
        at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202)
        at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:343)
        at sun.rmi.registry.RegistryImpl_Stub.list(RegistryImpl_Stub.java:90)
        at RmiRegistrySslTest.main(RmiRegistrySslTest.java:62)
-------------------------------------------------------------
RmiRegistrySslTest : SSL RMIRegistry - SSL Lookup
-------------------------------------------------------------
RmiRegistry lookup...
KO: Got unexpected exception!
java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
        javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
        at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:307)
        at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202)
        at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:343)
        at sun.rmi.registry.RegistryImpl_Stub.list(RegistryImpl_Stub.java:90)
        at RmiRegistrySslTest.main(RmiRegistrySslTest.java:75)
Caused by: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
        at sun.security.ssl.Alert.createSSLException(Alert.java:131)
        at sun.security.ssl.Alert.createSSLException(Alert.java:117)
        at sun.security.ssl.TransportContext.fatal(TransportContext.java:318)
        at sun.security.ssl.Alert$AlertConsumer.consume(Alert.java:293)
        at sun.security.ssl.TransportContext.dispatch(TransportContext.java:185)
        at sun.security.ssl.SSLTransport.decode(SSLTransport.java:152)
        at sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1401)
        at sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1309)
        at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:440)
        at sun.security.ssl.SSLSocketImpl.ensureNegotiated(SSLSocketImpl.java:822)
        at sun.security.ssl.SSLSocketImpl.access$200(SSLSocketImpl.java:73)
        at sun.security.ssl.SSLSocketImpl$AppOutputStream.write(SSLSocketImpl.java:1184)
        at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
        at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
        at java.io.DataOutputStream.flush(DataOutputStream.java:123)
        at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:229)
        ... 4 more
STDERR:
Exception in thread "main" java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
        javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
        at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:307)
        at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202)
        at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:343)
        at sun.rmi.registry.RegistryImpl_Stub.list(RegistryImpl_Stub.java:90)
        at RmiRegistrySslTest.main(RmiRegistrySslTest.java:75)
Caused by: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
        at sun.security.ssl.Alert.createSSLException(Alert.java:131)
        at sun.security.ssl.Alert.createSSLException(Alert.java:117)
        at sun.security.ssl.TransportContext.fatal(TransportContext.java:318)
        at sun.security.ssl.Alert$AlertConsumer.consume(Alert.java:293)
        at sun.security.ssl.TransportContext.dispatch(TransportContext.java:185)
        at sun.security.ssl.SSLTransport.decode(SSLTransport.java:152)
        at sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1401)
        at sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1309)
        at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:440)
        at sun.security.ssl.SSLSocketImpl.ensureNegotiated(SSLSocketImpl.java:822)
        at sun.security.ssl.SSLSocketImpl.access$200(SSLSocketImpl.java:73)
        at sun.security.ssl.SSLSocketImpl$AppOutputStream.write(SSLSocketImpl.java:1184)
        at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
        at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
        at java.io.DataOutputStream.flush(DataOutputStream.java:123)
        at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:229)
        ... 4 more

【jdk版本】

java -version;java -Xinternalversion
openjdk version "1.8.0_422"
OpenJDK Runtime Environment (Alibaba Dragonwell Standard Edition 8.20.21) (build 1.8.0_422-b01)
OpenJDK 64-Bit Server VM (Alibaba Dragonwell Standard Edition 8.20.21) (build 25.422-b01, mixed mode)
OpenJDK 64-Bit Server VM (25.422-b01) for linux-amd64 JRE (1.8.0_422-b01), built on Nov  8 2024 23:52:22 by "root" with gcc 7.5.0

【系统版本信息】

uname -a ; cat /etc/os-release ; free -h ; lscpu | head -n 25
Linux CompilerTest-x64-4 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.6Gi       106Gi       2.0Mi        15Gi       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:             3528.270
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
sendaoYan commented 1 week ago

https://github.com/openjdk/jdk8u-dev/pull/548

sendaoYan commented 1 week ago

https://github.com/adoptium/aqa-tests/pull/5744