JDK-5070781 : CMS: assert(!full || (gc_count_before >= full_gc_count_before), "Invariant")
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 6
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2004-07-01
  • Updated: 2004-08-30
  • Resolved: 2004-08-30
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
6 mustangFixed
Related Reports
Relates :  
Description
The assertion, as currently constructed is too strong
in the presence of CMS, even without +ExplicitGCInvokesConcurrent.

Need a code-audit to make sure that the intended invariant was
not used anywhere for correctness before relaxing the assertion.
Or will need to modify the code to respect the intended invariant.

Tjis bug also covers the assertion violations observed in the
recent nightly tests with +ExplicitGCInvokesConcurrent:

  assert(_gc_count_before < gch->total_collections(), "Consistency");

AND

  assert(!full || (gc_count_before >= full_gc_count_before), "Invariant");

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: mustang FIXED IN: mustang INTEGRATED IN: mustang
31-08-2004

EVALUATION see comments section. Fix under test and review.
31-08-2004

SUGGESTED FIX Fixed in Mustang: 7/29/04: ----------------- Event: putback-to Parent workspace: /net/jano.sfbay/export/disk05/hotspot/ws/main/gc_baseline (jano.sfbay:/export/disk05/hotspot/ws/main/gc_baseline) Child workspace: /prt-workspaces/20040729075132.ysr.verify/workspace (prt-web:/prt-workspaces/20040729075132.ysr.verify/workspace) User: ysr Comment: --------------------------------------------------------- Original workspace: neeraja:/net/spot/scratch/ysr/verify Submitter: ysr Archived data: /net/prt-archiver.sfbay/export2/archived_workspaces/main/gc_baseline/2004/20040729075132.ysr.verify/ Webrev: http://analemma.sfbay.sun.com/net/prt-archiver.sfbay/export2/archived_workspaces/main/gc_baseline/2004/20040729075132.ysr.verify/workspace/webrevs/webrev-2004.07.29/index.html Fixed 5070781: CMS: assert(!full || (gc_count_before >= full_gc_count_before), "Invariant") Partial 5040363: CMS: SEGV during perm gen precleaning http://analemma.sfbay/net/spot/scratch/ysr/verify/webrev Details: -------- 5070781: There were two assertion violations which both tunred out to be too strong. The first assertion was trying to establish that the gch->total_full_collections() was always at least as big as gch->total_collections(). This, while true for all the stop-world collectors, is not true for the CMS collector where a CMS/old gen collection increments the full_collection count. The assertion was removed, and replaced by appropriately weakened assertions elsewhere. The second assertion was trying to establish that following each explicit invocation of gch->do_full_collection() from the VM thread, the total_collections() count would strictly increase. This turns out to be violated if and when GC_locker::is_active() when such an invocation is silently ignored. The assertion was suitably weakened. 5040363: As part of the verification infrastructure in support of this bug fix, I have implemented a post-remark stop-world marking verification pass that is controlled by the flags VerifyAfterGC/VerifyDuringGC. There are two variants, once of which reports all errors, and the other which stops at the first error report. The advantage of the second is that it has enough state in the stack of the verifying thread (being the CMS thread) to allow us to use dbx to do further debugging, in particular of which object held a pointer to an unmarked reference. At this point I'd like to check in this debugging/verification code because it is generally useful for debugging CMS issues. Reviewed by: John Coomes Fix verified (y/n): yes (5070781) N/A (5040363) Verification testing: (5070781) runThese with CMS/ExplicitGCInvokesConcurrnet Other testing: CMS/Ergonomic-collector/(+/-ExplicitGCInvokesConcurrent): PRT, refWorkload, runThese Files: update: src/share/vm/memory/concurrentMarkSweepGeneration.cpp update: src/share/vm/memory/concurrentMarkSweepGeneration.hpp update: src/share/vm/memory/genCollectedHeap.cpp update: src/share/vm/memory/genOopClosures.hpp update: src/share/vm/runtime/globals.hpp update: src/share/vm/runtime/vm_operations.cpp update: src/share/vm/runtime/vm_operations.hpp Examined files: 3222 Contents Summary: 7 update 3215 no action (unchanged)
31-08-2004