-
Enhancement
-
Resolution: Fixed
-
P3
-
8-pool, 11-pool, 17-pool, 20
-
b04
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8300964 | 17.0.8-oracle | Calvin Cheung | P3 | Resolved | Fixed | b01 |
JDK-8308186 | 17.0.8 | Martin Doerr | P3 | Resolved | Fixed | b03 |
JDK-8301099 | 11.0.20-oracle | Calvin Cheung | P3 | Resolved | Fixed | b01 |
JDK-8308535 | 11.0.20 | Martin Doerr | P3 | Resolved | Fixed | b04 |
void JavaThread::print_stack_on(outputStream* st) {
if (!has_last_Java_frame()) return;
But it is used to show where -Xcheck:jni warnings originate from and from jni_FatalError. That means that when the JNI code is executed at the top-level of a thread, such as in the launcher, with no Java code on the stack, then we get zero information about where the warning, or error, was generated. This makes tracking down such warnings very tedious.
If there are no Java frames the JNI code should call the debug utility print_native_stack; though I note a second problem if we do that is that os::current_frame() will trigger an assertion in the frame code due to a NULL pc. So a little more effort is needed to make that work (I commented out the assertion and got the stack trace I wanted).
- backported by
-
JDK-8300964 jni_FatalError and Xcheck:jni warnings should print the native stack when there are no Java frames
- Resolved
-
JDK-8301099 jni_FatalError and Xcheck:jni warnings should print the native stack when there are no Java frames
- Resolved
-
JDK-8308186 jni_FatalError and Xcheck:jni warnings should print the native stack when there are no Java frames
- Resolved
-
JDK-8308535 jni_FatalError and Xcheck:jni warnings should print the native stack when there are no Java frames
- Resolved
- relates to
-
JDK-8311542 Consolidate the native stack printing code
- Open
-
JDK-8311541 JavaThread::print_jni_stack doesn't support native stacks on all platforms
- Resolved
-
JDK-8301570 Test runtime/jni/nativeStack/ needs to detach the native thread
- Resolved
- links to
-
Commit openjdk/jdk11u-dev/a9bb31fc
-
Commit openjdk/jdk17u-dev/e7bac423
-
Commit openjdk/jdk/37574333
-
Review openjdk/jdk11u-dev/1887
-
Review openjdk/jdk17u-dev/1328
-
Review openjdk/jdk/11703