JDK-7093090 : Reduce synchronization in java.security.Policy.getPolicyNoCheck
  • Type: Bug
  • Component: security-libs
  • Sub-Component: java.security
  • Affected Version: 7
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: solaris_10
  • CPU: sparc
  • Submitted: 2011-09-20
  • Updated: 2013-10-25
  • Resolved: 2011-11-29
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other JDK 6 JDK 7 JDK 8
5.0u38Fixed 6u34Fixed 7u4Fixed 8 b15Fixed
Related Reports
Relates :  
Relates :  
Description
java.security.Policy.getPolicyNoCheck() is synchronized which causes some thread contention.

Comments
verified with 8 113 on the following combinations: windows7 with IE and Firefox Solaris Sparc 9 and 10 with Mozilz and Firefox RHEL with Mozilla and FF
25-10-2013

Sean, Can't find this bug JDK-642631, you mean is JDK-6424631? Which test should be run?
14-08-2013

Yes, try running the applet in JDK-6424631.
14-08-2013

To verify the fix, you could try running the test in JDK-642631, which this fix also addressed.
21-06-2013

written to sean for more details to verify this bug
20-06-2013

EVALUATION The fix involved adding an initialized flag to indicate when the system-wide policy has been initialized and storing both the flag and the Policy object in an AtomicReference. Then, I also used the double-check locking idiom to avoid locking the Policy class when the Policy had already been initialized. Changeset: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/1945abeb82a0
22-11-2011