JDK-7005259 : CMS: BubbleUpRef asserts referent(obj)->is_oop() failed: Enqueued a bad referent
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: hs20,7-pool
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic,solaris_10
  • CPU: generic,x86
  • Submitted: 2010-12-07
  • Updated: 2013-09-18
  • Resolved: 2011-03-07
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
6u25Fixed 7Fixed hs20Fixed
Related Reports
Duplicate :  
Relates :  
Description
BubbleUpRef : closed/gc/4950157/BubbleUpRef
See comments for some related email as bkgrd.
http://sqeweb.sfbay/nfs/tools/gtee/results/JDK7/NIGHTLY/VM/2010-12-06/RT_Baseline/javase/linux-i586/client/comp/linux-i586_javase_client_comp_JT_HS/workDir/closed/gc/4950157/BubbleUpRef/hs_err_pid8478.log


;; Using jvm: "/export/local/common/jdk/baseline/linux-i586/jre/lib/i386/server/libjvm.so"
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/tmp/jprt/P1/B/212610.coleenp/source/src/share/vm/memory/referenceProcessor.cpp:1304), pid=8478, tid=3974941584
#  assert(java_lang_ref_Reference::referent(obj)->is_oop()) failed: Enqueued a bad referent
#
# JRE version: 7.0
# Java VM: OpenJDK Server VM (20.0-b03-internal-201012062126.coleenp.rt-merge-fastdebug mixed mode linux-x86 )
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#

---------------  T H R E A D  ---------------

Current thread (0x0822a400):  GCTaskThread [stack: 0x00000000,0x00000000] [id=8493]

Stack: 
[error occurred during error reporting (printing stack bounds), id 0xe0000000]

Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0xbb85ca];;  VMError::report(outputStream*)+0x10aa
V  [libjvm.so+0xbb8c53];;  VMError::report_and_die()+0x533
V  [libjvm.so+0x528664];;  report_vm_error(char const*, int, char const*, char const*)+0x64
V  [libjvm.so+0xbb86de];;  VMError::report(outputStream*)+0x11be
V  [libjvm.so+0xbb8c53];;  VMError::report_and_die()+0x533
V  [libjvm.so+0x528664];;  report_vm_error(char const*, int, char const*, char const*)+0x64
V  [libjvm.so+0xa58aba];;  ReferenceProcessor::discover_reference(oopDesc*, ReferenceType)+0x26a
V  [libjvm.so+0x693746];;  instanceRefKlass::oop_oop_iterate_nv(oopDesc*, Par_PushOrMarkClosure*)+0xa6
V  [libjvm.so+0x4f560d];;  Par_MarkFromRootsClosure::scan_oops_in_oop(HeapWord*)+0x3bd
V  [libjvm.so+0x4f5d64];;  Par_MarkFromRootsClosure::do_bit(unsigned int)+0x1a4
V  [libjvm.so+0x2a5734];;  BitMap::iterate(BitMapClosure*, unsigned int, unsigned int)+0x134
V  [libjvm.so+0x4e1da9];;  CMSConcMarkingTask::do_scan_and_mark(int, CompactibleFreeListSpace*)+0x2a9
V  [libjvm.so+0x4eff99];;  CMSConcMarkingTask::work(int)+0xe9
V  [libjvm.so+0xbe4b6e];;  YieldingFlexibleGangWorker::loop()+0xfe
V  [libjvm.so+0xbe0888];;  GangWorker::run()+0x18
V  [libjvm.so+0x9bbb68];;  java_start(Thread*)+0xf8
C  [libpthread.so.0+0x5832]


---------------  P R O C E S S  ---------------

Java Threads: ( => current thread )
  0xec81f800 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=8505, stack(0xec40b000,0xec45c000)]
  0xec81d400 JavaThread "C2 CompilerThread1" daemon [_thread_blocked, id=8504, stack(0xec45c000,0xec4dd000)]
  0xec81b400 JavaThread "C2 CompilerThread0" daemon [_thread_blocked, id=8503, stack(0xec4dd000,0xec55e000)]
  0xec819400 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=8502, stack(0xec55e000,0xec5af000)]
  0xec817c00 JavaThread "Surrogate Locker Thread (Concurrent GC)" daemon [_thread_blocked, id=8501, stack(0xec5af000,0xec600000)]
  0x0835f800 JavaThread "Finalizer" daemon [_thread_blocked, id=8500, stack(0xec900000,0xec951000)]
  0x0835dc00 JavaThread "Reference Handler" daemon [_thread_blocked, id=8499, stack(0xec951000,0xec9a2000)]
  0x08063000 JavaThread "main" [_thread_blocked, id=8479, stack(0xf6d6c000,0xf6dbd000)]

Other Threads:
  0x0835b800 VMThread [stack: 0xec9a2000,0xeca23000] [id=8498]
  0xec822c00 WatcherThread [stack: 0xec38a000,0xec40b000] [id=8506]

=>0x0822a400 (exited) GCTaskThread [stack: 0x00000000,0x00000000] [id=8493]

VM state:not at safepoint (normal execution)

VM Mutex/Monitor currently owned by a thread:  ([mutex/lock_event])
[0x08060d98] Heap_lock - owner thread: 0x08063000

Heap
 par new generation   total 14784K, used 14745K [0xed5c0000, 0xee5c0000, 0xee5c0000)
  eden space 13184K,  99% used [0xed5c0000, 0xee29fc50, 0xee2a0000)
  from space 1600K,  97% used [0xee430000, 0xee5b6b90, 0xee5c0000)
  to   space 1600K,   0% used [0xee2a0000, 0xee2a0000, 0xee430000)
 concurrent mark-sweep generation total 16384K, used 16379K [0xee5c0000, 0xef5c0000, 0xef5c0000)
 concurrent-mark-sweep perm gen total 16384K, used 1923K [0xef5c0000, 0xf05c0000, 0xf35c0000)

Code Cache  [0xf3d17000, 0xf3f57000, 0xf6d17000)
 total_blobs=100 nmethods=2 adapters=59 free_code_cache=49510720

Dynamic libraries:
00394000-003af000 r-xp 00000000 08:03 4688191                            /lib/ld-2.5.so
003af000-003b0000 r-xp 0001a000 08:03 4688191                            /lib/ld-2.5.so
003b0000-003b1000 rwxp 0001b000 08:03 4688191                            /lib/ld-2.5.so
003b3000-00505000 r-xp 00000000 08:03 2390517                            /lib/libc-2.5.so
00505000-00507000 r-xp 00152000 08:03 2390517                            /lib/libc-2.5.so
00507000-00508000 rwxp 00154000 08:03 2390517                            /lib/libc-2.5.so
00508000-0050b000 rwxp 00508000 00:00 0 
0050d000-00510000 r-xp 00000000 08:03 2390522                            /lib/libdl-2.5.so
00510000-00511000 r-xp 00002000 08:03 2390522                            /lib/libdl-2.5.so
00511000-00512000 rwxp 00003000 08:03 2390522                            /lib/libdl-2.5.so
00514000-0053b000 r-xp 00000000 08:03 2390524                            /lib/libm-2.5.so
0053b000-0053c000 r-xp 00026000 08:03 2390524                            /lib/libm-2.5.so
0053c000-0053d000 rwxp 00027000 08:03 2390524                            /lib/libm-2.5.so
0053f000-00554000 r-xp 00000000 08:03 2390518                            /lib/libpthread-2.5.so
00554000-00555000 r-xp 00015000 08:03 2390518                            /lib/libpthread-2.5.so
00555000-00556000 rwxp 00016000 08:03 2390518                            /lib/libpthread-2.5.so
00556000-00558000 rwxp 00556000 00:00 0 
00900000-00907000 r-xp 00000000 08:03 2390519                            /lib/librt-2.5.so
00907000-00908000 r-xp 00007000 08:03 2390519                            /lib/librt-2.5.so
00908000-00909000 rwxp 00008000 08:03 2390519                            /lib/librt-2.5.so
00b86000-00b9b000 r-xp 00000000 08:03 4682451                            /lib/libnsl-2.5.so
00b9b000-00b9c000 r-xp 00014000 08:03 4682451                            /lib/libnsl-2.5.so
00b9c000-00b9d000 rwxp 00015000 08:03 4682451                            /lib/libnsl-2.5.so
00b9d000-00b9f000 rwxp 00b9d000 00:00 0 
08048000-08049000 r-xp 00000000 08:03 3731922                            /export/local/common/jdk/baseline/linux-i586/bin/java
08049000-0804a000 rwxp 00000000 08:03 3731922                            /export/local/common/jdk/baseline/linux-i586/bin/java
0804a000-08639000 rwxp 0804a000 00:00 0                                  [heap]
ec189000-ec38a000 rwxp ec189000 00:00 0 
ec38a000-ec38b000 ---p ec38a000 00:00 0 
ec38b000-ec40b000 rwxp ec38b000 00:00 0 
ec40b000-ec40e000 ---p ec40b000 00:00 0 
ec40e000-ec45c000 rwxp ec40e000 00:00 0 
ec45c000-ec45f000 ---p ec45c000 00:00 0 
ec45f000-ec4dd000 rwxp ec45f000 00:00 0 
ec4dd000-ec4e0000 ---p ec4dd000 00:00 0 
ec4e0000-ec55e000 rwxp ec4e0000 00:00 0 
ec55e000-ec561000 ---p ec55e000 00:00 0 
ec561000-ec5af000 rwxp ec561000 00:00 0 
ec5af000-ec5b2000 ---p ec5af000 00:00 0 
ec5b2000-ec600000 rwxp ec5b2000 00:00 0 
ec600000-ec800000 r-xp 00000000 08:03 5511631                            /usr/lib/locale/locale-archive
ec800000-ec833000 rwxp ec800000 00:00 0 
ec833000-ec900000 ---p ec833000 00:00 0 
ec900000-ec903000 ---p ec900000 00:00 0 
ec903000-ec951000 rwxp ec903000 00:00 0 
ec951000-ec954000 ---p ec951000 00:00 0 
ec954000-ec9a2000 rwxp ec954000 00:00 0 
ec9a2000-ec9a3000 ---p ec9a2000 00:00 0 
ec9a3000-eca6c000 rwxp ec9a3000 00:00 0 
eca6c000-ecc20000 r-xs 03f4d000 08:03 3732017                            /export/local/common/jdk/baseline/linux-i586/jre/lib/rt.jar
ecc20000-ecc48000 rwxp ecc20000 00:00 0 
ecc48000-ecc49000 ---p ecc48000 00:00 0 
ecc49000-eccc9000 rwxp ecc49000 00:00 0 
eccc9000-eccca000 ---p eccc9000 00:00 0 
eccca000-ecd4a000 rwxp eccca000 00:00 0 
ecd4a000-ecd4b000 ---p ecd4a000 00:00 0 
ecd4b000-ecdcb000 rwxp ecd4b000 00:00 0 
ecdcb000-ecdcc000 ---p ecdcb000 00:00 0 
ecdcc000-ece4c000 rwxp ecdcc000 00:00 0 
ece4c000-ece4d000 ---p ece4c000 00:00 0 
ece4d000-ed577000 rwxp ece4d000 00:00 0 
ed577000-ed58f000 rwxp ed577000 00:00 0 
ed58f000-ed5a7000 rwxp ed58f000 00:00 0 
ed5a7000-ed5bf000 rwxp ed5a7000 00:00 0 
ed5bf000-f05c0000 rwxp ed5bf000 00:00 0 
f05c0000-f35c0000 rwxp f05c0000 00:00 0 
f35c1000-f35ca000 rwxp f35c1000 00:00 0 
f35ca000-f35cb000 ---p f35ca000 00:00 0 
f35cb000-f364b000 rwxp f35cb000 00:00 0 
f364b000-f364c000 ---p f364b000 00:00 0 
f364c000-f36cc000 rwxp f364c000 00:00 0 
f36cc000-f36cd000 ---p f36cc000 00:00 0 
f36cd000-f374d000 rwxp f36cd000 00:00 0 
f374d000-f374e000 ---p f374d000 00:00 0 
f374e000-f37ce000 rwxp f374e000 00:00 0 
f37ce000-f37cf000 ---p f37ce000 00:00 0 
f37cf000-f384f000 rwxp f37cf000 00:00 0 
f384f000-f3850000 ---p f384f000 00:00 0 
f3850000-f38d0000 rwxp f3850000 00:00 0 
f38d0000-f38d1000 ---p f38d0000 00:00 0 
f38d1000-f3951000 rwxp f38d1000 00:00 0 
f3951000-f3952000 ---p f3951000 00:00 0 
f3952000-f39d2000 rwxp f3952000 00:00 0 
f39d2000-f39d3000 ---p f39d2000 00:00 0 
f39d3000-f3a53000 rwxp f39d3000 00:00 0 
f3a53000-f3a54000 ---p f3a53000 00:00 0 
f3a54000-f3ad4000 rwxp f3a54000 00:00 0 
f3ad4000-f3ad5000 ---p f3ad4000 00:00 0 
f3ad5000-f3b55000 rwxp f3ad5000 00:00 0 
f3b55000-f3b56000 ---p f3b55000 00:00 0 
f3b56000-f3bd6000 rwxp f3b56000 00:00 0 
f3bd6000-f3bd7000 ---p f3bd6000 00:00 0 
f3bd7000-f3c60000 rwxp f3bd7000 00:00 0 
f3c60000-f3d17000 rwxp f3c60000 00:00 0 
f3d17000-f3f57000 rwxp f3d17000 00:00 0 
f3f57000-f6d17000 rwxp f3f57000 00:00 0 
f6d17000-f6d20000 r-xp 00000000 08:03 4688438                            /lib/libnss_nis-2.5.so
f6d20000-f6d21000 r-xp 00008000 08:03 4688438                            /lib/libnss_nis-2.5.so
f6d21000-f6d22000 rwxp 00009000 08:03 4688438                            /lib/libnss_nis-2.5.so
f6d26000-f6d3e000 r-xp 00000000 08:03 3675546                            /export/local/common/jdk/baseline/linux-i586/jre/lib/i386/libzip.so
f6d3e000-f6d3f000 rwxp 00018000 08:03 3675546                            /export/local/common/jdk/baseline/linux-i586/jre/lib/i386/libzip.so
f6d3f000-f6d47000 rwxs 00000000 08:03 4683930                            /tmp/hsperfdata_gtee/8478
f6d47000-f6d6a000 r-xp 00000000 08:03 3732228                            /export/local/common/jdk/baseline/linux-i586/jre/lib/i386/libjava.so
f6d6a000-f6d6c000 rwxp 00023000 08:03 3732228                            /export/local/common/jdk/baseline/linux-i586/jre/lib/i386/libjava.so
f6d6c000-f6d6f000 ---p f6d6c000 00:00 0 
f6d6f000-f6dbd000 rwxp f6d6f000 00:00 0 
f6dbd000-f7af6000 r-xp 00000000 08:03 3732736                            /export/local/common/jdk/baseline/linux-i586/jre/lib/i386/server/libjvm.so
f7af6000-f7b51000 rwxp 00d38000 08:03 3732736                            /export/local/common/jdk/baseline/linux-i586/jre/lib/i386/server/libjvm.so
f7b51000-f7fc4000 rwxp f7b51000 00:00 0 
f7fc4000-f7fd7000 r-xp 00000000 08:03 3836210                            /export/local/common/jdk/baseline/linux-i586/jre/lib/i386/jli/libjli.so
f7fd7000-f7fd8000 rwxp 00013000 08:03 3836210                            /export/local/common/jdk/baseline/linux-i586/jre/lib/i386/jli/libjli.so
f7fda000-f7fe0000 rwxp f7fda000 00:00 0 
f7fe0000-f7fea000 r-xp 00000000 08:03 4688434                            /lib/libnss_files-2.5.so
f7fea000-f7feb000 r-xp 00009000 08:03 4688434                            /lib/libnss_files-2.5.so
f7feb000-f7fec000 rwxp 0000a000 08:03 4688434                            /lib/libnss_files-2.5.so
f7fec000-f7fee000 rwxp f7fec000 00:00 0 
f7fee000-f7fef000 r-xp f7fee000 00:00 0 
f7fef000-f7ff0000 rwxp f7fef000 00:00 0 
f7ff0000-f7ffc000 r-xp 00000000 08:03 3675545                            /export/local/common/jdk/baseline/linux-i586/jre/lib/i386/libverify.so
f7ffc000-f7ffd000 rwxp 0000c000 08:03 3675545                            /export/local/common/jdk/baseline/linux-i586/jre/lib/i386/libverify.so
f7ffd000-f7ffe000 rwxp f7ffd000 00:00 0 
ff841000-ff84a000 rwxp ff841000 00:00 0                                  [stack]
ffffe000-fffff000 r-xp ffffe000 00:00 0 

VM Arguments:
jvm_args: -Xmx32m -XX:-CMSYield -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=0 
java_command: BubbleUpRef 16000 50 10000
Launcher Type: SUN_STANDARD

Environment Variables:
CLASSPATH=.:/export/local/40351.JDK7.NIGHTLY.VM+linux-i586_javase_client_comp_JT_HS/results/workDir/classes/closed/gc/4950157:
PATH=/bin:/usr/bin
DISPLAY=vm-v240-01.sfbay.sun.com:1

Signal Handlers:
SIGSEGV: [libjvm.so+0xbb91c0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGBUS: [libjvm.so+0xbb91c0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGFPE: [libjvm.so+0x9b6330], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGPIPE: [libjvm.so+0x9b6330], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGXFSZ: [libjvm.so+0x9b6330], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGILL: [libjvm.so+0x9b6330], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGUSR1: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000
SIGUSR2: [libjvm.so+0x9bacf0], sa_mask[0]=0x00000004, sa_flags=0x10000004
SIGHUP: [libjvm.so+0x9ba570], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGINT: [libjvm.so+0x9ba570], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGTERM: [libjvm.so+0x9ba570], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGQUIT: [libjvm.so+0x9ba570], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004


---------------  S Y S T E M  ---------------

OS:Red Hat Enterprise Linux Server release 5.5 (Tikanga)

uname:Linux 2.6.18-8.el5 #1 SMP Fri Jan 26 14:15:14 EST 2007 x86_64
libc:glibc 2.5 NPTL 2.5 
rlimit: STACK 10000k, CORE 0k, NPROC 262144, NOFILE 1024, AS infinity
load average:0.00 0.23 0.67

/proc/meminfo:
MemTotal:     30870304 kB
MemFree:      21490904 kB
Buffers:        645636 kB
Cached:        2802396 kB
SwapCached:          0 kB
Active:        3312944 kB
Inactive:      5447528 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:     30870304 kB
LowFree:      21490904 kB
SwapTotal:    15631236 kB
SwapFree:     15631236 kB
Dirty:             664 kB
Writeback:           0 kB
AnonPages:      439752 kB
Mapped:          80396 kB
Slab:           557128 kB
PageTables:      15172 kB
NFS_Unstable:        0 kB
Bounce:              0 kB
CommitLimit:  31066388 kB
Committed_AS:  1100268 kB
VmallocTotal: 34359738367 kB
VmallocUsed:    270280 kB
VmallocChunk: 34359467683 kB
HugePages_Total:     0
HugePages_Free:      0
HugePages_Rsvd:      0
Hugepagesize:     2048 kB


CPU:total 16 (4 cores per cpu, 1 threads per core) family 6 model 15 stepping 11, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3

Memory: 4k page, physical 30870304k(21490904k free), swap 15631236k(15631236k free)

vm_info: OpenJDK Server VM (20.0-b03-internal-201012062126.coleenp.rt-merge-fastdebug) for linux-x86 JRE (1.7.0), built on Dec  6 2010 16:43:26 by "jprtadm" with gcc 4.1.2 20070115 (SUSE Linux)

time: Mon Dec  6 22:36:32 2010
elapsed time: 1 seconds

Comments
EVALUATION http://hg.openjdk.java.net/jdk7/build/hotspot/rev/8df09fb45352
25-12-2010

EVALUATION http://hg.openjdk.java.net/jdk7/hotspot/hotspot/rev/8df09fb45352
10-12-2010

EVALUATION http://hg.openjdk.java.net/jdk7/hotspot-gc/hotspot/rev/8df09fb45352
09-12-2010

SUGGESTED FIX --- a/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Tue Dec 07 21:55:53 2010 -0800 +++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Thu Dec 09 09:22:57 2010 -0800 @@ -2060,7 +2060,6 @@ void G1CollectedHeap::ref_processing_ini _ref_processor = ReferenceProcessor::create_ref_processor( mr, // span false, // Reference discovery is not atomic - // (though it shouldn't matter here.) true, // mt_discovery NULL, // is alive closure: need to fill this in for efficiency ParallelGCThreads, --- a/src/share/vm/memory/referenceProcessor.cpp Tue Dec 07 21:55:53 2010 -0800 +++ b/src/share/vm/memory/referenceProcessor.cpp Thu Dec 09 09:22:57 2010 -0800 @@ -1146,6 +1146,20 @@ ReferenceProcessor::add_to_discovered_li } } +#ifndef PRODUCT +// Non-atomic (i.e. concurrent) discovery might allow us +// to observe j.l.References with NULL referents, being those +// cleared concurrently by mutators during (or after) discovery. +void ReferenceProcessor::verify_referent(oop obj) { + bool da = discovery_is_atomic(); + oop referent = java_lang_ref_Reference::referent(obj); + assert(da ? referent->is_oop() : referent->is_oop_or_null(), + err_msg("Bad referent " INTPTR_FORMAT " found in Reference " + INTPTR_FORMAT " during %satomic discovery ", + (intptr_t)referent, (intptr_t)obj, da ? "" : "non-")); +} +#endif + // We mention two of several possible choices here: // #0: if the reference object is not in the "originating generation" // (or part of the heap being collected, indicated by our "span" @@ -1196,14 +1210,8 @@ bool ReferenceProcessor::discover_refere // We only enqueue references whose referents are not (yet) strongly // reachable. if (is_alive_non_header() != NULL) { - oop referent = java_lang_ref_Reference::referent(obj); - // In the case of non-concurrent discovery, the last - // disjunct below should hold. It may not hold in the - // case of concurrent discovery because mutators may - // concurrently clear() a Reference. - assert(UseConcMarkSweepGC || UseG1GC || referent != NULL, - "Refs with null referents already filtered"); - if (is_alive_non_header()->do_object_b(referent)) { + verify_referent(obj); + if (is_alive_non_header()->do_object_b(java_lang_ref_Reference::referent(obj))) { return false; // referent is reachable } } @@ -1247,13 +1255,13 @@ bool ReferenceProcessor::discover_refere } if (RefDiscoveryPolicy == ReferentBasedDiscovery) { - oop referent = java_lang_ref_Reference::referent(obj); - assert(referent->is_oop(), "bad referent"); + verify_referent(obj); // enqueue if and only if either: // reference is in our span or // we are an atomic collector and referent is in our span if (_span.contains(obj_addr) || - (discovery_is_atomic() && _span.contains(referent))) { + (discovery_is_atomic() && + _span.contains(java_lang_ref_Reference::referent(obj)))) { // should_enqueue = true; } else { return false; @@ -1301,7 +1309,7 @@ bool ReferenceProcessor::discover_refere } } assert(obj->is_oop(), "Enqueued a bad reference"); - assert(java_lang_ref_Reference::referent(obj)->is_oop(), "Enqueued a bad referent"); + verify_referent(obj); return true; } --- a/src/share/vm/memory/referenceProcessor.hpp Tue Dec 07 21:55:53 2010 -0800 +++ b/src/share/vm/memory/referenceProcessor.hpp Thu Dec 09 09:22:57 2010 -0800 @@ -345,6 +345,7 @@ class ReferenceProcessor : public CHeapO // debugging void verify_no_references_recorded() PRODUCT_RETURN; + void verify_referent(oop obj) PRODUCT_RETURN; static void verify(); // clear the discovered lists (unlinking each entry).
09-12-2010

SUGGESTED FIX Weaken assert from: referent(obj)->is_oop() to: referent(obj)->is_oop_or_null()
08-12-2010

EVALUATION The assert is too strong for concurrent discovery. It should be is_oop_or_null() not is_oop(). This may also explain a similar assert noted with G1 concurrent marking (CR 7005174).
08-12-2010