RFR (XS): 7114095: G1: assert(obj == oopDesc::load_decode_heap_oop(p)) failed: p should still be pointing to obj
John Cuthbertson
john.cuthbertson at oracle.com
Wed Nov 30 19:23:11 UTC 2011
Hi Everyone,
Can I have a couple of volunteers look over the fix for this CR? The
webrev can be found at:
http://http://cr.openjdk.java.net/~johnc/7114095/webrev.0/
Summary:
As a result of the changes for 4965777, we could apply the
G1ParScanClosure twice to the discovered field of a reference object.
Once because the closure itself has the apply_to_weak_discovered_field
attribute (as I think it should) and the other because of the changes
for 4965777. This causes the discovered field of an evacuated reference
object to be pushed to the _refs_to_scan queue twice. Normally this is
not a problem as the evacuation code can handle seeing the same object
more than once. In this case however, if the result of the first push is
stolen and the referenced object successfully evacuated by another
worker thread, then the assert is too strong. The other worker will
update the discovered field to point to the new location while the
current thread is pushing the discovered field for the second time. As a
result when the current thread executes the assert, the discovered field
could have been updated and trips the assert.
The solution is to weaken the assert slightly.
Testing: Both failing test cases running continuously overnight (they
typically fail within a few iterations); the GC test suite with a delay
in the offending code; jprt.
Thanks,
JohnC
More information about the hotspot-gc-dev
mailing list