United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-8023563 : Bottleneck in java.util.TimeZone.getDefaultInAppContext

Details
Type:
Bug
Submit Date:
2013-08-22
Status:
Closed
Updated Date:
2014-06-23
Project Name:
JDK
Resolved Date:
2013-09-04
Component:
core-libs
OS:
generic
Sub-Component:
java.util:i18n
CPU:
generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
6u31
Fixed Versions:
7u60 (b01)

Related Reports
Backport:
Backport:

Sub Tasks

Description
See 16371249 for detail.
                                    

Comments
No - not a dup. This concerns bottleneck in unnecessary calls to AppContext. Turns out that we're using AppContext even if security manager is not installed.  The assumption was that loading of AWT AppContext class would mainly be done by plugin manager.  As per stacktrace, that's not the case :

@ java.lang.Exception: Stack trace 
@                at java.lang.Thread.dumpStack(Thread.java:1249) 
@                at sun.awt.AppContext.<clinit>(AppContext.java:798) 
@                at com.sun.jmx.trace.Trace.out(Trace.java:180) 
@                at com.sun.jmx.trace.Trace.isSelected(Trace.java:88) 

We should only use the AppContext approach in TimeZone if security manager is present.
                                     
2013-08-22
Good point. It's 8-na. Escalated issue on jdk6 in any case. I'll fix in 7 & 6.
                                     
2013-08-22
URL:   http://hg.openjdk.java.net/jdk7u/jdk7u-dev/jdk/rev/5a9b87abdbee
User:  coffeys
Date:  2013-09-04 08:21:28 +0000

                                     
2013-09-04
URL:   http://hg.openjdk.java.net/jdk7u/jdk7u/jdk/rev/5a9b87abdbee
User:  lana
Date:  2013-09-09 22:17:44 +0000

                                     
2013-09-09
I'm closing this bug as not verified because there is no provided way to verify this.
                                     
2013-12-05
SHORT SUMMARY:
 Bottleneck in java.util.TimeZone.getDefaultInAppContext
 .
 INDICATORS:
 Several threads blocked waiting to access sun.awt.AppContext
 COUNTER INDICATORS:
 TRIGGERS:
 Multithreads app making high number of calls to java.util.TimeZone.getDefault
 method
 KNOWN WORKAROUND:
 N/A
 PRESENT SINCE:
 Introduced at JDK-7110687 fix time. (Introduction of AppContext storage in
 TimeZone class)
 HOW TO VERIFY:
 N/A
 NOTES FOR SE:
 REGRESSION: Performance issue.
                                     
2013-08-22



Hardware and Software, Engineered to Work Together