JDK-6916370 : Clone method of PKIXParameters should be thread safe.
  • Type: Bug
  • Component: security-libs
  • Sub-Component: java.security
  • Affected Version: 6u13
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris_10
  • CPU: sparc
  • Submitted: 2010-01-13
  • Updated: 2010-09-29
  • Resolved: 2010-01-20
Related Reports
Duplicate :  
Relates :  
Description
The clone method of PKIXParameters should be made threadsafe. This is causing a race condition in with multiple threads.

Comments
EVALUATION From the thread stack, we can find that the PKIXParameters.clone() has already synchronized by the SSLSockerImpl.performInitialHandshake(). So it would not work to add one more lock at the PKIXParameters.clone() method. I think the issue is similar to 6862064, when PKIXParameters.clone() is called, the PKIXParameters.certStores is reset with its shallow copy, then will result in multiple thread safe issues. Close this bug as a duplicate of CR 6862064.
20-01-2010

EVALUATION need to make it multiple thread safe.
14-01-2010

SUGGESTED FIX Not create a new copy of the collection on each clone and make the collection itself synchronized
13-01-2010