Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8005040

Some synchronization issues for Logger, LogManager in JDK6

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P4 P4
    • None
    • 6u38
    • core-libs

      While working on some recent Logger issues, Mandy pointed out some possible synchronization issues in the Logger, LogManager area. We may address these at a later date.

      ==

      Logger.java - Logger.setFilter and Logger.getFilter
      are not synchronized but only the levelValue variable is volatile. I believe
      JDK6 version is wrong and I expect the following variables are made volatile
      in order to remove synchronization on the setFilter/getFilter and maybe
      some other methods [1].
           private volatile boolean useParentHandlers = true;
           private volatile Filter filter;
           private volatile Logger parent; // our nearest parent.
           private volatile Level levelObject;
           private volatile int levelValue; // current effective level value

      [1]http://hg.openjdk.java.net/jdk8/jdk8/jdk/rev/6eac3829cb41
      ==

            Unassigned Unassigned
            coffeys Sean Coffey
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: