Integrated: 8292674: ReportJNIFatalError should print all java frames
David Holmes
dholmes at openjdk.org
Tue Dec 13 00:08:50 UTC 2022
On Mon, 5 Dec 2022 06:58:32 GMT, David Holmes <dholmes at openjdk.org> wrote:
> When JNI reports errors and warnings and produces a stack trace, we need to see the exact Java code that was being executed. The existing `JavaThread::print_stack` that is used is only for platform/carrier threads and doesn't show any mounted virtual thread. So we introduce a new `JavaThread::print_virtual_stack_on` method to print the mounted virtual thread's stack, and we add `JavaThread::print_jni_stack` as a utility for JNI to call that dispatches to the appropriate function based on the thread type.
>
> The existing test `hotspot/jtreg/runtime/jni/checked/TestPrimitiveArrayCriticalWithBadParam.java` was modified to test regular and virtual threads, and to expect to see the specific stack frame of the Java native method.
>
> Additional manual testing of the JNI `FatalError` method was done by direct fault injection in modified JDK code.
>
> Sanity testing: Oracle tiers 1-4 (to include our -Xcheck:jni run in tier4)
>
> Thanks,
> David
This pull request has now been integrated.
Changeset: 829cbc2c
Author: David Holmes <dholmes at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/829cbc2cb16cfe4ad23df934768cb820e79511d8
Stats: 96 lines in 6 files changed: 79 ins; 3 del; 14 mod
8292674: ReportJNIFatalError should print all java frames
Reviewed-by: pchilanomate
-------------
PR: https://git.openjdk.org/jdk/pull/11503
More information about the hotspot-dev
mailing list