dragonwell-releng / dragonwell-adoptium

0 stars 0 forks source link

【ajdk8】【fp2】-XX:-UseCompressedOops选项下,x86上3个Signature的用例执行失败:java.security.InvalidKeyException: RSA key must be at least 1023 bytes #330

Closed dzchun closed 8 months ago

dzchun commented 8 months ago

https://tone.aliyun-inc.com/ws/xesljfzh/test_result/268493

【环境准备】

wget -O binary.tar.z http://114.55.64.175:8666/ajdk-backup/8.16.20_fp2-test-ajdk_fp/OpenJDK8U-jdk_x64_linux_ajdk_2024-01-12-08-54.tar.gz
mkdir binary-download
tar xf binary.tar.z -C binary-download
cd binary-download && export JAVA_HOME=$PWD; export PATH=$JAVA_HOME/bin:$PATH; export TEST_JDK_HOME=$JAVA_HOME && cd -

wget -nv http://114.55.64.175:8666/compiler-ci-bucket/tools/jtreg5.1-b01.zip -O jtreg.zip
unzip jtreg.zip
cd jtreg 
export JT_HOME=$PWD; export PATH=$PWD/bin:$PATH
cd -

git clone https://codeup.aliyun.com/5f4e0dfe6207a1a8b17fa7cf/compiler-test/jdk8u.git -b v8.16.20_fp jdk-repo
test=sun/security/pkcs11/Signature/InitAgainPSS.java
args='-XX:-UseCompressedOops'
jtreg -w tmp -nr -v:fail,error $args $test

涉及的用例 sun/security/pkcs11/Signature/InitAgainPSS.java sun/security/pkcs11/Signature/KeyAndParamCheckForPSS.java sun/security/pkcs11/Signature/SignatureTestPSS.java

【对比版本】 ajk8 fp1版本同样问题

wget http://114.55.64.175:8666/ajdk-backup/8.16.20_fp1/8.16.20_fp1_x64.tar.gz

 [root@iZbp18b3imngcmc2qd4gz2Z bin]# ./java -version; ./java -Xinternalversion
openjdk version "1.8.0_332"
OpenJDK Runtime Environment (Alibaba 8.16.20_fp1) (build 1.8.0_332-b)
OpenJDK 64-Bit Server VM (Alibaba 8.16.20_fp1) (build 25.332-b-internal, mixed mode)
OpenJDK 64-Bit Server VM (25.332-b-internal) for linux-amd64 JRE (1.8.0_332-b), built on Jul 19 2022 02:36:39 by "root" with gcc 4.8.2 20140120 (Red Hat 4.8.2-15)

【用例日志】

cd /tmp/tone/run/jtreg/jt-work/jdk_test/sun/security/pkcs11/Signature/InitAgainPSS && \
DISPLAY=:7 \
HOME=/home/testUserForTone \
LANG=C \
LC_CTYPE=C.UTF-8 \
LD_LIBRARY_PATH= \
PATH=/bin:/usr/bin:/usr/sbin \
    /tmp/tone/run/jtreg/binary-download/jdk8u332-b0/bin/javac \
        -J-Djdk.lang.processReaperUseDefaultStackSize=true \
        -J-Dtest.wisp.socketAddress=www.alibabacloud.com \
        -J-XX:-UseCompressedOops \
        -J-ea \
        -J-esa \
        -J-Dtest.vm.opts='-Djdk.lang.processReaperUseDefaultStackSize=true -Dtest.wisp.socketAddress=www.alibabacloud.com -XX:-UseCompressedOops -ea -esa' \
        -J-Dtest.tool.vm.opts='-J-Djdk.lang.processReaperUseDefaultStackSize=true -J-Dtest.wisp.socketAddress=www.alibabacloud.com -J-XX:-UseCompressedOops -J-ea -J-esa' \
        -J-Dtest.compiler.opts= \
        -J-Dtest.java.opts= \
        -J-Dtest.jdk=/tmp/tone/run/jtreg/binary-download/jdk8u332-b0 \
        -J-Dcompile.jdk=/tmp/tone/run/jtreg/binary-download/jdk8u332-b0 \
        -J-Dtest.timeout.factor=4.0 \
        -J-Dtest.root=/tmp/tone/run/jtreg/jdk-repo/jdk/test \
        -J-Dtest.name=sun/security/pkcs11/Signature/InitAgainPSS.java \
        -J-Dtest.file=/tmp/tone/run/jtreg/jdk-repo/jdk/test/sun/security/pkcs11/Signature/InitAgainPSS.java \
        -J-Dtest.src=/tmp/tone/run/jtreg/jdk-repo/jdk/test/sun/security/pkcs11/Signature \
        -J-Dtest.src.path=/tmp/tone/run/jtreg/jdk-repo/jdk/test/sun/security/pkcs11/Signature:/tmp/tone/run/jtreg/jdk-repo/jdk/test/sun/security/pkcs11 \
        -J-Dtest.classes=/tmp/tone/run/jtreg/jt-work/jdk_test/classes/17/sun/security/pkcs11/Signature \
        -J-Dtest.class.path=/tmp/tone/run/jtreg/jt-work/jdk_test/classes/17/sun/security/pkcs11/Signature:/tmp/tone/run/jtreg/jt-work/jdk_test/classes/17/sun/security/pkcs11 \
        -d /tmp/tone/run/jtreg/jt-work/jdk_test/classes/17/sun/security/pkcs11/Signature \
        -sourcepath /tmp/tone/run/jtreg/jdk-repo/jdk/test/sun/security/pkcs11/Signature:/tmp/tone/run/jtreg/jdk-repo/jdk/test/sun/security/pkcs11 \
        -classpath /tmp/tone/run/jtreg/jdk-repo/jdk/test/sun/security/pkcs11/Signature:/tmp/tone/run/jtreg/jt-work/jdk_test/classes/17/sun/security/pkcs11/Signature:/tmp/tone/run/jtreg/jt-work/jdk_test/classes/17/sun/security/pkcs11:/tmp/tone/run/jtreg/binary-download/jdk8u332-b0/lib/tools.jar \
        -XDignore.symbol.file=true /tmp/tone/run/jtreg/jdk-repo/jdk/test/sun/security/pkcs11/Signature/InitAgainPSS.java
STDOUT:
STDERR:
Note: /tmp/tone/run/jtreg/jdk-repo/jdk/test/sun/security/pkcs11/PKCS11Test.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

ACTION: main -- Failed. Execution failed: `main' threw exception: java.security.InvalidKeyException: RSA key must be at least 1023 bytes
REASON: Assumed action based on file name: run main InitAgainPSS 
TIME:   0.383 seconds
messages:
command: main InitAgainPSS
reason: Assumed action based on file name: run main InitAgainPSS 
Mode: othervm
elapsed time (seconds): 0.383
configuration:
STDOUT:
Beginning test run InitAgainPSS...
Running test with provider SunPKCS11-NSS (security manager disabled) ...
STDERR:
java.security.InvalidKeyException: RSA key must be at least 1023 bytes
    at sun.security.pkcs11.P11PSSSignature.checkKeySize(P11PSSSignature.java:355)
    at sun.security.pkcs11.P11PSSSignature.engineInitSign(P11PSSSignature.java:467)
    at java.security.Signature$Delegate.engineInitSign(Signature.java:1329)
    at java.security.Signature.initSign(Signature.java:621)
    at InitAgainPSS.main(InitAgainPSS.java:64)
    at PKCS11Test.premain(PKCS11Test.java:133)
    at PKCS11Test.testNSS(PKCS11Test.java:496)
    at PKCS11Test.main(PKCS11Test.java:164)
    at InitAgainPSS.main(InitAgainPSS.java:36)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:82)
    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:879)

JavaTest Message: Test threw exception: java.security.InvalidKeyException: RSA key must be at least 1023 bytes
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.security.InvalidKeyException: RSA key must be at least 1023 bytes

【版本信息】

[root@iZbp18b3imngcmc2qd4gz2Z jtreg]# uname -a ; cat /etc/os-release ; free -h; lscpu| head -n 25;java -version; java -Xinternalversion
Linux iZbp18b3imngcmc2qd4gz2Z 5.10.134-15.an8.x86_64 #1 SMP Thu Jul 20 00:35:47 CST 2023 x86_64 x86_64 x86_64 GNU/Linux
NAME="Anolis OS"
VERSION="8.8"
ID="anolis"
ID_LIKE="rhel fedora centos"
VERSION_ID="8.8"
PLATFORM_ID="platform:an8"
PRETTY_NAME="Anolis OS 8.8"
ANSI_COLOR="0;31"
HOME_URL="https://openanolis.cn/"

              total        used        free      shared  buff/cache   available
Mem:           60Gi       9.5Gi        49Gi       2.0Mi       1.3Gi        50Gi
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
BIOS Vendor ID:      Alibaba Cloud
CPU family:          6
Model:               106
Model name:          Intel(R) Xeon(R) Platinum 8369B CPU @ 2.70GHz
BIOS Model name:     pc-i440fx-2.1
Stepping:            6
CPU MHz:             3500.133
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
openjdk version "1.8.0_332"
OpenJDK Runtime Environment (Alibaba 8.16.20_fp1) (build 1.8.0_332-b0)
OpenJDK 64-Bit Server VM (Alibaba 8.16.20_fp1) (build 25.332-b0-internal, mixed mode)
OpenJDK 64-Bit Server VM (25.332-b0-internal) for linux-amd64 JRE (1.8.0_332-b0), built on Jan 12 2024 08:58:48 by "root" with gcc 4.8.2 20140120 (Red Hat 4.8.2-15)