I am getting an occasional assert w/the fatsdebug jvm during shudown
in the following code:-
 1654
 1655   // Computes the sum of the storage used by the various regions.
 1656
 1657   size_t G1CollectedHeap::used() const {
 1658     assert(Heap_lock->owner() != NULL,
 1659            "Should be owned on this thread's behalf.");
 1660     size_t result = _summary_bytes_used;
 1661     if (_cur_alloc_region != NULL)
 1662       result += _cur_alloc_region->used();
 1663     return result;
 1664   }
 1665
with the following backtrace:-
  [6] report_assertion_failure(file_name = ???, line_no = ???, message = ???) (optimized), at 0xfffffd7ffcced6fb (line ~173) in "debug.cpp"
=>[7] G1CollectedHeap::used(this = ???) (optimized), at 0xfffffd7ffce4b8e1 (line ~1663) in "g1CollectedHeap.cpp"
  [8] G1CollectedHeap::print_on(this = ???, st = ???, extended = ???) (optimized), at 0xfffffd7ffce4e21c (line ~2344) in "g1CollectedHeap.cpp"
  [9] G1CollectedHeap::print_on(this = ???, st = ???) (optimized), at 0xfffffd7ffce4e1cb (line ~2339) in "g1CollectedHeap.cpp"
  [10] Universe::print() (optimized), at 0xfffffd7ffdfe42cb (line ~1146) in "universe.cpp"
  [11] before_exit(thread = ???) (optimized), at 0xfffffd7ffd0bb8dd (line ~402) in "java.cpp"
  [12] JVM_Halt(code = ???) (optimized), at 0xfffffd7ffd289c86 (line ~341) in "jvm.cpp"
  [13] Java_java_lang_Shutdown_halt0(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7ffbdd77db
  [14] 0xfffffd7ff8c1d3c1(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7ff8c1d3c1
  [15] 0xfffffd7ff8c1d3c1(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7ff8c1d3c1
  [16] 0xfffffd7ff8c05b82(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7ff8c05b82
  [17] 0xfffffd7ff8c05b82(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7ff8c05b82
  [18] 0xfffffd7ff8c05b82(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7ff8c05b82
  [19] 0xfffffd7ff8c05b82(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7ff8c05b82
  [20] 0xfffffd7ff8c05b82(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7ff8c05b82
  [21] 0xfffffd7ff8c00575(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7ff8c00575
  [22] JavaCalls::call_helper(result = ???, m = ???, args = ???, __the_thread__ = ???) (optimized), at 0xfffffd7ffd0c5543 (line ~378) in "javaCalls.cpp"
  [23] JavaCalls::call(result = ???, method = CLASS, args = ???, __the_thread__ = ???) (optimized), at 0xfffffd7ffd0c4cf5 (line ~293) in "javaCalls.cpp"
  [24] jni_invoke_static(env = ???, result = ???, receiver = ???, call_type = ???, method_id = ???, args = ???, __the_thread__ = ???) (optimized), at 0xfffffd7ffd167f08 (line ~1016) in "jni.cpp"
  [25] jni_CallStaticVoidMethod(env = ???, cls = ???, methodID = ???, ...) (optimized), at 0xfffffd7ffd188f7d (line ~1588) in "jni.cpp"
  [26] JavaMain(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0x404519
  [27] _thr_setup(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7fff15d907
  [28] _lwp_start(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7fff15dbb0
May be reproduced with
/net/sqenfs-1.sfbay/export1/comp/vm/jdk/hsx/16/pit/b06/jdk7b65/fastdebug/solaris-sparc/bin/java -XX:+PrintGCDetails -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC
originally reproduced with javac:
javac -J-XX:+PrintGCDetails -J-XX:+UnlockExperimentalVMOptions -J-XX:+UseG1GC