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.27k stars 720 forks source link

sanity.openk jdk_security1_0 java.security.KeyException: Access is denied #8879

Open pshipton opened 4 years ago

pshipton commented 4 years ago

https://ci.eclipse.org/openj9/job/Test_openjdk8_j9_sanity.openjdk_x86-32_windows_Personal/2 https://ci.eclipse.org/openj9/job/Test_openjdk8_j9_sanity.openjdk_x86-64_windows_Personal/3 jdk_security1_0 java/security/KeyPairGenerator/FinalizeHalf.java.FinalizeHalf

java.security.ProviderException: java.security.KeyException: Access is denied.

    at sun.security.mscapi.CKeyPairGenerator$RSA.generateKeyPair(CKeyPairGenerator.java:126)
    at java.security.KeyPairGenerator$Delegate.generateKeyPair(KeyPairGenerator.java:697)
    at FinalizeHalf.test(FinalizeHalf.java:76)
    at FinalizeHalf.main(FinalizeHalf.java:54)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:298)
    at java.lang.Thread.run(Thread.java:821)
Caused by: java.security.KeyException: Access is denied.

    at sun.security.mscapi.CKeyPairGenerator$RSA.generateCKeyPair(Native Method)
    at sun.security.mscapi.CKeyPairGenerator$RSA.generateKeyPair(CKeyPairGenerator.java:121)
    ... 9 more

JavaTest Message: Test threw exception: java.security.ProviderException
JavaTest Message: shutting down test

java/security/Signature/SignatureLength.java.SignatureLength

java.security.ProviderException: java.security.KeyException: Access is denied.

    at sun.security.mscapi.CKeyPairGenerator$RSA.generateKeyPair(CKeyPairGenerator.java:126)
    at java.security.KeyPairGenerator$Delegate.generateKeyPair(KeyPairGenerator.java:697)
    at SignatureLength.main0(SignatureLength.java:97)
    at SignatureLength.main(SignatureLength.java:63)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:298)
    at java.lang.Thread.run(Thread.java:821)
Caused by: java.security.KeyException: Access is denied.

    at sun.security.mscapi.CKeyPairGenerator$RSA.generateCKeyPair(Native Method)
    at sun.security.mscapi.CKeyPairGenerator$RSA.generateKeyPair(CKeyPairGenerator.java:121)
    ... 9 more

JavaTest Message: Test threw exception: java.security.ProviderException
JavaTest Message: shutting down test
pshipton commented 4 years ago

This was first reported in https://github.com/eclipse/openj9/issues/8374#issuecomment-579996187

@jdekonin these tests appear to be passing at AdoptOpenJDK, can we figure out what the difference in machine configuration is? https://ci.adoptopenjdk.net/job/Test_openjdk8_j9_sanity.openjdk_x86-64_windows/145/testReport/

jdekonin commented 4 years ago

https://github.com/ibmruntimes/openj9-openjdk-jdk/issues/82

JasonFengJ9 commented 4 years ago

This is observed in an internal build Test_openjdk8_j9_sanity.openjdk_x86-32_windows_Nightly/280 as well.

02:52:51  STDERR:
02:52:51  java.security.ProviderException: java.security.KeyException: Access is denied.
02:52:51  
02:52:51    at sun.security.mscapi.CKeyPairGenerator$RSA.generateKeyPair(CKeyPairGenerator.java:126)
02:52:51    at java.security.KeyPairGenerator$Delegate.generateKeyPair(KeyPairGenerator.java:697)
02:52:51    at FinalizeHalf.test(FinalizeHalf.java:76)
02:52:51    at FinalizeHalf.main(FinalizeHalf.java:54)
02:52:51    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
02:52:51    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
02:52:51    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
02:52:51    at java.lang.reflect.Method.invoke(Method.java:498)
02:52:51    at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:298)
02:52:51    at java.lang.Thread.run(Thread.java:821)
02:52:51  Caused by: java.security.KeyException: Access is denied.
02:52:51  
02:52:51    at sun.security.mscapi.CKeyPairGenerator$RSA.generateCKeyPair(Native Method)
02:52:51    at sun.security.mscapi.CKeyPairGenerator$RSA.generateKeyPair(CKeyPairGenerator.java:121)
02:52:51    ... 9 more
02:52:51  
02:52:51  JavaTest Message: Test threw exception: java.security.ProviderException
02:52:51  JavaTest Message: shutting down test

02:52:51  ACTION: main -- Failed. Execution failed: `main' threw exception: java.security.ProviderException: java.security.KeyException: Access is denied.
02:52:51  REASON: Assumed action based on file name: run main FinalizeHalf 
pshipton commented 4 years ago

sanity.openjdk has been reconfigured to match OpenJDK tier1 testing. This test is no longer in the sanity suite. Removing the "Blocking openjdk.sanity".

jdekonin commented 3 years ago

What level of testing is needed to reproduce this now? If this is no longer a problem can the issue be closed?

pshipton commented 3 years ago

Same as https://github.com/eclipse/openj9/issues/8375#issuecomment-608424229. @llxia