JDK-8065991 : LogManager unecessarily calls JavaAWTAccess from within a critical section
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util.logging
  • Affected Version: 7u72,8,9
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2014-11-26
  • Updated: 2016-02-24
  • Resolved: 2014-12-05
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.
JDK 7 JDK 8 JDK 9
7u79Fixed 8u40Fixed 9 b43Fixed
Related Reports
Blocks :  
Relates :  
Relates :  
Relates :  
Description
A deadlock involving AppContext, EventQueue, and LogManager.getUserContext() has been reported by JDK-8065709.
The traces show that LogManager.getUserContext() calls JavaAWTAccess - and henceforth AppContext.getAppContex() from within a synchronized block - when in fact it could be called before entering the critical section.

Note: This change is not sufficient to completely remove the deadlock: if the LogManager has not been initialized yet, then ensureLogManagerInitialized will end up calling LogManager.getUserContext() from within another critical section, with potentially the same effect. In this second case removing this second critical section is not an option.