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_security3_0_FAILED sun/security/ec/TestEC.java ProviderException: Could not convert keys to native format #19479

Open
JasonFengJ9 opened this issue May 10, 2024 · 6 comments

Comments

@JasonFengJ9
Copy link
Member

JasonFengJ9 commented May 10, 2024

Failure link

From an internal build(rhel8-aarch64-2):

openjdk version "1.8.0_422-beta"
IBM Semeru Runtime Open Edition (build 1.8.0_422-beta-202405092304-b01)
Eclipse OpenJ9 VM (build master-d9a1f142cc, JRE 1.8.0 Linux aarch64-64-Bit Compressed References 20240509_912 (JIT enabled, AOT enabled)
OpenJ9   - d9a1f142cc
OMR      - 9a431c440
JCL      - 4cadd3252 based on jdk8u422-b01)

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

Optional info

Failure output (captured from console output)

[2024-05-10T00:17:59.590Z] variation: Mode150
[2024-05-10T00:17:59.590Z] JVM_OPTIONS:  -XX:+UseCompressedOops -Xverbosegclog 

[2024-05-10T00:22:58.832Z] TEST: sun/security/ec/TestEC.java

[2024-05-10T00:22:58.832Z] STDERR:
[2024-05-10T00:22:58.832Z] java.security.ProviderException: Could not convert keys to native format
[2024-05-10T00:22:58.832Z] 	at sun.security.ec.NativeECDSASignature.engineVerify(NativeECDSASignature.java:437)
[2024-05-10T00:22:58.832Z] 	at java.security.Signature$Delegate.engineVerify(Signature.java:1392)
[2024-05-10T00:22:58.832Z] 	at java.security.Signature.verify(Signature.java:769)
[2024-05-10T00:22:58.832Z] 	at TestECDSA.verify(TestECDSA.java:97)
[2024-05-10T00:22:58.833Z] 	at TestECDSA.test(TestECDSA.java:182)
[2024-05-10T00:22:58.833Z] 	at TestECDSA.main(TestECDSA.java:155)
[2024-05-10T00:22:58.833Z] 	at TestEC.main0(TestEC.java:92)
[2024-05-10T00:22:58.833Z] 	at TestEC.main(TestEC.java:70)
[2024-05-10T00:22:58.833Z] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[2024-05-10T00:22:58.833Z] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[2024-05-10T00:22:58.833Z] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[2024-05-10T00:22:58.833Z] 	at java.lang.reflect.Method.invoke(Method.java:503)
[2024-05-10T00:22:58.833Z] 	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
[2024-05-10T00:22:58.833Z] 	at java.lang.Thread.run(Thread.java:826)
[2024-05-10T00:22:58.833Z] 
[2024-05-10T00:22:58.833Z] JavaTest Message: Test threw exception: java.security.ProviderException: Could not convert keys to native format

[2024-05-10T00:44:33.615Z] Test results: passed: 610; failed: 1
[2024-05-10T00:44:37.041Z] Report written to /home/jenkins/workspace/Test_openjdk8_j9_extended.openjdk_aarch64_linux_testList_0/aqa-tests/TKG/output_17153001803196/jdk_security3_0/report/html/report.html
[2024-05-10T00:44:37.041Z] Results written to /home/jenkins/workspace/Test_openjdk8_j9_extended.openjdk_aarch64_linux_testList_0/aqa-tests/TKG/output_17153001803196/jdk_security3_0/work
[2024-05-10T00:44:37.041Z] Error: Some tests failed or other problems occurred.
[2024-05-10T00:44:37.041Z] -----------------------------------
[2024-05-10T00:44:37.041Z] jdk_security3_0_FAILED

50x internal grinder - all failed

JDK8 ppc64le_linux(rtj-rhel8le-rtp-test-qywpx-1)

[2024-05-09T23:46:01.643Z] variation: Mode150
[2024-05-09T23:46:01.643Z] JVM_OPTIONS:  -XX:+UseCompressedOops -Xverbosegclog 
[2024-05-09T23:51:51.679Z] TEST: sun/security/ec/TestEC.java
[2024-05-09T23:51:51.681Z] STDERR:
[2024-05-09T23:51:51.681Z] java.security.ProviderException: Keys could not be converted to native OpenSSL format
[2024-05-09T23:51:51.681Z] 	at sun.security.ec.NativeECDSASignature.engineSign(NativeECDSASignature.java:403)
[2024-05-09T23:51:51.681Z] 	at java.security.Signature$Delegate.engineSign(Signature.java:1380)
[2024-05-09T23:51:51.681Z] 	at java.security.Signature.sign(Signature.java:696)
[2024-05-09T23:51:51.681Z] 	at TestCurves.testSigning(TestCurves.java:132)
[2024-05-09T23:51:51.681Z] 	at TestCurves.main(TestCurves.java:85)
[2024-05-09T23:51:51.681Z] 	at TestEC.main0(TestEC.java:93)
[2024-05-09T23:51:51.681Z] 	at TestEC.main(TestEC.java:70)
@pshipton
Copy link
Member

@jasonkatonica can someone take a look pls.

@pshipton
Copy link
Member

Related to ibmruntimes/openj9-openjdk-jdk8#752 I assume.
@KostasTsiounis

@KostasTsiounis
Copy link
Contributor

Does it just present itself on RHEL and Java8, or has it been seen elsewhere?

@JasonFengJ9
Copy link
Member Author

has it been seen elsewhere?

Yes, it is also seen at
JDK8 aarch64_linux(sles15-aarch64-6)
JDK11 aarch64_linux(rhel9-aarch64-2)

@KostasTsiounis
Copy link
Contributor

I have created a prototype fix that fixes that part of the test, but it fails at another point.

The TestEC test runs the following subtests:

new TestECDH().main(p);
new TestECDSA().main(p);
new TestCurves().main(p);
new TestKeyFactory().main(p);
new TestECGenSpec().main(p);
new ReadPKCS12().main(p);
new ReadCertificates().main(p);

new ClientJSSEServerJSSE().main(p);

It was failing at TestECDSA and TestCurves, which my change fixes, but it then fails at ClientJSSEServerJSSE. This same test fails with the nightly too, if I just leave that part in.

@JasonFengJ9 Question is, have you seen that failure before?

java.lang.Exception: *** Test 'Client JSSE - Server JSSE' failed ***
	at CipherTest.run(CipherTest.java:209)
	at CipherTest.main(CipherTest.java:337)
	at ClientJSSEServerJSSE.main(ClientJSSEServerJSSE.java:67)
	at TestEC.main0(TestEC.java:114)
	at TestEC.main(TestEC.java:81)
	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:572)
	at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
	at java.base/java.lang.Thread.run(Thread.java:839)

@JasonFengJ9
Copy link
Member Author

Question is, have you seen that failure before?
java.lang.Exception: *** Test 'Client JSSE - Server JSSE' failed ***

@KostasTsiounis It appears a known failure

RI failed this test as well.

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

3 participants