RFR: Fix ReferenceProcessor related assert
Roman Kennke
rkennke at redhat.com
Thu Dec 15 16:34:11 UTC 2016
Aleksey recently found an assert:
# Internal Error (/opt/jenkins/workspace/jdk9-shenandoah-
fastdebug/hotspot/src/share/vm/gc/shenandoah/shenandoahBarrierSet.cpp:2
72), pid=29026, tid=29028
# assert(o == __null || oopDesc::unsafe_equals(o,
resolve_oop_static(o))) failed: only write to-space values
coming from:
V [libjvm.so+0xa4e87a] report_vm_error(char const*, int, char const*,
char const*, ...)+0xea
V [libjvm.so+0x13b374f] ShenandoahBarrierSet::write_ref_field_work(vo
id*, oop, bool)+0x11f
V [libjvm.so+0x132f0e7] BarrierSet::write_ref_field(void*, oop,
bool)+0x57
V [libjvm.so+0x132c6dd] ReferenceProcessor::enqueue_discovered_reflis
t(DiscoveredList&)+0x71d
I think this is harmless, but needs some treatment. What happens is
this: in enqueue_discovered_reflist() it calls
swap_reference_pending_list() which can give us a from-space reference
(GC roots in Universe get updated after weakref processing!). Then it
stores that in set_discovered_raw() which is ok, because that does the
correct read-barrier before storing, but then goes on to call
write_ref_field() which, for Shenandoah, only does assert a few things.
And blows up when it gets a from-space reference.
The cheapest fix is to do a read-barrier in debug build.
http://cr.openjdk.java.net/~rkennke/fixrefproc/webrev.00/
Ok to push?
Roman
More information about the shenandoah-dev
mailing list