openj9 icon indicating copy to clipboard operation
openj9 copied to clipboard

JDK17 FIPS jdk_security1_0_FAILED

Open JasonFengJ9 opened this issue 3 years ago • 0 comments

Failure link

From an internal build(rhel8x64-fips3-1):

08:37:05  java version "17.0.4" 2022-07-19
08:37:05  IBM Semeru Runtime Certified Edition 17.0.4.0-rc1 (build 17.0.4+8)
08:37:05  Eclipse OpenJ9 VM 17.0.4.0-rc1 (build openj9-0.33.0-rc1, JRE 17 Linux amd64-64-Bit Compressed References 20220719_186 (JIT enabled, AOT enabled)
08:37:05  OpenJ9   - 8cb527940
08:37:05  OMR      - b58aa2708
08:37:05  JCL      - e5bc2863363 based on jdk-17.0.4+8)

Rerun in Grinder - Change TARGET to run only the failed test targets.

Optional info

Failure output (captured from console output)

08:41:15  ===============================================
08:41:15  Running test jdk_security1_0 ...
08:41:15  ===============================================
08:41:15  jdk_security1_0 Start Time: Fri Jul 29 05:41:15 2022 Epoch Time (ms): 1659098475667
08:41:15  "/home/jenkins/workspace/Grinder_testList_2/openjdkbinary/j2sdk-image/bin/java" -Xshareclasses:destroyAll; "/home/jenkins/workspace/Grinder_testList_2/openjdkbinary/j2sdk-image/bin/java" -Xshareclasses:groupAccess,destroyAll; echo "cache cleanup done";
08:41:15  JVMSHRC005I No shared class caches available
08:41:15  JVMSHRC005I No shared class caches available
08:41:15  cache cleanup done
08:41:15  variation: Mode150
08:41:15  JVM_OPTIONS:  -XX:+UseCompressedOops -Dsemeru.fips=true

08:41:49  TEST: java/security/KeyRep/Serial.java

08:41:49  java.security.NoSuchAlgorithmException: no such algorithm: DSA for provider SUN
08:41:49  	at java.base/sun.security.jca.GetInstance.getService(GetInstance.java:87)
08:41:49  	at java.base/sun.security.jca.GetInstance.getInstance(GetInstance.java:206)
08:41:49  	at java.base/java.security.KeyPairGenerator.getInstance(KeyPairGenerator.java:300)
08:41:49  	at Serial.main(Serial.java:48)
08:41:49  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
08:41:49  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
08:41:49  	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
08:41:49  	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
08:41:49  	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
08:41:49  	at java.base/java.lang.Thread.run(Thread.java:858)

08:43:01  TEST: java/security/Policy/GetInstance/GetInstance.java

08:43:01  java.security.NoSuchProviderException: no such provider: SunRsaSign
08:43:01  	at java.base/sun.security.jca.GetInstance.getService(GetInstance.java:83)
08:43:01  	at java.base/sun.security.jca.GetInstance.getInstance(GetInstance.java:212)
08:43:01  	at java.base/java.security.Policy.getInstance(Policy.java:484)
08:43:01  	at GetInstance.testStringProvider(GetInstance.java:89)
08:43:01  	at GetInstance.main(GetInstance.java:51)
08:43:01  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
08:43:01  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
08:43:01  	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
08:43:01  	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
08:43:01  	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
08:43:01  	at java.base/java.lang.Thread.run(Thread.java:858)

08:43:11  TEST: java/security/Security/ClassLoaderDeadlock/Deadlock.sh

08:43:11  Exception in thread "main" java.security.NoSuchAlgorithmException: SHA1PRNG SecureRandom not available
08:43:11  	at java.base/sun.security.jca.GetInstance.getInstance(GetInstance.java:159)
08:43:11  	at java.base/java.security.SecureRandom.getInstance(SecureRandom.java:410)
08:43:11  	at Deadlock.run(Deadlock.java:35)
08:43:11  	at java.base/java.lang.Thread.run(Thread.java:858)

08:43:12  TEST: java/security/Security/signedfirst/Dyn.sh

08:43:12  rm: cannot remove 'DynSignedProvFirst.class': No such file or directory
08:43:12  Exception in thread "main" java.lang.SecurityException: Test Failed
08:43:12  	at DynSignedProvFirst.main(DynSignedProvFirst.java:39)

08:43:14  TEST: java/security/Security/signedfirst/Static.sh

08:43:14  rm: cannot remove 'StaticSignedProvFirst.class': No such file or directory
08:43:14  Exception in thread "main" java.lang.Exception: EXP provider not loaded!
08:43:14  	at StaticSignedProvFirst.main(StaticSignedProvFirst.java:41)

08:43:23  TEST: java/security/Signature/SignatureLength.java

08:43:23  java.security.ProviderException: cancel failed
08:43:23  	at jdk.crypto.cryptoki/sun.security.pkcs11.P11Signature.cancelOperation(P11Signature.java:333)
08:43:23  	at jdk.crypto.cryptoki/sun.security.pkcs11.P11Signature.reset(P11Signature.java:273)
08:43:23  	at jdk.crypto.cryptoki/sun.security.pkcs11.P11Signature.engineVerify(P11Signature.java:746)
08:43:23  	at java.base/java.security.Signature$Delegate.engineVerify(Signature.java:1435)
08:43:23  	at java.base/java.security.Signature.verify(Signature.java:789)
08:43:23  	at SignatureLength.main0(SignatureLength.java:123)
08:43:23  	at SignatureLength.main(SignatureLength.java:64)
08:43:23  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
08:43:23  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
08:43:23  	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
08:43:23  	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
08:43:23  	at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:312)
08:43:23  	at java.base/java.lang.Thread.run(Thread.java:858)
08:43:23  Caused by: sun.security.pkcs11.wrapper.PKCS11Exception: CKR_ARGUMENTS_BAD
08:43:23  	at jdk.crypto.cryptoki/sun.security.pkcs11.P11Signature.cancelOperation(P11Signature.java:306)
08:43:23  	... 12 more

08:43:37  Test results: passed: 132; failed: 6
08:43:47  Report written to /home/jenkins/workspace/Grinder_testList_2/jvmtest/openjdk/report/html/report.html
08:43:47  Results written to /home/jenkins/workspace/Grinder_testList_2/aqa-tests/TKG/output_16590982873742/jdk_security1_0/work
08:43:47  Error: Some tests failed or other problems occurred.
08:43:47  
08:43:47  jdk_security1_0_FAILED

@alon-sh @taoliult

JasonFengJ9 avatar Aug 03 '22 22:08 JasonFengJ9

An internal build(rhel8x64-fips1-1)

openjdk version "1.8.0_352"
IBM Semeru Runtime Open Edition (build 1.8.0_352-b05)
Eclipse OpenJ9 VM (build v0.35.0-release-7dd982ba7, JRE 1.8.0 Linux amd64-64-Bit Compressed References 20220908_469 (JIT enabled, AOT enabled)
OpenJ9   - 7dd982ba7
OMR      - 938f0686f
JCL      - d0e3108595 based on jdk8u352-b05)

[2022-09-09T01:33:06.022Z] variation: -Xdump:system:none -Xdump:heap:none -Xdump:system:events=gpf+abort+traceassert+corruptcache Mode650
[2022-09-09T01:33:06.022Z] JVM_OPTIONS:  -Xdump:system:none -Xdump:heap:none -Xdump:system:events=gpf+abort+traceassert+corruptcache -XX:-UseCompressedOops -Dsemeru.fips=true

[2022-09-09T01:33:42.866Z] TEST: java/math/BigInteger/ModPow65537.java

[2022-09-09T01:33:42.868Z] STDERR:
[2022-09-09T01:33:42.868Z] java.security.NoSuchProviderException: no such provider: SunRsaSign
[2022-09-09T01:33:42.868Z] 	at sun.security.jca.GetInstance.getService(GetInstance.java:83)
[2022-09-09T01:33:42.868Z] 	at sun.security.jca.GetInstance.getInstance(GetInstance.java:206)
[2022-09-09T01:33:42.868Z] 	at java.security.KeyPairGenerator.getInstance(KeyPairGenerator.java:279)
[2022-09-09T01:33:42.868Z] 	at ModPow65537.main(ModPow65537.java:42)
[2022-09-09T01:33:42.868Z] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[2022-09-09T01:33:42.868Z] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[2022-09-09T01:33:42.868Z] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[2022-09-09T01:33:42.868Z] 	at java.lang.reflect.Method.invoke(Method.java:498)
[2022-09-09T01:33:42.868Z] 	at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:298)
[2022-09-09T01:33:42.868Z] 	at java.lang.Thread.run(Thread.java:826)
[2022-09-09T01:33:42.868Z] 
[2022-09-09T01:33:42.868Z] JavaTest Message: Test threw exception: java.security.NoSuchProviderException
[2022-09-09T01:33:42.868Z] JavaTest Message: shutting down test
[2022-09-09T01:33:42.868Z] 
[2022-09-09T01:33:42.868Z] 
[2022-09-09T01:33:42.869Z] TEST RESULT: Failed. Execution failed: `main' threw exception: java.security.NoSuchProviderException: no such provider: SunRsaSign
[2022-09-09T01:33:42.869Z] --------------------------------------------------
[2022-09-09T01:35:39.772Z] Test results: passed: 36; failed: 1
[2022-09-09T01:35:46.593Z] Report written to /home/jenkins/workspace/Test_openjdk8_j9_sanity.openjdk_x86-64_linux_fips_testList_0/aqa-tests/TKG/output_16626869907321/jdk_math_1/report/html/report.html
[2022-09-09T01:35:46.593Z] Results written to /home/jenkins/workspace/Test_openjdk8_j9_sanity.openjdk_x86-64_linux_fips_testList_0/aqa-tests/TKG/output_16626869907321/jdk_math_1/work
[2022-09-09T01:35:46.593Z] Error: Some tests failed or other problems occurred.
[2022-09-09T01:35:46.593Z] 
[2022-09-09T01:35:46.593Z] jdk_math_1_FAILED

JasonFengJ9 avatar Sep 09 '22 20:09 JasonFengJ9

@JasonFengJ9 For the provider: SunRsaSign, this provider is not needed in the FIPS mode, so we remove it from the FIPS mode. This test case will be added into the FIPS test exclude list. @WilburZjh fyi.

taoliult avatar Sep 13 '22 14:09 taoliult