RFC: 6898462: The escape analysis with G1 cause crash assertion src/share/vm/runtime/vframeArray.cpp:94
John Rose
john.r.rose at oracle.com
Wed Nov 19 00:24:57 UTC 2014
I really don't like the extra bit passed back from locals(&bit), etc. It is too indirect to follow the logic clearly from its producer to consumer, especially since it has to be passed through a bunch of extra function parameters.
I would greatly prefer, if it were possible, a more direct indication from each StackValue. For example:
bool obj_failed_realloc() {
assert(type() == T_OBJECT, "type check");
return _i != 0 && _o.is_null();
}
Or maybe some encoding using _i not equal to 0 or 1.
I think this would remove some noise from this change, pushing the tests closer to where the StackValues are actually used.
Also, (this is a matter of style) I would prefer that the processing of edge cases would not increase the indentation of the main flow of the algorithm. I know some people dislike short-circuit branches like "if (side condition) continue;" but IMO they help readability if they are not symmetric with the main flow of the logic.
It is also the case that reviews, backports, and change analysis are made a little more difficult when there are wholesale indentation changes. (Of course, the "diff -w" option puts a bound on this.)
Also, I don't think it is safe to assume that an error which interrupts object reallocation must be an OOM. It could be some other kind of VM error, couldn't it? It's hate to see the JVM throw an assert in that case.
— John
On Nov 18, 2014, at 11:29 AM, Roland Westrelin <roland.westrelin at oracle.com> wrote:
> This is the OOM during deoptimization that causes a crash problem.
>
> Here is the change I propose:
>
> http://cr.openjdk.java.net/~roland/6898462/webrev.00/
>
> I haven’t done a lot of testing. I’m looking for feedback.
>
> With that change, the top interpreter frames that reference a failed reallocation are unconditionally popped as the exception is propagated. I record the number of frames to pop in the JavaThread structure and pop the frames in the interpreter runtime code that does the exception propagation.
>
> Roland.
More information about the hotspot-compiler-dev
mailing list