JDK-8173182 : sun/security/pkcs11/MessageDigest/TestCloning.java intermittent failure on solaris_x64
  • Type: Bug
  • Component: security-libs
  • Sub-Component: javax.crypto:pkcs11
  • Affected Version: 8
  • Priority: P4
  • Status: Resolved
  • Resolution: Cannot Reproduce
  • OS: solaris
  • Submitted: 2017-01-23
  • Updated: 2017-03-03
  • Resolved: 2017-03-03
Related Reports
Relates :  
The test is falling intermittently on solaris x64 platform (version 5.10, product, c2) 

ACTION: compile -- Passed. Compilation successful 
REASON: .class file out of date or does not exist 
TIME: 0.018 seconds 
command: compile -XDignore.symbol.file=true <some_path>/jdk/test/sun/security/pkcs11/MessageDigest/TestCloning.java 
reason: .class file out of date or does not exist 
elapsed time (seconds): 0.018 
ACTION: main -- Failed. Execution failed: `main' threw exception: java.lang.CloneNotSupportedException: SHA-256 
REASON: Assumed action based on file name: run main TestCloning 
TIME: 0.013 seconds 
command: main TestCloning 
reason: Assumed action based on file name: run main TestCloning 
elapsed time (seconds): 0.013 
Beginning test run TestCloning... 
Running test with provider SunPKCS11-Solaris... 
Testing against provider SunPKCS11-Solaris 
MD2 is not supported, skipping 
Testing MD5 of SunPKCS11-Solaris 
Testing SHA1 of SunPKCS11-Solaris 
SHA-224 is not supported, skipping 
Testing SHA-256 of SunPKCS11-Solaris 
java.lang.CloneNotSupportedException: SHA-256 
at sun.security.pkcs11.P11Digest.clone(P11Digest.java:316) 
at java.security.MessageDigest$Delegate.clone(MessageDigest.java:560) 
at TestCloning.testCloning(TestCloning.java:92) 
at TestCloning.main(TestCloning.java:65) 
at PKCS11Test.premain(PKCS11Test.java:88) 
at PKCS11Test.testDefault(PKCS11Test.java:149) 
at PKCS11Test.main(PKCS11Test.java:97) 
at TestCloning.main(TestCloning.java:43) 
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$SameVMRunnable.run(MainActionHelper.java:226) 
at java.lang.Thread.run(Thread.java:745) 
Caused by: sun.security.pkcs11.wrapper.PKCS11Exception: CKR_STATE_UNSAVEABLE 
at sun.security.pkcs11.wrapper.PKCS11.C_GetOperationState(Native Method) 
at sun.security.pkcs11.P11Digest.clone(P11Digest.java:311) 
... 13 more 

JavaTest Message: Test threw exception: java.lang.CloneNotSupportedException 
JavaTest Message: shutting down test 

TEST RESULT: Failed. Execution failed: `main' threw exception: java.lang.CloneNotSupportedException: SHA-256
Ran couple of JPRT jobs to repro, TestClone.java test didnt fail even single time, hence marking it as cannot repro. In future, if this test case fails, we will reopen the BZ. Thanks, Prasad.K