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

jdk_security1_1_FAILED SunCertPathBuilderException & CertPathValidatorException #16312

Open
JasonFengJ9 opened this issue Nov 11, 2022 · 22 comments

Comments

@JasonFengJ9
Copy link
Member

JasonFengJ9 commented Nov 11, 2022

Failure link

From an internal build(macaarch64rt8):

openjdk version "11.0.17" 2022-10-18
IBM Semeru Runtime Open Edition 11.0.17.0 (build 11.0.17+8)
Eclipse OpenJ9 VM 11.0.17.0 (build openj9-0.35.0, JRE 11 Mac OS X aarch64-64-Bit 20221031_177 (JIT enabled, AOT enabled)
OpenJ9   - e04a7f6c1
OMR      - 85a21674f
JCL      - a94c231303 based on jdk-11.0.17+8)

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

Optional info

Failure output (captured from console output)

[2022-11-10T14:22:39.900Z] variation: Mode650
[2022-11-10T14:22:39.900Z] JVM_OPTIONS:  -XX:-UseCompressedOops 

[2022-11-10T14:22:45.174Z] TEST: java/security/cert/CertPathBuilder/targetConstraints/BuildEEBasicConstraints.java

[2022-11-10T14:22:45.174Z] STDERR:
[2022-11-10T14:22:45.174Z] sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
[2022-11-10T14:22:45.174Z] 	at java.base/sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)
[2022-11-10T14:22:45.174Z] 	at java.base/sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126)
[2022-11-10T14:22:45.174Z] 	at java.base/java.security.cert.CertPathBuilder.build(CertPathBuilder.java:297)
[2022-11-10T14:22:45.174Z] 	at jdk.test.lib.security.CertUtils.build(CertUtils.java:541)
[2022-11-10T14:22:45.174Z] 	at BuildEEBasicConstraints.main(BuildEEBasicConstraints.java:77)
[2022-11-10T14:22:45.174Z] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[2022-11-10T14:22:45.174Z] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[2022-11-10T14:22:45.174Z] 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[2022-11-10T14:22:45.174Z] 	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
[2022-11-10T14:22:45.174Z] 	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
[2022-11-10T14:22:45.174Z] 	at java.base/java.lang.Thread.run(Thread.java:839)
[2022-11-10T14:22:45.174Z] 
[2022-11-10T14:22:45.174Z] JavaTest Message: Test threw exception: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

[2022-11-10T14:22:46.998Z] TEST: java/security/cert/pkix/policyChanges/TestPolicy.java

[2022-11-10T14:22:46.998Z] STDERR:
[2022-11-10T14:22:46.998Z] java.security.cert.CertPathValidatorException: validity check failed
[2022-11-10T14:22:46.998Z] 	at java.base/sun.security.provider.certpath.PKIXMasterCertPathValidator.validate(PKIXMasterCertPathValidator.java:135)
[2022-11-10T14:22:46.999Z] 	at java.base/sun.security.provider.certpath.PKIXCertPathValidator.validate(PKIXCertPathValidator.java:224)
[2022-11-10T14:22:46.999Z] 	at java.base/sun.security.provider.certpath.PKIXCertPathValidator.validate(PKIXCertPathValidator.java:144)
[2022-11-10T14:22:46.999Z] 	at java.base/sun.security.provider.certpath.PKIXCertPathValidator.engineValidate(PKIXCertPathValidator.java:83)
[2022-11-10T14:22:46.999Z] 	at java.base/java.security.cert.CertPathValidator.validate(CertPathValidator.java:309)
[2022-11-10T14:22:46.999Z] 	at TestPolicy.main(TestPolicy.java:102)
[2022-11-10T14:22:46.999Z] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[2022-11-10T14:22:46.999Z] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[2022-11-10T14:22:46.999Z] 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[2022-11-10T14:22:46.999Z] 	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
[2022-11-10T14:22:46.999Z] 	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
[2022-11-10T14:22:46.999Z] 	at java.base/java.lang.Thread.run(Thread.java:839)
[2022-11-10T14:22:46.999Z] Caused by: java.security.cert.CertificateExpiredException: NotAfter: Mon Nov 07 06:57:03 EST 2022
[2022-11-10T14:22:46.999Z] 	at java.base/sun.security.x509.CertificateValidity.valid(CertificateValidity.java:277)
[2022-11-10T14:22:46.999Z] 	at java.base/sun.security.x509.X509CertImpl.checkValidity(X509CertImpl.java:675)
[2022-11-10T14:22:46.999Z] 	at java.base/sun.security.provider.certpath.BasicChecker.verifyValidity(BasicChecker.java:190)
[2022-11-10T14:22:46.999Z] 	at java.base/sun.security.provider.certpath.BasicChecker.check(BasicChecker.java:144)
[2022-11-10T14:22:46.999Z] 	at java.base/sun.security.provider.certpath.PKIXMasterCertPathValidator.validate(PKIXMasterCertPathValidator.java:125)
[2022-11-10T14:22:46.999Z] 	... 11 more
[2022-11-10T14:22:46.999Z] 
[2022-11-10T14:22:46.999Z] JavaTest Message: Test threw exception: java.security.cert.CertPathValidatorException: validity check failed

[2022-11-10T14:22:46.999Z] TEST RESULT: Failed. Execution failed: `main' threw exception: java.security.cert.CertPathValidatorException: validity check failed
[2022-11-10T14:22:46.999Z] --------------------------------------------------
[2022-11-10T14:25:26.537Z] Test results: passed: 203; failed: 2
[2022-11-10T14:25:27.832Z] Report written to /Users/jenkins/workspace/Test_openjdk11_j9_extended.openjdk_aarch64_mac/aqa-tests/TKG/output_16680894454655/jdk_security1_1/report/html/report.html
[2022-11-10T14:25:27.832Z] Results written to /Users/jenkins/workspace/Test_openjdk11_j9_extended.openjdk_aarch64_mac/aqa-tests/TKG/output_16680894454655/jdk_security1_1/work
[2022-11-10T14:25:27.832Z] Error: Some tests failed or other problems occurred.
[2022-11-10T14:25:27.832Z] 
[2022-11-10T14:25:27.832Z] jdk_security1_1_FAILED
[2022-11-10T14:32:41.828Z] TEST: sun/security/ssl/SSLSocketImpl/SSLSocketSSLEngineCloseInbound.java

[2022-11-10T14:32:41.829Z] STDERR:
[2022-11-10T14:32:41.829Z] java.lang.Exception: Server session is not valid
[2022-11-10T14:32:41.829Z] 	at SSLSocketSSLEngineCloseInbound.runTest(SSLSocketSSLEngineCloseInbound.java:295)
[2022-11-10T14:32:41.829Z] 	at SSLSocketSSLEngineCloseInbound.main(SSLSocketSSLEngineCloseInbound.java:162)
[2022-11-10T14:32:41.829Z] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[2022-11-10T14:32:41.829Z] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[2022-11-10T14:32:41.829Z] 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[2022-11-10T14:32:41.829Z] 	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
[2022-11-10T14:32:41.829Z] 	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
[2022-11-10T14:32:41.829Z] 	at java.base/java.lang.Thread.run(Thread.java:839)
[2022-11-10T14:32:41.829Z] 
[2022-11-10T14:32:41.829Z] JavaTest Message: Test threw exception: java.lang.Exception: Server session is not valid

[2022-11-10T14:32:41.829Z] TEST RESULT: Failed. Execution failed: `main' threw exception: java.lang.Exception: Server session is not valid
[2022-11-10T14:32:41.829Z] --------------------------------------------------
[2022-11-10T14:37:22.460Z] Test results: passed: 768; failed: 1
[2022-11-10T14:37:22.460Z] Report written to /Users/jenkins/workspace/Test_openjdk11_j9_extended.openjdk_aarch64_mac/aqa-tests/TKG/output_16680894454655/jdk_security3_1/report/html/report.html
[2022-11-10T14:37:22.460Z] Results written to /Users/jenkins/workspace/Test_openjdk11_j9_extended.openjdk_aarch64_mac/aqa-tests/TKG/output_16680894454655/jdk_security3_1/work
[2022-11-10T14:37:22.460Z] Error: Some tests failed or other problems occurred.
[2022-11-10T14:37:22.460Z] 
[2022-11-10T14:37:22.460Z] jdk_security3_1_FAILED
@pshipton
Copy link
Member

Pls try a Temurin build to compare.

@JasonFengJ9
Copy link
Member Author

JasonFengJ9 commented Nov 11, 2022

java/security/cert/CertPathBuilder/targetConstraints/BuildEEBasicConstraints.java
RI grinders:
Build Status
Build Status

java/security/cert/pkix/policyChanges/TestPolicy.java
RI grinders:
Build Status
Build Status

@JasonFengJ9
Copy link
Member Author

RI failed as well.

14:17:32  openjdk version "11.0.17" 2022-10-18
14:17:32  OpenJDK Runtime Environment Temurin-11.0.17+8 (build 11.0.17+8)
14:17:32  OpenJDK 64-Bit Server VM Temurin-11.0.17+8 (build 11.0.17+8, mixed mode)

https://hyc-runtimes-jenkins.swg-devops.com/job/Grinder_iteration_3/1488/testReport/java_security_cert_CertPathBuilder_targetConstraints_BuildEEBasicConstraints/java/BuildEEBasicConstraints_6/

java/security/cert/CertPathBuilder/targetConstraints/BuildEEBasicConstraints.java.BuildEEBasicConstraints (from java_security_cert_CertPathBuilder_targetConstraints_BuildEEBasicConstraints.java)

Execution failed: `main' threw exception: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target    

sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
	at java.base/sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)
	at java.base/sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126)
	at java.base/java.security.cert.CertPathBuilder.build(CertPathBuilder.java:297)
	at jdk.test.lib.security.CertUtils.build(CertUtils.java:541)
	at BuildEEBasicConstraints.main(BuildEEBasicConstraints.java:77)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
	at java.base/java.lang.Thread.run(Thread.java:829)

JavaTest Message: Test threw exception: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

https://hyc-runtimes-jenkins.swg-devops.com/job/Grinder_iteration_2/1625/testReport/java_security_cert_pkix_policyChanges_TestPolicy/java/TestPolicy/

java/security/cert/pkix/policyChanges/TestPolicy.java.TestPolicy (from java_security_cert_pkix_policyChanges_TestPolicy.java)

Execution failed: `main' threw exception: java.security.cert.CertPathValidatorException: validity check failed    

java.security.cert.CertPathValidatorException: validity check failed
	at java.base/sun.security.provider.certpath.PKIXMasterCertPathValidator.validate(PKIXMasterCertPathValidator.java:135)
	at java.base/sun.security.provider.certpath.PKIXCertPathValidator.validate(PKIXCertPathValidator.java:224)
	at java.base/sun.security.provider.certpath.PKIXCertPathValidator.validate(PKIXCertPathValidator.java:144)
	at java.base/sun.security.provider.certpath.PKIXCertPathValidator.engineValidate(PKIXCertPathValidator.java:83)
	at java.base/java.security.cert.CertPathValidator.validate(CertPathValidator.java:309)
	at TestPolicy.main(TestPolicy.java:102)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
	at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.security.cert.CertificateExpiredException: NotAfter: Mon Nov 07 06:57:03 EST 2022
	at java.base/sun.security.x509.CertificateValidity.valid(CertificateValidity.java:277)
	at java.base/sun.security.x509.X509CertImpl.checkValidity(X509CertImpl.java:675)
	at java.base/sun.security.provider.certpath.BasicChecker.verifyValidity(BasicChecker.java:190)
	at java.base/sun.security.provider.certpath.BasicChecker.check(BasicChecker.java:144)
	at java.base/sun.security.provider.certpath.PKIXMasterCertPathValidator.validate(PKIXMasterCertPathValidator.java:125)
	... 11 more

JavaTest Message: Test threw exception: java.security.cert.CertPathValidatorException: validity check failed
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.security.cert.CertPathValidatorException: validity check failed

sun/security/ssl/SSLSocketImpl/SSLSocketSSLEngineCloseInbound.java - Build Status

@JasonFengJ9
Copy link
Member Author

JasonFengJ9 commented Nov 15, 2022

openjdk version "1.8.0_362"
IBM Semeru Runtime Open Edition (build 1.8.0_362-b02)
Eclipse OpenJ9 VM (build master-bd9296400, JRE 1.8.0 AIX ppc64-64-Bit Compressed References 20221111_509 (JIT enabled, AOT enabled)
OpenJ9   - bd9296400
OMR      - 0453d02bf
JCL      - b0d50c4aa based on jdk8u362-b02)

JDK 8 internal build - paix826

[2022-11-12T07:41:50.793Z] TEST: java/security/cert/CertPathBuilder/targetConstraints/BuildEEBasicConstraints.java

[2022-11-12T07:41:50.794Z] STDERR:
[2022-11-12T07:41:50.794Z] sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
[2022-11-12T07:41:50.794Z] 	at sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)
[2022-11-12T07:41:50.794Z] 	at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126)
[2022-11-12T07:41:50.794Z] 	at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280)
[2022-11-12T07:41:50.794Z] 	at CertUtils.build(CertUtils.java:232)
[2022-11-12T07:41:50.794Z] 	at BuildEEBasicConstraints.main(BuildEEBasicConstraints.java:77)
[2022-11-12T07:41:50.794Z] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[2022-11-12T07:41:50.794Z] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[2022-11-12T07:41:50.794Z] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[2022-11-12T07:41:50.794Z] 	at java.lang.reflect.Method.invoke(Method.java:498)
[2022-11-12T07:41:50.794Z] 	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
[2022-11-12T07:41:50.794Z] 	at java.lang.Thread.run(Thread.java:826)

[2022-11-12T07:42:01.888Z] TEST: java/security/cert/pkix/policyChanges/TestPolicy.java

[2022-11-12T07:42:01.888Z] STDERR:
[2022-11-12T07:42:01.888Z] java.security.cert.CertPathValidatorException: validity check failed
[2022-11-12T07:42:01.888Z] 	at sun.security.provider.certpath.PKIXMasterCertPathValidator.validate(PKIXMasterCertPathValidator.java:135)
[2022-11-12T07:42:01.888Z] 	at sun.security.provider.certpath.PKIXCertPathValidator.validate(PKIXCertPathValidator.java:220)
[2022-11-12T07:42:01.888Z] 	at sun.security.provider.certpath.PKIXCertPathValidator.validate(PKIXCertPathValidator.java:140)
[2022-11-12T07:42:01.888Z] 	at sun.security.provider.certpath.PKIXCertPathValidator.engineValidate(PKIXCertPathValidator.java:79)
[2022-11-12T07:42:01.888Z] 	at java.security.cert.CertPathValidator.validate(CertPathValidator.java:292)
[2022-11-12T07:42:01.888Z] 	at TestPolicy.main(TestPolicy.java:102)
[2022-11-12T07:42:01.888Z] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[2022-11-12T07:42:01.888Z] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[2022-11-12T07:42:01.888Z] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[2022-11-12T07:42:01.888Z] 	at java.lang.reflect.Method.invoke(Method.java:498)
[2022-11-12T07:42:01.888Z] 	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
[2022-11-12T07:42:01.888Z] 	at java.lang.Thread.run(Thread.java:826)
[2022-11-12T07:42:01.888Z] Caused by: java.security.cert.CertificateExpiredException: NotAfter: Mon Nov 07 06:57:03 EST 2022
[2022-11-12T07:42:01.888Z] 	at sun.security.x509.CertificateValidity.valid(CertificateValidity.java:277)
[2022-11-12T07:42:01.888Z] 	at sun.security.x509.X509CertImpl.checkValidity(X509CertImpl.java:677)
[2022-11-12T07:42:01.888Z] 	at sun.security.provider.certpath.BasicChecker.verifyValidity(BasicChecker.java:190)
[2022-11-12T07:42:01.888Z] 	at sun.security.provider.certpath.BasicChecker.check(BasicChecker.java:144)
[2022-11-12T07:42:01.888Z] 	at sun.security.provider.certpath.PKIXMasterCertPathValidator.validate(PKIXMasterCertPathValidator.java:125)
[2022-11-12T07:42:01.888Z] 	... 11 more
[2022-11-12T07:42:01.888Z] 
[2022-11-12T07:42:01.888Z] JavaTest Message: Test threw exception: java.security.cert.CertPathValidatorException: validity check failed

[2022-11-12T07:42:01.889Z] TEST RESULT: Failed. Execution failed: `main' threw exception: java.security.cert.CertPathValidatorException: validity check failed
[2022-11-12T07:42:01.889Z] --------------------------------------------------
[2022-11-12T07:47:57.186Z] Test results: passed: 172; failed: 2
[2022-11-12T07:48:03.171Z] Report written to /home/jenkins/workspace/Test_openjdk8_j9_extended.openjdk_ppc64_aix/aqa-tests/TKG/output_16682325412895/jdk_security1_0/report/html/report.html
[2022-11-12T07:48:03.171Z] Results written to /home/jenkins/workspace/Test_openjdk8_j9_extended.openjdk_ppc64_aix/aqa-tests/TKG/output_16682325412895/jdk_security1_0/work
[2022-11-12T07:48:03.171Z] Error: Some tests failed or other problems occurred.
[2022-11-12T07:48:03.171Z] 
[2022-11-12T07:48:03.171Z] jdk_security1_0_FAILED

JDK11 internal build - rhel7lert-1-10

@JasonFengJ9 JasonFengJ9 changed the title aarch64_mac jdk_security1_1_FAILED SunCertPathBuilderException & CertPathValidatorException jdk_security1_1_FAILED SunCertPathBuilderException & CertPathValidatorException Nov 15, 2022
@JasonFengJ9
Copy link
Member Author

JDK8 internal build(ub18-aarch64-3)

openjdk version "1.8.0_362"
IBM Semeru Runtime Open Edition (build 1.8.0_362-b07)
Eclipse OpenJ9 VM (build v0.36.0-release-c5da55ccc, JRE 1.8.0 Linux aarch64-64-Bit Compressed References 20230113_538 (JIT enabled, AOT enabled)
OpenJ9   - c5da55ccc
OMR      - 2bb04132e
JCL      - 1a94e3037e based on jdk8u362-b07)

[2023-01-13T20:38:08.540Z] variation: Mode150
[2023-01-13T20:38:08.540Z] JVM_OPTIONS:  -XX:+UseCompressedOops 

[2023-01-13T20:38:21.990Z] TEST: java/security/cert/CertPathBuilder/targetConstraints/BuildEEBasicConstraints.java


[2023-01-13T20:38:21.991Z] STDERR:
[2023-01-13T20:38:21.991Z] sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
[2023-01-13T20:38:21.991Z] 	at sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)
[2023-01-13T20:38:21.991Z] 	at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126)
[2023-01-13T20:38:21.991Z] 	at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280)
[2023-01-13T20:38:21.991Z] 	at CertUtils.build(CertUtils.java:232)
[2023-01-13T20:38:21.991Z] 	at BuildEEBasicConstraints.main(BuildEEBasicConstraints.java:77)
[2023-01-13T20:38:21.991Z] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[2023-01-13T20:38:21.991Z] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[2023-01-13T20:38:21.991Z] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[2023-01-13T20:38:21.991Z] 	at java.lang.reflect.Method.invoke(Method.java:498)
[2023-01-13T20:38:21.991Z] 	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
[2023-01-13T20:38:21.991Z] 	at java.lang.Thread.run(Thread.java:826)
[2023-01-13T20:38:21.991Z] 
[2023-01-13T20:38:21.991Z] JavaTest Message: Test threw exception: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

[2023-01-13T20:40:38.610Z] jdk_security1_0_FAILED

@llxia
Copy link
Contributor

llxia commented Apr 27, 2023

Same failure on ub22 aarch with JDK8 0.36:

internal build

04:37:33.154  IBM Semeru Runtime Open Edition (build 1.8.0_362-b09)
04:37:33.154  Eclipse OpenJ9 VM (build openj9-0.36.0, JRE 1.8.0 Linux aarch64-64-Bit Compressed References 20230206_558 (JIT enabled, AOT enabled)
04:37:33.154  OpenJ9   - e68fb241f
04:37:33.154  OMR      - f491bbf6f
04:37:33.154  JCL      - eebde685ec based on jdk8u362-b09)
04:54:07.673  *** Running test: [2.5.29.32.0]
04:54:07.673  STDERR:
04:54:07.673  java.security.cert.CertPathValidatorException: validity check failed
04:54:07.674  	at sun.security.provider.certpath.PKIXMasterCertPathValidator.validate(PKIXMasterCertPathValidator.java:135)
04:54:07.674  	at sun.security.provider.certpath.PKIXCertPathValidator.validate(PKIXCertPathValidator.java:220)
04:54:07.674  	at sun.security.provider.certpath.PKIXCertPathValidator.validate(PKIXCertPathValidator.java:140)
04:54:07.674  	at sun.security.provider.certpath.PKIXCertPathValidator.engineValidate(PKIXCertPathValidator.java:79)
04:54:07.674  	at java.security.cert.CertPathValidator.validate(CertPathValidator.java:292)
04:54:07.674  	at TestPolicy.main(TestPolicy.java:102)
04:54:07.674  	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
04:54:07.674  	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
04:54:07.674  	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
04:54:07.674  	at java.lang.reflect.Method.invoke(Method.java:498)
04:54:07.674  	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
04:54:07.674  	at java.lang.Thread.run(Thread.java:826)
04:54:07.674  Caused by: java.security.cert.CertificateExpiredException: NotAfter: Mon Nov 07 11:57:03 UTC 2022
04:54:07.674  	at sun.security.x509.CertificateValidity.valid(CertificateValidity.java:277)
04:54:07.674  	at sun.security.x509.X509CertImpl.checkValidity(X509CertImpl.java:677)
04:54:07.674  	at sun.security.provider.certpath.BasicChecker.verifyValidity(BasicChecker.java:190)
04:54:07.674  	at sun.security.provider.certpath.BasicChecker.check(BasicChecker.java:144)
04:54:07.674  	at sun.security.provider.certpath.PKIXMasterCertPathValidator.validate(PKIXMasterCertPathValidator.java:125)
04:54:07.674  	... 11 more
04:54:07.674  
04:54:07.674  JavaTest Message: Test threw exception: java.security.cert.CertPathValidatorException: validity check failed
04:54:07.674  JavaTest Message: shutting down test
04:54:07.674  
04:54:07.674  STATUS:Failed.`main' threw exception: java.security.cert.CertPathValidatorException: validity check failed
...
04:54:07.674  TEST RESULT: Failed. Execution failed: `main' threw exception: java.security.cert.CertPathValidatorException: validity check failed
04:54:07.674  --------------------------------------------------
04:58:21.281  Test results: passed: 172; failed: 2
04:58:23.457  Report written to /home/jenkins/workspace/Test_openjdk8_j9_extended.openjdk_aarch64_linux_testList_2/aqa-tests/TKG/output_16824517989991/jdk_security1_0/report/html/report.html
04:58:23.458  Results written to /home/jenkins/workspace/Test_openjdk8_j9_extended.openjdk_aarch64_linux_testList_2/aqa-tests/TKG/output_16824517989991/jdk_security1_0/work
04:58:23.458  Error: Some tests failed or other problems occurred.
04:58:23.458  -----------------------------------
04:58:23.458  jdk_security1_0_FAILED
04:58:23.458  -----------------------------------

@pshipton
Copy link
Member

pshipton commented Feb 1, 2024

Internal build - mac11x64rt10
jdk_security1_0
java/security/cert/CertPathBuilder/akiExt/AKISerialNumber.java

00:04:49  sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
00:04:49  	at java.base/sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:148)
00:04:49  	at java.base/sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:129)
00:04:49  	at java.base/java.security.cert.CertPathBuilder.build(CertPathBuilder.java:297)
00:04:49  	at AKISerialNumber.main(AKISerialNumber.java:131)

Created a new issue #18875 for this.

@jasonkatonica
Copy link
Contributor

This error on its surface appears to be failing due to a certificate expiration. The error thrown in the CertificateValidity class indicates an expiration date of Mon Nov 07 06:57:03 EST 2022 for the certificate which prevents it from being validated. This issue was originally reported on Nov 11th 2022 so the timeline also makes sense from that perspective. We will need to do additional work here to figure out where this certificate comes from within the test.

@pshipton
Copy link
Member

pshipton commented Feb 1, 2024

@jasonkatonica atm I'm only concerned about the latest failure #16312 (comment), maybe I should have created a new issue for it. It seems to be failing across the board today, I think something expired in this test in the last few hours. I will exclude it.

@pshipton
Copy link
Member

pshipton commented Feb 1, 2024

I've created a new issue #18875

@JasonFengJ9
Copy link
Member Author

JasonFengJ9 commented Nov 7, 2024

openjdk21_j9_extended.openjdk_ppc64_aix(paix827)

[2024-11-07T05:50:17.027Z] variation: Mode150
[2024-11-07T05:50:17.027Z] JVM_OPTIONS:  -XX:+UseCompressedOops -Xverbosegclog 

[2024-11-07T07:44:10.937Z] TEST: sun/security/ssl/X509TrustManagerImpl/distrust/Symantec.java

[2024-11-07T07:44:10.937Z] STDERR:
[2024-11-07T07:44:10.937Z] Testing geotrustprimarycag2
[2024-11-07T07:44:10.937Z] sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
[2024-11-07T07:44:10.937Z] 	at java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:388)
[2024-11-07T07:44:10.937Z] 	at java.base/sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:271)
[2024-11-07T07:44:10.937Z] 	at java.base/sun.security.validator.Validator.validate(Validator.java:256)
[2024-11-07T07:44:10.937Z] 	at java.base/sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:241)
[2024-11-07T07:44:10.937Z] 	at java.base/sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:113)
[2024-11-07T07:44:10.937Z] 	at Distrust.testTM(Distrust.java:125)
[2024-11-07T07:44:10.937Z] 	at Distrust.testCertificateChain(Distrust.java:82)
[2024-11-07T07:44:10.937Z] 	at Symantec.main(Symantec.java:77)
[2024-11-07T07:44:10.937Z] 	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
[2024-11-07T07:44:10.937Z] 	at java.base/java.lang.reflect.Method.invoke(Method.java:586)
[2024-11-07T07:44:10.937Z] 	at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
[2024-11-07T07:44:10.937Z] 	at java.base/java.lang.Thread.run(Thread.java:1595)
[2024-11-07T07:44:10.937Z] Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
[2024-11-07T07:44:10.937Z] 	at java.base/sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:148)
[2024-11-07T07:44:10.937Z] 	at java.base/sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:129)
[2024-11-07T07:44:10.937Z] 	at java.base/java.security.cert.CertPathBuilder.build(CertPathBuilder.java:297)
[2024-11-07T07:44:10.937Z] 	at java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:383)
[2024-11-07T07:44:10.937Z] 	... 11 more
[2024-11-07T07:44:10.937Z] java.lang.RuntimeException: Unexpected exception: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
[2024-11-07T07:44:10.937Z] 	at Distrust.testTM(Distrust.java:138)
[2024-11-07T07:44:10.937Z] 	at Distrust.testCertificateChain(Distrust.java:82)
[2024-11-07T07:44:10.937Z] 	at Symantec.main(Symantec.java:77)
[2024-11-07T07:44:10.937Z] 	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
[2024-11-07T07:44:10.938Z] 	at java.base/java.lang.reflect.Method.invoke(Method.java:586)
[2024-11-07T07:44:10.938Z] 	at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
[2024-11-07T07:44:10.938Z] 	at java.base/java.lang.Thread.run(Thread.java:1595)

[2024-11-07T08:30:12.745Z] jdk_security3_0_FAILED

openjdk21_j9_extended.openjdk_aarch64_mac

openjdk21_j9_extended.openjdk_aarch64_linux

openjdk17_j9_extended.openjdk_aarch64_linux

This occurred across Java level & platforms.

@pshipton
Copy link
Member

pshipton commented Nov 7, 2024

I just promoted new jdk17 and 21 levels earlier today, possibly this is just a mismatch between the code and the tests, depending when they ran.

@JasonFengJ9
Copy link
Member Author

openjdk21_j9_extended.openjdk_aarch64_mac

[2024-11-13T06:00:11.364Z] variation: Mode650
[2024-11-13T06:00:11.364Z] JVM_OPTIONS:  -XX:-UseCompressedOops -Xverbosegclog 

[2024-11-13T06:07:17.572Z] TEST: sun/security/ssl/X509TrustManagerImpl/distrust/Symantec.java

[2024-11-13T06:07:17.573Z] STDERR:
[2024-11-13T06:07:17.573Z] Testing geotrustprimarycag2
[2024-11-13T06:07:17.573Z] sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
[2024-11-13T06:07:17.573Z] 	at java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:388)
[2024-11-13T06:07:17.573Z] 	at java.base/sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:271)
[2024-11-13T06:07:17.573Z] 	at java.base/sun.security.validator.Validator.validate(Validator.java:256)
[2024-11-13T06:07:17.573Z] 	at java.base/sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:241)
[2024-11-13T06:07:17.573Z] 	at java.base/sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:113)
[2024-11-13T06:07:17.573Z] 	at Distrust.testTM(Distrust.java:125)
[2024-11-13T06:07:17.573Z] 	at Distrust.testCertificateChain(Distrust.java:82)
[2024-11-13T06:07:17.573Z] 	at Symantec.main(Symantec.java:77)
[2024-11-13T06:07:17.573Z] 	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
[2024-11-13T06:07:17.573Z] 	at java.base/java.lang.reflect.Method.invoke(Method.java:586)
[2024-11-13T06:07:17.573Z] 	at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
[2024-11-13T06:07:17.573Z] 	at java.base/java.lang.Thread.run(Thread.java:1595)
[2024-11-13T06:07:17.573Z] Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
[2024-11-13T06:07:17.573Z] 	at java.base/sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:148)
[2024-11-13T06:07:17.573Z] 	at java.base/sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:129)
[2024-11-13T06:07:17.573Z] 	at java.base/java.security.cert.CertPathBuilder.build(CertPathBuilder.java:297)
[2024-11-13T06:07:17.573Z] 	at java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:383)
[2024-11-13T06:07:17.573Z] 	... 11 more
[2024-11-13T06:07:17.573Z] java.lang.RuntimeException: Unexpected exception: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
[2024-11-13T06:07:17.573Z] 	at Distrust.testTM(Distrust.java:138)
[2024-11-13T06:07:17.573Z] 	at Distrust.testCertificateChain(Distrust.java:82)
[2024-11-13T06:07:17.573Z] 	at Symantec.main(Symantec.java:77)
[2024-11-13T06:07:17.573Z] 	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
[2024-11-13T06:07:17.573Z] 	at java.base/java.lang.reflect.Method.invoke(Method.java:586)
[2024-11-13T06:07:17.573Z] 	at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
[2024-11-13T06:07:17.573Z] 	at java.base/java.lang.Thread.run(Thread.java:1595)

[2024-11-13T06:12:45.445Z] jdk_security3_1_FAILED

openjdk17_j9_extended.openjdk_x86-64_mac

@KostasTsiounis
Copy link
Contributor

KostasTsiounis commented Nov 18, 2024

The test fails to build the certificate chain from the hardcoded PEM file.

The test was recently updated with this commit.

After reverting this commit and running with the OpenJ9 nightly build, the test passes: https://hyc-runtimes-jenkins.swg-devops.com/view/Test_grinder/job/Grinder/44998/

I'm further investigating to see what this commit changed, but it looks like a test rather than an underlying code problem.

@pshipton
Copy link
Member

Presumably the test still passes on an Adoptium build?

@KostasTsiounis
Copy link
Contributor

Actually it still fails on the nightly Adoptium build: https://hyc-runtimes-jenkins.swg-devops.com/view/Test_grinder/job/Grinder/45005/

@KostasTsiounis
Copy link
Contributor

Could it have something to do with the fact that the OpenJ9 and Semeru/Temurin builds might bundle different certificates?

@KostasTsiounis
Copy link
Contributor

I rerun the test as is (without reverting latest change) for different builds and here's what I got:

@pshipton
Copy link
Member

Could it have something to do with the fact that the OpenJ9 and Semeru/Temurin builds might bundle different certificates?

Yup. So we should either exclude the test, or maybe update it work with the Mozilla certificates (in addition to OpenJDK certificates), if we think the test is of sufficient value and could possibly expose a Semeru problem in the future.

@KostasTsiounis
Copy link
Contributor

By the way, the test has changed name. It was sun/security/ssl/X509TrustManagerImpl/Symantec/Distrust.java before, while now it's sun/security/ssl/X509TrustManagerImpl/distrust/Symantec.java and it seems to have been part of jdk_security3.

It was reported again here: #15106

And you excluded it back then with: adoptium/aqa-tests#3701

@pshipton
Copy link
Member

Ok, I'll create an exclude for it then.

pshipton added a commit to pshipton/openjdk-tests that referenced this issue Nov 18, 2024
The test doesn't work with the Mozilla certificates.

Issue eclipse-openj9/openj9#16312

The test was renamed and this is related to
adoptium#3701

Signed-off-by: Peter Shipton <Peter_Shipton@ca.ibm.com>
@pshipton
Copy link
Member

Created adoptium/aqa-tests#5758

JasonFengJ9 pushed a commit to adoptium/aqa-tests that referenced this issue Nov 18, 2024
The test doesn't work with the Mozilla certificates.

Issue eclipse-openj9/openj9#16312

The test was renamed and this is related to
#3701

Signed-off-by: Peter Shipton <Peter_Shipton@ca.ibm.com>
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

5 participants