request for review (small): 6722116: CMS: Incorrect overflow handling when using parallel concurrent marking

Y Srinivas Ramakrishna Y.S.Ramakrishna at Sun.COM
Mon Aug 25 07:10:26 UTC 2008


Fixed: 6722116: CMS: Incorrect overflow handling when using parallel concurrent marking

webrev: http://analemma.sfbay/net/neeraja/export/ysr/cms_cmt/webrev
   (for patch file, see attachment)

When we do CMS' concurrent marking phase in multiple worker threads,
these workers maintain their own private (stealable) work queues,
but these can overflow during marking. When that happens we use
the "central" marking stack to buffer the overflown oops.
However, it's possible that this overflow buffer might itself overflow.
In that case, we were doing a "restart" of the marking from the least
overflown oop address. The problem was that the code to do the restart
was incorrect in that although the number of marking tasks was being
correctly computed, the CMSConcMarkingTask::do_scan_and_mark()
which does the work was not restarting the marking/scan from the
"restart address" but instead from the start of the generation.
This can result in the grey oops in the upper reaches of the
generation not being blackened, and thus cause some reachable
objects to incorrectly be cosnidered white.

The fix was to fix the ::do_scan_and_mark() method to use the
correct address to starts its work from.

Testing also revealed a few assertions that were a tad too strict,
and these were suitably weakened. A few documentation comments were
elaborated as well.

Testing: jprt, refworkload
         to be done: gc test suite

Fix Verified: yes

Verification test: Without the fix specjvm98 or gcbasher when run with
    +CMSMarkStackOverflowAlot on a 32-core or high crashes;
    heap verification reveal a marking that missed reachable
    objects. The tests pass with the fix.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cms_cmt_patch
Type: application/octet-stream
Size: 7825 bytes
Desc: not available
URL: <https://mail.openjdk.org/pipermail/hotspot-gc-dev/attachments/20080825/eca78444/cms_cmt_patch.obj>


More information about the hotspot-gc-dev mailing list