RFR: 8256020: Don't resurrect objects on argument-dependency access
Roman Kennke
rkennke at openjdk.java.net
Tue Nov 10 19:08:54 UTC 2020
On Tue, 10 Nov 2020 17:56:53 GMT, Erik Österlund <eosterlund at openjdk.org> wrote:
> > The original assert seems to imply that a new MutableCallSite refers to an old but unmarked DirectMethodHandle.
>
> Sounds like the old MutableCallSite escaped the snapshot at the beginning somehow. Maybe it is related to your new reference processor?
Hmm I think it is more subtle than that.
I changed all occurances of argument_oop() one-by-one with the 'phantom' variant to narrow it down. It really is the flush_dependencies() method that breaks it. However, as you noted, it cannot accept NULL there, otherwise it would crash. However, we *do* have a special code-path there that returns the original object instead of NULL *when the calling thread is not a Java thread* (See https://bugs.openjdk.java.net/browse/JDK-8237874). I believe this is why the fix helps. OTOH, if I don't do this, the remainder of the barrier would evacuate the object, and thus make the unreachable object alive again. :-S I suspect that we must skip evacuating objects when we get AS_NO_KEEPALIVE, but that seems to result in a "memory stomping" error. Grrrr.
-------------
PR: https://git.openjdk.java.net/jdk/pull/1113
More information about the hotspot-compiler-dev
mailing list