United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6888898 CMS: ReduceInitialCardMarks unsafe in the presence of cms precleaning
JDK-6888898 : CMS: ReduceInitialCardMarks unsafe in the presence of cms precleaning

Details
Type:
Bug
Submit Date:
2009-10-06
Status:
Resolved
Updated Date:
2010-12-06
Project Name:
JDK
Resolved Date:
2009-11-11
Component:
hotspot
OS:
solaris,generic
Sub-Component:
gc
CPU:
x86,generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
hs14,hs17
Fixed Versions:
hs17 (b04)

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

Sub Tasks

Description
ReduceInitialCardMarks elides card marks for TLAB allocations
in young gen (fine for CMS), but for the case of slow-path allocation
makes up by card-marking the allocated object (potentially in the
old gen) before initialization. This latter is unsafe wrt CMS' precleaning
which might scan the marked cards before they have been initialized
by the mutator and thus lose those updates.
Deleted incorrect comment/update here.

                                    

Comments
WORK AROUND

-XX:-ReduceInitialCardMarks ??
                                     
2009-10-06
EVALUATION

Yes.
                                     
2009-10-08
EVALUATION

Deleted incorrect update/comment here.
                                     
2009-10-12
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-gc/hotspot/rev/39b01ab7035a
                                     
2009-10-16
WORK AROUND

The other possible workaround here (for CMS) is to switch off
pre-cleaning, thus:-

   -XX:-CMSPrecleaningEnabled

perhaps at the cost of much increased CMS remark pause times, however.
                                     
2009-10-16
EVALUATION

http://hg.openjdk.java.net/hsx/hsx16/baseline/rev/aa001a20bd61
                                     
2009-10-22
EVALUATION

http://hg.openjdk.java.net/hsx/hsx16/master/rev/aa001a20bd61
                                     
2009-10-22



Hardware and Software, Engineered to Work Together