JDK-8023563 : Bottleneck in java.util.TimeZone.getDefaultInAppContext
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util:i18n
  • Affected Version: 6u31
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2013-08-22
  • Updated: 2014-06-23
  • Resolved: 2013-09-04
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.
6u71Fixed 7u60 b01Fixed
See 16371249 for detail.
I'm closing this bug as not verified because there is no provided way to verify this.

Good point. It's 8-na. Escalated issue on jdk6 in any case. I'll fix in 7 & 6.

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.

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.