RFR: 8065991: LogManager unecessarily calls JavaAWTAccess from within a critical section
Mandy Chung
mandy.chung at oracle.com
Tue Dec 2 19:24:17 UTC 2014
Hi Daniel,
On 11/26/14 9:11 AM, Daniel Fuchs wrote:
> Hi,
>
> Please find below a patch for:
>
> 8065991: LogManager unecessarily calls JavaAWTAccess from within
> a critical section
> https://bugs.openjdk.java.net/browse/JDK-8065991
>
> Webrev:
> http://cr.openjdk.java.net/~dfuchs/webrev_8065991/webrev.00/
>
line 465 can be moved together with line 461.
For the logger created by EventQueue in non-applet env, do we
expect JavaAWTAccess.getAppletContext to return null (as it
should only find the main AppContext)?
As the deadlock reported from JDK-8065709, it hits the race when
main AppContext object has been created and the numAppContexts counter
has been incremented but mainAppContext is not set in which case
even with this patch, it will still call AppContext.getAppContext()
and hit that deadlockon sun.awt.AppContext$GetAppContextLock.
Should JavaAWTAccess.getAppletContext simply return null (not calling
getAppContext) if it determines the main AppContext is being initialized?
Mandy
More information about the core-libs-dev
mailing list