JDK-6904516 : More object array barrier fixes, following up on 6906727
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: hs16,hs17
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2009-11-24
  • Updated: 2010-05-07
  • Resolved: 2010-03-02
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6 JDK 7 Other
6u18Resolved 7Fixed hs17Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
A customer is seeing a missing card-mark in the pre-gc verification
phase of GC. Without verification, the application crashes during
a random GC. No further data is available at the moment but the
GC logs and the hs_error logs.

The crash occurs with their application, and no targeted test case
is available that we can use here to reproduce the problem.
However, customer is willing to do some runs w/switches etc. to
assist in debugging the issue since this affects their application.

The crash happens with both hs16 and the latest hs17(b05), but
only with compressed oops enabled.
Crash happens with -XX:+UseSerialGC as well as with -Xint. See details in
comments section.

EVALUATION ChangeSet=http://hg.openjdk.java.net/jdk7/hotspot-gc/hotspot/rev/6484c4ee11cb,ChangeRequest=6904516

SUGGESTED FIX Here's a [reliminary but not as yet complete webrev:- http://analemma.sfbay.sun.com/net/neeraja/export/ysr/barriers/webrev

EVALUATION More extensive issues were found that need to be fixed via more extensive changes to some of the barrier set interfaces; however, a small essential subset which fix the essential unsafety have been moved to a new CR 6906727, so as to mitigate the risk of the more extensive fixes which latter are targeted for hs17 as part of fixing CR 6904516. See display 16 of Comments section.

SUGGESTED FIX Code review and inspection found other places that could be similarly vulnerable and need to be fixed, so the above suggested fix is incomplete. Indeed, more extensive fixes are needed to address the marking of extra cards (which is mostly benign from a correctness standpoint, but not always) when using compressed oops. These should also be fixed. Missing pre-barriers needed for G1 also came to light during this code inspection and should be fixed. Whether all of these fixes should form part of this CR or of other ne CRs etc. will need to be a pragmatic decision based on product release dates, I am assuming. Watch this space.

EVALUATION Object array updates with compressed oops could, under suitable circumstances (see Comments section for details) miss marking the last card because of an off-by-one error when computing the range of cards to mark.

SUGGESTED FIX < remove obsolete entry >

WORK AROUND -XX:-UseCompressedOops