United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-7093090 : Reduce synchronization in java.security.Policy.getPolicyNoCheck

Details
Type:
Bug
Submit Date:
2011-09-20
Status:
Closed
Updated Date:
2013-10-25
Project Name:
JDK
Resolved Date:
2011-11-29
Component:
security-libs
OS:
solaris_10
Sub-Component:
java.security
CPU:
sparc
Priority:
P2
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:

Related Reports
Backport:
Backport:
Backport:
Relates:
Relates:

Sub Tasks

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
                                     
2013-10-25
Sean,  Can't find this bug JDK-642631, you mean is JDK-6424631?  Which test should be run?
                                     
2013-08-14
Yes, try running the applet in JDK-6424631.
                                     
2013-08-14
To verify the fix, you could try running the test in JDK-642631, which this fix also addressed.
                                     
2013-06-21
written to sean for more details to verify this bug
                                     
2013-06-20
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
                                     
2011-11-22



Hardware and Software, Engineered to Work Together