eclipse-openj9 / openj9

Eclipse OpenJ9: A Java Virtual Machine for OpenJDK that's optimized for small footprint, fast start-up, and high throughput. Builds on Eclipse OMR (https://github.com/eclipse/omr) and combines with the Extensions for OpenJDK for OpenJ9 repo.
Other
3.28k stars 722 forks source link

security/infra/java/security/cert/CertPathValidator/certification/AmazonCA.java TEST FAILED: unexpected revocation date #14878

Open JasonFengJ9 opened 2 years ago

JasonFengJ9 commented 2 years ago

Failure link

From an internal build job/Test_openjdk11_j9_extended.openjdk_aarch64_mac/1/(macaarch64rt7):

openjdk version "11.0.15-ea" 2022-04-19
IBM Semeru Runtime Open Edition 11.0.15.0-m2 (build 11.0.15-ea+8)
Eclipse OpenJ9 VM 11.0.15.0-m2 (build openj9-0.32.0-m2, JRE 11 Mac OS X aarch64-64-Bit 20220405_25 (JIT enabled, AOT enabled)
OpenJ9   - 959fc5030
OMR      - ab24b6666
JCL      - f84454d938 based on jdk-11.0.15+8)

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

Optional info

Failure output (captured from console output)

[2022-04-05T21:11:58.470Z] variation: Mode650
[2022-04-05T21:11:58.470Z] JVM_OPTIONS:  -XX:-UseCompressedOops 

[2022-04-05T21:12:04.249Z] TEST: security/infra/java/security/cert/CertPathValidator/certification/AmazonCA.java

[2022-04-05T21:12:04.257Z] certpath: Verified signature of OCSP Response
[2022-04-05T21:12:04.257Z] certpath: OCSP response validity interval is from Sat Apr 02 19:12:35 EDT 2022 until Sat Apr 09 20:12:35 EDT 2022
[2022-04-05T21:12:04.257Z] certpath: Checking validity of OCSP response on Tue Apr 05 17:12:04 EDT 2022 with allowed interval between Tue Apr 05 16:57:04 EDT 2022 and Tue Apr 05 17:27:04 EDT 2022
[2022-04-05T21:12:04.257Z] java.lang.RuntimeException: TEST FAILED: unexpected revocation date
[2022-04-05T21:12:04.257Z]  at ValidatePathWithParams.validate(ValidatePathWithParams.java:206)
[2022-04-05T21:12:04.257Z]  at AmazonCA_2.runTest(AmazonCA.java:345)
[2022-04-05T21:12:04.257Z]  at AmazonCA.main(AmazonCA.java:65)
[2022-04-05T21:12:04.257Z]  at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[2022-04-05T21:12:04.257Z]  at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[2022-04-05T21:12:04.257Z]  at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[2022-04-05T21:12:04.257Z]  at java.base/java.lang.reflect.Method.invoke(Method.java:566)
[2022-04-05T21:12:04.257Z]  at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
[2022-04-05T21:12:04.257Z]  at java.base/java.lang.Thread.run(Thread.java:871)
[2022-04-05T21:12:04.257Z] 
[2022-04-05T21:12:04.257Z] JavaTest Message: Test threw exception: java.lang.RuntimeException: TEST FAILED: unexpected revocation date

[2022-04-05T21:12:12.665Z] jdk_security_infra_1_FAILED

Might be related to https://github.com/eclipse-openj9/openj9/issues/12218 https://github.com/adoptium/temurin-build/issues/2527

AdamBrousseau commented 2 years ago

Possibly due to https://github.com/adoptium/temurin-build/pull/2884

pshipton commented 2 years ago

@JasonFengJ9 is this all platforms?

JasonFengJ9 commented 2 years ago

is this all platforms?

only seen at aarch64_mac

pshipton commented 2 years ago

It's off by one second. Maybe just a timing issue with the test. Pls try a small grinder.

17:12:04  Certificate revocation date:Mon Jan 28 18:38:56 EST 2019
17:12:04  Expected revocation date:Mon Jan 28 18:38:57 EST 2019
pshipton commented 2 years ago

Although the test does hard code the value to validate, including the seconds.

        pathValidator.validate(new String[]{REVOKED, INT},
                ValidatePathWithParams.Status.REVOKED,
                "Mon Jan 28 15:38:57 PST 2019", System.out);
JasonFengJ9 commented 2 years ago

15x grinder - job/Grinder/22419/

pshipton commented 2 years ago

The grinder passed. @knn-k fyi, not sure if this is an issue with amac, or a test problem.

JasonFengJ9 commented 2 years ago

JDK18 - job/Test_openjdk18_j9_extended.openjdk_aarch64_linux/19/ (ub18-aarch64-8)

[2022-04-16T19:33:56.175Z] certpath: Verified signature of OCSP Response
[2022-04-16T19:33:56.175Z] certpath: OCSP response validity interval is from Sat Apr 16 11:38:13 EDT 2022 until Sat Apr 23 12:38:13 EDT 2022
[2022-04-16T19:33:56.175Z] certpath: Checking validity of OCSP response on Sat Apr 16 15:33:54 EDT 2022 with allowed interval between Sat Apr 16 15:18:54 EDT 2022 and Sat Apr 16 15:48:54 EDT 2022
[2022-04-16T19:33:56.175Z] java.lang.RuntimeException: TEST FAILED: unexpected revocation date
[2022-04-16T19:33:56.175Z]  at ValidatePathWithParams.validate(ValidatePathWithParams.java:206)
[2022-04-16T19:33:56.175Z]  at AmazonCA_3.runTest(AmazonCA.java:444)
[2022-04-16T19:33:56.175Z]  at AmazonCA.main(AmazonCA.java:66)
[2022-04-16T19:33:56.175Z]  at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
[2022-04-16T19:33:56.175Z]  at java.base/java.lang.reflect.Method.invoke(Method.java:577)
[2022-04-16T19:33:56.175Z]  at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
[2022-04-16T19:33:56.175Z]  at java.base/java.lang.Thread.run(Thread.java:852)
[2022-04-16T19:33:56.175Z] 
[2022-04-16T19:33:56.175Z] JavaTest Message: Test threw exception: java.lang.RuntimeException: TEST FAILED: unexpected revocation date

job/Test_openjdk18_j9_extended.openjdk_s390x_linux/15/ (rhel7s390x-3-6)

[2022-04-16T21:26:11.152Z] certpath: Verified signature of OCSP Response
[2022-04-16T21:26:11.152Z] certpath: OCSP response validity interval is from Sat Apr 16 08:38:13 PDT 2022 until Sat Apr 23 09:38:13 PDT 2022
[2022-04-16T21:26:11.152Z] certpath: Checking validity of OCSP response on Sat Apr 16 14:26:09 PDT 2022 with allowed interval between Sat Apr 16 14:11:09 PDT 2022 and Sat Apr 16 14:41:09 PDT 2022
[2022-04-16T21:26:11.152Z] certpath: X509CertSelector.match(SN: 3e8
[2022-04-16T21:26:11.152Z]   Issuer: CN=Hongkong Post Root CA 1, O=Hongkong Post, C=HK
[2022-04-16T21:26:11.152Z]   Subject: CN=Hongkong Post Root CA 1, O=Hongkong Post, C=HK)
[2022-04-16T21:26:11.152Z] certpath: X509CertSelector.match: subject DNs don't match
[2022-04-16T21:26:11.152Z] java.lang.RuntimeException: TEST FAILED: unexpected revocation date
[2022-04-16T21:26:11.152Z]  at ValidatePathWithParams.validate(ValidatePathWithParams.java:206)
[2022-04-16T21:26:11.152Z]  at AmazonCA_3.runTest(AmazonCA.java:444)
[2022-04-16T21:26:11.152Z]  at AmazonCA.main(AmazonCA.java:66)
[2022-04-16T21:26:11.152Z]  at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
[2022-04-16T21:26:11.152Z]  at java.base/java.lang.reflect.Method.invoke(Method.java:577)
[2022-04-16T21:26:11.152Z]  at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
[2022-04-16T21:26:11.152Z]  at java.base/java.lang.Thread.run(Thread.java:852)
[2022-04-16T21:26:11.152Z] 
[2022-04-16T21:26:11.152Z] JavaTest Message: Test threw exception: java.lang.RuntimeException: TEST FAILED: unexpected revocation date
JasonFengJ9 commented 1 year ago

JDK21 aarch64_mac(macaarch64rt8)

05:08:00  variation: Mode650
05:08:00  JVM_OPTIONS:  -XX:-UseCompressedOops 

05:08:14  TEST: security/infra/java/security/cert/CertPathValidator/certification/MicrosoftTLS.java

05:08:14  certpath: X509CertSelector.match: subject DNs don't match
05:08:14  java.lang.RuntimeException: TEST FAILED: couldn't determine EE certificate status
05:08:14    at ValidatePathWithParams.validate(ValidatePathWithParams.java:177)
05:08:14    at MicrosoftRSATLS.runTest(MicrosoftTLS.java:340)
05:08:14    at MicrosoftTLS.main(MicrosoftTLS.java:58)
05:08:14    at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
05:08:14    at java.base/java.lang.reflect.Method.invoke(Method.java:580)
05:08:14    at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
05:08:14    at java.base/java.lang.Thread.run(Thread.java:1595)
05:08:14  Caused by: java.security.cert.CertPathValidatorException: Response is unreliable: its validity interval is out-of-date
05:08:14    at java.base/sun.security.provider.certpath.PKIXMasterCertPathValidator.validate(PKIXMasterCertPathValidator.java:135)
05:08:14    at java.base/sun.security.provider.certpath.PKIXCertPathValidator.validate(PKIXCertPathValidator.java:224)
05:08:14    at java.base/sun.security.provider.certpath.PKIXCertPathValidator.validate(PKIXCertPathValidator.java:144)
05:08:14    at java.base/sun.security.provider.certpath.PKIXCertPathValidator.engineValidate(PKIXCertPathValidator.java:83)
05:08:14    at java.base/java.security.cert.CertPathValidator.validate(CertPathValidator.java:309)
05:08:14    at ValidatePathWithParams.doCertPathValidate(ValidatePathWithParams.java:288)
05:08:14    at ValidatePathWithParams.validate(ValidatePathWithParams.java:142)
05:08:14    ... 6 more
05:08:14  Caused by: java.security.cert.CertPathValidatorException: Response is unreliable: its validity interval is out-of-date
05:08:14    at java.base/sun.security.provider.certpath.OCSPResponse.verify(OCSPResponse.java:618)
05:08:14    at java.base/sun.security.provider.certpath.OCSP.check(OCSP.java:141)
05:08:14    at java.base/sun.security.provider.certpath.RevocationChecker.checkOCSP(RevocationChecker.java:780)
05:08:14    at java.base/sun.security.provider.certpath.RevocationChecker.check(RevocationChecker.java:369)
05:08:14    at java.base/sun.security.provider.certpath.RevocationChecker.check(RevocationChecker.java:343)
05:08:14    at java.base/sun.security.provider.certpath.PKIXMasterCertPathValidator.validate(PKIXMasterCertPathValidator.java:125)
05:08:14    ... 12 more
05:08:14  
05:08:14  JavaTest Message: Test threw exception: java.lang.RuntimeException: TEST FAILED: couldn't determine EE certificate status

05:08:14  TEST RESULT: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: TEST FAILED: couldn't determine EE certificate status
05:08:14  --------------------------------------------------
05:08:21  Test results: passed: 13; failed: 1
05:08:28  Report written to /Users/jenkins/workspace/Test_openjdk21_j9_extended.openjdk_aarch64_mac_Personal/aqa-tests/TKG/output_16940760415813/jdk_security_infra_1/report/html/report.html
05:08:28  Results written to /Users/jenkins/workspace/Test_openjdk21_j9_extended.openjdk_aarch64_mac_Personal/aqa-tests/TKG/output_16940760415813/jdk_security_infra_1/work
05:08:28  Error: Some tests failed or other problems occurred.
05:08:28  -----------------------------------
05:08:28  jdk_security_infra_1_FAILED
pshipton commented 1 year ago

@JasonFengJ9 pls create a new issue for the previous comment, it doesn't match the description of this issue.

JasonFengJ9 commented 1 year ago

Created