RFR: 8065991: LogManager unecessarily calls JavaAWTAccess from within a critical section

Daniel Fuchs daniel.fuchs at oracle.com
Wed Nov 26 17:11:21 UTC 2014


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/

Note: https://bugs.openjdk.java.net/browse/JDK-8065709
       shows a thread dump where this is causing a deadlock between
       AWT and LogManager. However - fixing this particular deadlock
       may require more than modifying LogManager. The fix proposed
       here should hopefully make JDK-8065709 less likely - but will
       not guarantee that the issue discribed in JDK-8065709 is
       fully fixed.

I have included a testcase that replaces the implementation of
JavaAWTAccess and emulates AppContext.getAppContext().

The test fails in deadlock without the change, and passes with
it (though only because LogManager is pre-initilized in main()).

best regards,

-- daniel




More information about the core-libs-dev mailing list