United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-8007393 Possible race condition after JDK-6664509
JDK-8007393 : Possible race condition after JDK-6664509

Details
Type:
Bug
Submit Date:
2013-02-01
Status:
Closed
Updated Date:
2013-07-31
Project Name:
JDK
Resolved Date:
2013-02-07
Component:
core-libs
OS:
other
Sub-Component:
java.util.logging
CPU:
other
Priority:
P2
Resolution:
Fixed
Affected Versions:
7u13
Fixed Versions:

Related Reports
Backport:
Backport:
Backport:
Backport:
Backport:
Backport:
Backport:

Sub Tasks

Description
On 2/1/13 8:11 AM, Mandy Chung wrote:

By code inspection, however, I concur that there is a timing race there that a logger can
be GC'ed where a logger exists where being queried and immediately being gc'ed after that.
I don't think Licensee's proposed 1-line fix is a completed fix though.

LogManager.java L 633-635
            if (!manager.addLogger(result) && result.getHandlers().length == 0) {
                // if logger already exists but handlers not set
                final Logger l = manager.getLogger(name);
                final Logger logger = result;
                                    

Comments
SA review:
   http://sa.sfbay.sun.com/mail-archive/8007393-cpu-review/
  
Webrev:
   http://sa.sfbay.sun.com/projects/cpu-review_data/7u15/8007393/

Reviewed-by: alanb, jgish

Verification done: core regression tests on all platforms.  JCK tests on solaris-i586.

                                     
2013-02-01
Reporter (Licensee) has confirmed the patch on their port.
                                     
2013-02-05
URL:   http://hg.openjdk.java.net/jdk8/jdk8/jdk/rev/af11c227a91e
User:  lana
Date:  2013-03-15 17:04:08 +0000

                                     
2013-03-15



Hardware and Software, Engineered to Work Together