Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIPS jdk_security1_0_FAILED semeru.customprofile=OpenJCEPlusFIPS.FIPS140-3 NoSuchAlgorithmException: SHA256 MessageDigest not available #20884

Closed
JasonFengJ9 opened this issue Jan 6, 2025 · 2 comments

Comments

@JasonFengJ9
Copy link
Member

Failure link

From an internal build(sles15x86-rtp-rt8-1):

13:28:27  openjdk version "17.0.14-internal" 2025-01-21
13:28:27  OpenJDK Runtime Environment (build 17.0.14-internal+0-adhoc..BuildJDK17x86-64linuxNightly)
13:28:27  Eclipse OpenJ9 VM (build master-00929cf045d, JRE 17 Linux amd64-64-Bit Compressed References 20250103_908 (JIT enabled, AOT enabled)
13:28:27  OpenJ9   - 00929cf045d
13:28:27  OMR      - 3ddaad3c13e
13:28:27  JCL      - 060fdb15e48 based on jdk-17.0.14+6)

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

Optional info

Failure output (captured from console output)

13:29:36  ===============================================
13:29:36  Running test jdk_security1_0 ...
13:29:36  ===============================================
13:29:36  jdk_security1_0 Start Time: Fri Jan  3 10:29:36 2025 Epoch Time (ms): 1735928976326
13:29:36  variation: Mode150
13:29:36  JVM_OPTIONS:  -XX:+UseCompressedOops -Xverbosegclog  -Dsemeru.fips=true -Dsemeru.customprofile=OpenJCEPlusFIPS.FIPS140-3

13:29:51  TEST: java/security/AccessControlContext/CheckCtor.java

13:29:51  stderr:
13:29:51  WARNING: A terminally deprecated method in java.lang.System has been called
13:29:51  WARNING: System::setSecurityManager has been called by com.sun.javatest.regtest.agent.RegressionSecurityManager (file:/home/jenkins/workspace/Grinder/jvmtest/openjdk/jtreg/lib/jtreg.jar)
13:29:51  WARNING: Please consider reporting this to the maintainers of com.sun.javatest.regtest.agent.RegressionSecurityManager
13:29:51  WARNING: System::setSecurityManager will be removed in a future release
13:29:51  java.security.NoSuchAlgorithmException: SHA256 MessageDigest not available
13:29:51  	at java.base/sun.security.jca.GetInstance.getInstance(GetInstance.java:159)
13:29:51  	at java.base/java.security.MessageDigest.getInstance(MessageDigest.java:185)
13:29:51  	at java.base/openj9.internal.security.RestrictedSecurity$ProfileParser.checkHashValues(RestrictedSecurity.java:1543)
13:29:51  	at java.base/openj9.internal.security.RestrictedSecurity.checkHashValues(RestrictedSecurity.java:184)
13:29:51  	at java.base/sun.security.jca.Providers.<clinit>(Providers.java:114)
13:29:51  	at java.base/java.security.Security.getProviders(Security.java:462)
13:29:51  	at com.sun.javatest.regtest.agent.ActionHelper$SaveState.<init>(ActionHelper.java:77)
13:29:51  	at com.sun.javatest.regtest.agent.CompileActionHelper.runCompile(CompileActionHelper.java:46)
13:29:51  	at com.sun.javatest.regtest.agent.AgentServer.doCompile(AgentServer.java:272)
13:29:51  	at com.sun.javatest.regtest.agent.AgentServer.run(AgentServer.java:239)
13:29:51  	at com.sun.javatest.regtest.agent.AgentServer.main(AgentServer.java:71)
13:29:51  java.lang.ExceptionInInitializerError
13:29:51  	at java.base/java.lang.J9VMInternals.ensureError(J9VMInternals.java:216)
13:29:51  	at java.base/java.lang.J9VMInternals.recordInitializationFailure(J9VMInternals.java:205)
13:29:51  	at java.base/java.security.Security.getProviders(Security.java:462)
13:29:51  	at com.sun.javatest.regtest.agent.ActionHelper$SaveState.<init>(ActionHelper.java:77)
13:29:51  	at com.sun.javatest.regtest.agent.CompileActionHelper.runCompile(CompileActionHelper.java:46)
13:29:51  	at com.sun.javatest.regtest.agent.AgentServer.doCompile(AgentServer.java:272)
13:29:51  	at com.sun.javatest.regtest.agent.AgentServer.run(AgentServer.java:239)
13:29:51  	at com.sun.javatest.regtest.agent.AgentServer.main(AgentServer.java:71)
13:29:51  Caused by: java.lang.SecurityException: System.exit() forbidden by JT Harness
13:29:51  	at com.sun.javatest.regtest.agent.JavaTestSecurityManager.checkExit(JavaTestSecurityManager.java:117)
13:29:51  	at java.base/java.lang.Runtime.exit(Runtime.java:113)
13:29:51  	at java.base/java.lang.System.exit(System.java:529)
13:29:51  	at java.base/openj9.internal.security.RestrictedSecurity.printStackTraceAndExit(RestrictedSecurity.java:659)
13:29:51  	at java.base/openj9.internal.security.RestrictedSecurity$ProfileParser.checkHashValues(RestrictedSecurity.java:1567)
13:29:51  	at java.base/openj9.internal.security.RestrictedSecurity.checkHashValues(RestrictedSecurity.java:184)
13:29:51  	at java.base/sun.security.jca.Providers.<clinit>(Providers.java:114)
13:29:51  	... 6 more
13:29:51  Exception in thread "main" java.lang.SecurityException: System.exit() forbidden by JT Harness
13:29:51  	at com.sun.javatest.regtest.agent.JavaTestSecurityManager.checkExit(JavaTestSecurityManager.java:117)
13:29:51  	at java.base/java.lang.Runtime.exit(Runtime.java:113)
13:29:51  	at java.base/java.lang.System.exit(System.java:529)
13:29:51  	at com.sun.javatest.regtest.agent.AgentServer.main(AgentServer.java:74)
13:29:51  
13:29:51  TEST RESULT: Error. Agent communication error: java.io.EOFException; check console log for any additional details

13:31:20  Test results: failed: 2; error: 97
13:31:34  Report written to /home/jenkins/workspace/Grinder/aqa-tests/TKG/output_17359289752789/jdk_security1_0/report/html/report.html
13:31:34  Results written to /home/jenkins/workspace/Grinder/aqa-tests/TKG/output_17359289752789/jdk_security1_0/work
13:31:34  Error: Some tests failed or other problems occurred.
13:31:34  -----------------------------------
13:31:34  jdk_security1_0_FAILED

FYI @jasonkatonica

@taoliult
Copy link
Contributor

taoliult commented Jan 7, 2025

@JasonFengJ9

The root cause is, it tried to get the instance of SHA256, but due to OpenJCEPlusFIPS is not in the build, so SHA256 can't be found.

The OpenJDK you used for running the test cases, is the Openj9 nightly build.

[2025-01-03T18:28:10.942Z] CUSTOMIZED_SDK_URL=https://openj9-artifactory.osuosl.org/artifactory/ci-openj9/Build_JDK17_x86-64_linux_Nightly/

We did not bundle the OpenJCEPlusFIPS with the Openj9 nightly build, so the OpenJCEPlusFIPS is not there in the Openj9 nightly build.

We only build the OpenJCEPlusFIPS with Semeru and Personal build, so if need to use the nightly build for testing, please use the Semeru nightly build.

@JasonFengJ9
Copy link
Member Author

Thanks @taoliult

Closing as OpenJ9 build doesn't include OpenJCEPlusFIPS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants