Integrated: 8256746: gc/ fails without -XX:-CriticalJNINatives

Aleksey Shipilev shade at
Mon Nov 23 19:14:57 UTC 2020

On Fri, 20 Nov 2020 14:23:55 GMT, Aleksey Shipilev <shade at> wrote:

> Found this with Zero testing, but the failure is not Zero-specific. It affects platforms that do not have `CriticalJNINatives` enabled. The issue is that the [fallback (non-critical)]( native version of the code calls `GetArrayLength` on [known `NULL` array](
> $ CONF=linux-x86_64-zero-fastdebug make exploded-test TEST=gc/
> #
> # Internal Error (/home/shade/trunks/jdk/src/hotspot/share/runtime/jniHandles.inline.hpp:91), pid=1909139, tid=1909217
> # assert(handle != __null) failed: JNI handle should not be null
> It was exposed by [JDK-8233343]( that added the generic test configuration, and then by [JDK-8256499]( that enabled Zero+Epsilon. Before that, the test was only enabled for specific GCs and arches where `CriticalJNINatives` are known to work, and thus we never took that (broken) fallback in this test.
> Note that `CriticalJNINatives` is a deprecated flag, and I expect the test to go away together with the flag later. Meanwhile, let's make sure it runs properly. I also reformatted the run configs a bit to make them more readable, and added `-XX:-CriticalJNINatives` to expose the affected path in most configurations.
> Additional testing:
>  - [x] Affected test with Zero (+Epsilon, +Shenandoah)
>  - [x] Affected test with Server (+Epsilon, +Shenandoah)

This pull request has now been integrated.

Changeset: d9ae0db6
Author:    Aleksey Shipilev <shade at>
Stats:     46 lines in 2 files changed: 36 ins; 2 del; 8 mod

8256746: gc/ fails without -XX:-CriticalJNINatives

Reviewed-by: kbarrett, coleenp, rkennke



More information about the hotspot-gc-dev mailing list