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

openJcePlusTests_0_FAILED InvalidKeySpec Inappropriate key specification: Failed to create XEC private key #19205

Open JasonFengJ9 opened 8 months ago

JasonFengJ9 commented 8 months ago

Failure link

From an internal build(rhel8s390x-svl-rt9-1):

openjdk version "22-beta" 2024-03-19
IBM Semeru Runtime Open Edition 22+36-202403200230 (build 22-beta+36-202403200230)
Eclipse OpenJ9 VM 22+36-202403200230 (build master-7c9937b26, JRE 22 Linux s390x-64-Bit Compressed References 20240320_23 (JIT enabled, AOT enabled)
OpenJ9   - 7c9937b26
OMR      - 1bf2ef421
JCL      - 4803bcabd based on jdk-22+36)

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

Optional info

Failure output (captured from console output)

[2024-03-20T04:09:23.342Z] variation: NoOptions
[2024-03-20T04:09:23.342Z] JVM_OPTIONS:  

[2024-03-20T04:09:23.343Z] TESTING:
[2024-03-20T04:09:25.309Z] Buildfile: /home/jenkins/workspace/Test_openjdk22_j9_extended.functional_s390x_linux_testList_0/jvmtest/functional/OpenJcePlusTests/test.xml

[2024-03-20T04:24:16.798Z]      [test]     [junit] Running gcm_oneReadByteCorrupt test
[2024-03-20T04:24:16.798Z]      [test]     [junit]   Fail. No exception thrown.

[2024-03-20T04:40:39.436Z]      [test]     [junit] Result(should be false): false
[2024-03-20T04:45:09.006Z]      [test]     [junit] Tests run: 1705, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 2,082.67 sec
[2024-03-20T04:45:09.006Z]      [test] 
[2024-03-20T04:45:09.006Z]      [test] BUILD FAILED
[2024-03-20T04:45:09.006Z]      [test] /home/jenkins/workspace/Test_openjdk22_j9_extended.functional_s390x_linux_testList_0/jvmtest/functional/OpenJcePlusTests/test.xml:44: Test ibm.jceplus.junit.TestAll failed
[2024-03-20T04:45:09.006Z]      [test] 
[2024-03-20T04:45:09.006Z]      [test] Total time: 35 minutes 34 seconds
[2024-03-20T04:45:09.006Z] 
[2024-03-20T04:45:09.006Z] BUILD FAILED
[2024-03-20T04:45:09.006Z] /home/jenkins/workspace/Test_openjdk22_j9_extended.functional_s390x_linux_testList_0/jvmtest/functional/OpenJcePlusTests/test.xml:33: Java returned: 1
[2024-03-20T04:45:09.006Z] 
[2024-03-20T04:45:09.006Z] Total time: 35 minutes 37 seconds
[2024-03-20T04:45:09.006Z] -----------------------------------
[2024-03-20T04:45:09.006Z] openJcePlusTests_0_FAILED

50x internal grinder - https://github.com/eclipse-openj9/openj9/issues/19205#issuecomment-2013739238

pshipton commented 8 months ago

Grinder succeeded 10/10 on ubu22s390x-svl-rt9-1, ubu22s390x-svl-rt4-1.

Failed 1/10 on ubu22s390x-svl-rt5-1 Failed 1/10 on rhel9s390x-svl-rt3-1 Failed 1/10 on ubu22s390x-rt-1

The following is in the output, but it doesn't cause any failure as the passing runs have it too. I'm not sure what the cause of the Errors: 1 is. I've tried searching the output for different things, but didn't find anything.

20:07:43       [test]     [junit] Running gcm_oneReadByteCorrupt test
20:07:43       [test]     [junit]   Fail. No exception thrown.

@jasonkatonica pls take a look.

pshipton commented 8 months ago

The failures aren't in the 0.44 builds but I assume openJcePlus is the same. Added to the 0.44 milestone for now.

KostasTsiounis commented 8 months ago

Grinder succeeded 10/10 on ubu22s390x-svl-rt9-1, ubu22s390x-svl-rt4-1.

Failed 1/10 on ubu22s390x-svl-rt5-1 Failed 1/10 on rhel9s390x-svl-rt3-1 Failed 1/10 on ubu22s390x-rt-1

The following is in the output, but it doesn't cause any failure as the passing runs have it too. I'm not sure what the cause of the Errors: 1 is. I've tried searching the output for different things, but didn't find anything.

20:07:43       [test]     [junit] Running gcm_oneReadByteCorrupt test
20:07:43       [test]     [junit]   Fail. No exception thrown.

@jasonkatonica pls take a look.

The thing that is stated here as a failure is not actually was is causing this intermittent failure. This is a test that needs to be amended, as it is not actually testing what we mean it to, which is the reason why it is only printing this message, instead of throwing an exception. An issue has been opened on our end to fix that.

The issue that is actually causing these failures is:

java.security.spec.InvalidKeySpecException: Inappropriate key specification: Failed to create XEC private key
    at openjceplus/com.ibm.crypto.plus.provider.XDHKeyFactory.engineGeneratePrivate(XDHKeyFactory.java:112)
    at java.base/java.security.KeyFactory.generatePrivate(KeyFactory.java:383)
    at ibm.jceplus.junit.base.BaseTestXDH.runBasicTest(BaseTestXDH.java:246)
    at ibm.jceplus.junit.base.BaseTestXDH.runBasicTests(BaseTestXDH.java:208)
    at ibm.jceplus.junit.base.BaseTestXDH.testXDH_runBasicTests(BaseTestXDH.java:60)
    at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)

We have noticed that happening intermittently throughout our runs and have opened up an issue (see https://github.ibm.com/runtimes/jit-crypto/issues/386) to figure it out and resolve it.

KostasTsiounis commented 8 months ago

I don't think this is a stop ship issue at the moment. What do you think @jasonkatonica ?

pshipton commented 8 months ago

Removed it from the milestone plan.

jasonkatonica commented 8 months ago

I don't think this is a stop ship issue at the moment. What do you think @jasonkatonica ?

Agreed, I dont believe this is a stop ship issue at this time.

JasonFengJ9 commented 7 months ago

JDK11 x86-64_windows(win19x86-svl-rt5-1)

openjdk version "11.0.23" 2024-04-16
IBM Semeru Runtime Open Edition 11.0.23.0-m2 (build 11.0.23+7)
Eclipse OpenJ9 VM 11.0.23.0-m2 (build v0.44.0-release-8b079b5c1, JRE 11 Windows Server 2019 amd64-64-Bit Compressed References 20240411_884 (JIT enabled, AOT enabled)
OpenJ9   - 8b079b5c1
OMR      - 254af5a04
JCL      - 0f9c69e64d based on jdk-11.0.23+7)

[2024-04-11T21:02:02.977Z]      [test]     [junit] Running gcm_oneReadByteCorrupt test
[2024-04-11T21:02:02.977Z]      [test]     [junit]   Fail. No exception thrown.

[2024-04-11T21:20:21.799Z]      [test]     [junit] Tests run: 1698, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1,213.262 sec
[2024-04-11T21:20:21.799Z]      [test] 
[2024-04-11T21:20:21.799Z]      [test] BUILD FAILED
[2024-04-11T21:20:21.799Z]      [test] C:\Users\jenkins\workspace\Test_openjdk11_j9_extended.functional_x86-64_windows_testList_0\jvmtest\functional\OpenJcePlusTests\test.xml:44: Test ibm.jceplus.junit.TestAll failed
[2024-04-11T21:20:21.799Z]      [test] 
[2024-04-11T21:20:21.799Z]      [test] Total time: 21 minutes 37 seconds
[2024-04-11T21:20:21.799Z] 
[2024-04-11T21:20:21.799Z] BUILD FAILED
[2024-04-11T21:20:21.799Z] C:\Users\jenkins\workspace\Test_openjdk11_j9_extended.functional_x86-64_windows_testList_0\jvmtest\functional\OpenJcePlusTests\test.xml:33: Java returned: 1
[2024-04-11T21:20:21.799Z] 
[2024-04-11T21:20:21.799Z] Total time: 21 minutes 41 seconds
[2024-04-11T21:20:21.799Z] -----------------------------------
[2024-04-11T21:20:21.799Z] openJcePlusTests_0_FAILED
pshipton commented 4 months ago

https://hyc-runtimes-jenkins.swg-devops.com/job/Test_openjdk17_j9_extended.functional_x86-64_windows_testList_1/549/

JasonFengJ9 commented 1 month ago

JDK11 ppc64_aix_fips140_3_openjceplusfips(p10aix134)

[2024-10-05T04:09:16.634Z] variation: NoOptions
[2024-10-05T04:09:16.634Z] JVM_OPTIONS:   -Dsemeru.fips=true -Dsemeru.customprofile=OpenJCEPlusFIPS

[2024-10-05T04:39:45.897Z] [ERROR] Errors: 
[2024-10-05T04:39:45.897Z] [ERROR]   TestXDH>BaseTestXDH.testXDH_runBasicTests:60->BaseTestXDH.runBasicTests:211->BaseTestXDH.runBasicTest:246 � InvalidKeySpec Inappropriate key specification: Failed to create XEC private key

[2024-10-05T04:39:45.897Z] openJcePlusTests_0_FAILED
jasonkatonica commented 1 month ago

We have addressed the issue stated above :

20:07:43       [test]     [junit] Running gcm_oneReadByteCorrupt test
20:07:43       [test]     [junit]   Fail. No exception thrown.

with a test case update in various OpenJCEPlus releases. This PR is the updates made to the main branch such that we no longer see this error message or the word fail among other improvements made to this specific test.

The intermittant failure with the following:

TestXDH>BaseTestXDH.testXDH_runBasicTests:60->BaseTestXDH.runBasicTests:211->BaseTestXDH.runBasicTest:246 � InvalidKeySpec Inappropriate key specification: Failed to create XEC private key

was also fixed with a OpenJCEPlus update. There was a provider encoding parsing error that was fixed with this PR, once merged we expect that this failure would also be resolved.

pshipton commented 1 month ago

@jasonkatonica just a reminder there is a test excluded label so after the fixes are merged and before this is closed the test needs to be unexcluded.

jasonkatonica commented 1 month ago

OK makes sense there is a test excluded tag. I hadnt noticed it before.

In this particular case the various tests reported above were never excluded from running. One of the test failures was very intermittent when it failed ( BaseTestXDH ) the other test ( message Fail. No exception thrown. ) never really failed, it just did not look correct in the log. So at this point there is no additional updates required to unexclude the tests.

JasonFengJ9 commented 1 month ago

The test PR wasn't merged.