-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8292674: ReportJNIFatalError should print all java frames #11503
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8292674: ReportJNIFatalError should print all java frames #11503
Conversation
|
👋 Welcome back dholmes! A progress list of the required criteria for merging this PR into |
|
@dholmes-ora The following label will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command. |
Webrevs
|
|
/label add loom |
|
@dholmes-ora
|
pchilano
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Some comments below.
Thanks,
Patricio
test/hotspot/jtreg/runtime/jni/checked/TestPrimitiveArrayCriticalWithBadParam.java
Show resolved
Hide resolved
|
Thanks for looking at this @pchilano . I've made changes and will re-test before updating the PR. I'm retargetting this to JDK 21 now. |
…onitor examination. Updated stack printing for exception checks.
pchilano
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks David!
|
@dholmes-ora This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 3 new commits pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the ➡️ To integrate this PR with the above commit message to the |
|
Looks good, thanks! |
|
Thanks for looking at this @robehn , but can you hit the approve button please :) |
|
Seems Robbin is not around. /integrate |
|
Going to push as commit 829cbc2.
Your commit was automatically rebased without conflicts. |
|
@dholmes-ora Pushed as commit 829cbc2. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
|
Sorry, not sure why I missed your ping. |
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_stackthat is used is only for platform/carrier threads and doesn't show any mounted virtual thread. So we introduce a newJavaThread::print_virtual_stack_onmethod to print the mounted virtual thread's stack, and we addJavaThread::print_jni_stackas 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.javawas 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
FatalErrormethod 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
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/11503/head:pull/11503$ git checkout pull/11503Update a local copy of the PR:
$ git checkout pull/11503$ git pull https://git.openjdk.org/jdk pull/11503/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 11503View PR using the GUI difftool:
$ git pr show -t 11503Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/11503.diff