JDK-8043951 : sun/security/pkcs11/MessageDigest/TestCloning.java failed due to CloneNotSupportedException: SHA-256
  • Type: Bug
  • Component: security-libs
  • Sub-Component: java.security
  • Affected Version: 8
  • Priority: P4
  • Status: Resolved
  • Resolution: Won't Fix
  • OS: solaris_10
  • Submitted: 2014-05-26
  • Updated: 2017-02-06
  • Resolved: 2017-01-04
Related Reports
Relates :  
Relates :  
Relates :  

sun/security/pkcs11/MessageDigest/TestCloning.java failed in solaris and solaris-sparc platfrom

Error log:
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:544)
	at TestCloning.testCloning(TestCloning.java:92)
	at TestCloning.main(TestCloning.java:65)
	at PKCS11Test.premain(PKCS11Test.java:81)
	at PKCS11Test.testDefault(PKCS11Test.java:142)
	at PKCS11Test.main(PKCS11Test.java:90)
	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:484)
	at com.sun.javatest.regtest.MainAction$SameVMRunnable.run(MainAction.java:759)
	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
This bug was set to "Won't Fix". Any failures are because the Solaris 10 installed is too old as the bug was in Solaris, not in Java. I did look at sthjprtsol24 and it does not have required 150636-01 Solaris patch.

I am reopening this bug to disable it for Solaris 10. It is a constant nuisance to the test logs when run on unpatched Solaris systems. Given this was an OS bug, it is highly unlikely this problem be reintroduce and not be caught by Solaris 11 testing

RULE sun/security/pkcs11/MessageDigest/TestCloning.java Exception java.lang.CloneNotSupportedException: SHA-256

Hi Sean, this issue have not happened in last week after install patch at test machines. Can you help to change the bug as "Not an Issue". Thanks Kevin

have filed PDIT: 497386-568647546, following machine have installed the patch: sc14160049 Done sc14160032 Done sc11152693 Done sc11152471 Done sc11136394.us need reimage to install this patch, have disabled this machine and filed PDIT to re-image machine:497386-572268321 this issue have not happened yesterday.

I think you should wait until the patch is installed on your test machines and you verify that the test no longer fails. Then, I would change it to "Not an Issue", since the test no longer fails.

Sean, I will install patch 150531-02 (sparc) or 150636-01 (x86) for all solaris machines, and will close this bug after test passed. Can I change resolution from Incomlete to Other before this patch installed. Thanks. Kevin

I am going to mark this bug as incomplete for now until you check if the patch is installed. Please re-open if you find the patch is installed and the test system is up-to-date.

We re-enabled support for SHA256 via PKCS11 on Solaris (see JDK-8037745). This requires that the Solaris 10 system has a patch for the cloning issue: 150531-02 (sparc) or 150636-01 (x86). Can you find out if the patch is installed? If not you will need to update the test system.