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.
See comments for email trail describing problem and solution.
Comments
EVALUATION
Fixed via jprt:2008-02-17-065058.ysr.gc_fixes in hg/hotspot-gc
22-02-2008
SUGGESTED FIX
changeset: 4:d56d47da9815
user: ysr
date: Sat Feb 16 22:41:20 2008 -0800
summary: 6621144: CMS: assertion failure "is_cms_thread == Thread::current()->is_ConcurrentGC_thread()"
diff --git a/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp b/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp
--- a/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp
+++ b/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp
@@ -5732,13 +5732,19 @@ void CMSCollector::sweep(bool asynch) {
// in the perm_gen_verify_bit_map. In order to do that we traverse
// all blocks in perm gen and mark all dead objects.
if (verifying() && !cms_should_unload_classes()) {
- CMSTokenSyncWithLocks ts(true, _permGen->freelistLock(),
- bitMapLock());
assert(perm_gen_verify_bit_map()->sizeInBits() != 0,
"Should have already been allocated");
MarkDeadObjectsClosure mdo(this, _permGen->cmsSpace(),
markBitMap(), perm_gen_verify_bit_map());
- _permGen->cmsSpace()->blk_iterate(&mdo);
+ if (asynch) {
+ CMSTokenSyncWithLocks ts(true, _permGen->freelistLock(),
+ bitMapLock());
+ _permGen->cmsSpace()->blk_iterate(&mdo);
+ } else {
+ // In the case of synchronous sweep, we already have
+ // the requisite locks/tokens.
+ _permGen->cmsSpace()->blk_iterate(&mdo);
+ }
}
if (asynch) {
13-11-2007
SUGGESTED FIX
------- concurrentMarkSweepGeneration.cpp -------
*** /tmp/sccs.HYa4Hs Mon Oct 29 15:11:30 2007
--- concurrentMarkSweepGeneration.cpp Mon Oct 29 14:37:52 2007
***************
*** 5735,5747 ****
// in the perm_gen_verify_bit_map. In order to do that we traverse
// all blocks in perm gen and mark all dead objects.
if (verifying() && !cms_should_unload_classes()) {
- CMSTokenSyncWithLocks ts(true, _permGen->freelistLock(),
- bitMapLock());
assert(perm_gen_verify_bit_map()->sizeInBits() != 0,
"Should have already been allocated");
MarkDeadObjectsClosure mdo(this, _permGen->cmsSpace(),
markBitMap(), perm_gen_verify_bit_map());
! _permGen->cmsSpace()->blk_iterate(&mdo);
}
if (asynch) {
--- 5735,5753 ----
// in the perm_gen_verify_bit_map. In order to do that we traverse
// all blocks in perm gen and mark all dead objects.
if (verifying() && !cms_should_unload_classes()) {
assert(perm_gen_verify_bit_map()->sizeInBits() != 0,
"Should have already been allocated");
MarkDeadObjectsClosure mdo(this, _permGen->cmsSpace(),
markBitMap(), perm_gen_verify_bit_map());
! if (asynch) {
! CMSTokenSyncWithLocks ts(true, _permGen->freelistLock(),
! bitMapLock());
! _permGen->cmsSpace()->blk_iterate(&mdo);
! } else {
! // In the case of synchronous sweep, we already have
! // the requisite locks/tokens.
! _permGen->cmsSpace()->blk_iterate(&mdo);
! }
}
if (asynch) {
29-10-2007
EVALUATION
See comments and suggested fix fields.
24-10-2007
SUGGESTED FIX
Replicate and move the dead bit map iteration code into the
if (asynch) { X } else { Y } code further below, removing the
CMSTokenSync c'tor for the Y-copy above. Diffs will be pasted
below.