JDK-4779902 : ParallelGC is clearing card marks it should not clear.
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 1.4.2
  • Priority: P1
  • Status: Resolved
  • Resolution: Fixed
  • OS: solaris_8,windows_nt
  • CPU: x86,sparc
  • Submitted: 2002-11-15
  • Updated: 2002-12-17
  • Resolved: 2002-12-17
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.
Other
1.4.2 betaFixed
Related Reports
Relates :  
Description
(dbx) where     
current thread: t@6
  [1] _libc_read(0xddb207a4, 0xdd7844b0, 0xdd78455a), at 0xdda9e1af
  [2] _filbuf(0xddb207a4), at 0xddacd4c1
  [3] fgets(0xdaa8ee1c, 0x3ff, 0xddb207a4), at 0xddacfc06
=>[4] os::message_box(title = 0xdd60f579 "assertion failure", message = 0xdaa8f270 "assert(_card_table->addr_is_marked_imprecise(obj), "Found unmarked young_gen object")\n\nDo you want to debug the problem?"), line 2536 in "os_solaris.cpp"
  [5] report_error(is_vm_internal_error = 1, file_name = 0xdd5aa27f "/net/ghopper/LocalBuild/main_baseline/src/share/vm/gc_implementation/parallelScavenge/cardTableExtension.cpp", line_no = 59, title = 0xdd60f579 "assertion failure", format = 0xdd60f58b "assert(%s, "%s")", ...), line 346 in "debug.cpp"
  [6] report_assertion_failure(code_str = 0xdd5aa254 "_card_table->addr_is_marked_imprecise(obj)", file_name = 0xdd5aa27f "/net/ghopper/LocalBuild/main_baseline/src/share/vm/gc_implementation/parallelScavenge/cardTableExtension.cpp", line_no = 59, message = 0xdd5aa2ec "Found unmarked young_gen object"), line 144 in "debug.cpp"
  [7] CheckForUnmarkedObjects::do_object(this = 0xdaa8fc3c, obj = 0x9b1bf7b0), line 59 in "cardTableExtension.cpp"
  [8] MutableSpace::object_iterate(this = 0x82be760, cl = 0xdaa8fc3c), line 86 in "mutableSpace.cpp"
  [9] PSOldGen::object_iterate(this = 0x80f7698, cl = 0xdaa8fc3c), line 109 in "psOldGen.hpp"
  [10] CardTableExtension::verify_all_young_refs_imprecise(), line 318 in "cardTableExtension.cpp"
  [11] PSScavenge::invoke_no_policy(notify_ref_lock = 1), line 336 in "psScavenge.cpp"
  [12] PSMarkSweep::invoke(notify_ref_lock = 1, maximum_heap_compaction = 0), line 48 in "psMarkSweep.cpp"
  [13] VM_ParallelGCSystemGC::doit(this = 0x8046a08), line 156 in "vm_operations.cpp"
  [14] VM_Operation::evaluate(this = 0x8046a08), line 26 in "vm_operations.cpp"
  [15] VMThread::evaluate_operation(this = 0x833c738, op = 0x8046a08), line 276 in "vmThread.cpp"
  [16] VMThread::loop(this = 0x833c738), line 371 in "vmThread.cpp"
  [17] VMThread::run(this = 0x833c738), line 204 in "vmThread.cpp"
  [18] _start(data = 0x833c738), line 732 in "os_solaris.cpp"
  [19] _thr_setup(0xdda60a00), at 0xddb64a59
  [20] _lwp_start(), at 0xddb64ce0
(dbx) frame 7
Current function is CheckForUnmarkedObjects::do_object
   59         assert(_card_table->addr_is_marked_imprecise(obj), "Found unmarked young_gen object");
(dbx) print object_check
object_check = {
    _young_gen     = 0x80f63a8
    _card_table    = 0x80f6228
    _unmarked_addr = 0x9b1c0694
}
(dbx) print object_check._card_table->byte_for((const void*)0x9b1c0694)
object_check._card_table->byte_for((const void *) 0x9b1c0694U) = 0x93e08e03


 --------- cut from program output --------------

<m o:93e08e03 c:dd7a4da0> <--- we called mark on the card 0x93e08e03

[c 93e08e03 - 93e08e06] <--- we immediately clear the new mark.

	I do not yet know where the code is going awry, but it is
obvious we've got a bug, and it needs to be fixed.


Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: mantis-beta FIXED IN: mantis-beta INTEGRATED IN: mantis-beta
14-06-2004

EVALUATION Yep, its a bug. Here is what is happening. You have an array in the old generation that is large enough to span several cards. The dirty cards are marked with precise marks: ArrayHead .......................... End CC DC DC DC DC CC CC DC DC DC CC CC CC CC CC = Clean Card DC = Dirty Card While scanning the array, we discover the first set of dirty cards. We find the extent of the first set, clear them, and then scan the objects they covered. We do not scan MemRegion bounded objects, but entire objects. This means that the scan continues past the discovered dirty cards into the next set. It may also be possible that we dirty new cards in this scan. The next loop of the card scanning code will either discover the new card marks, or the old ones. In either case, it will be rescanning pointers (violating an invariant), or clearing fresh card marks (causing a crash in the future).
11-06-2004

WORK AROUND None
11-06-2004