-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
8330464: hserr generic events - add entry for the before_exit calls #18809
Conversation
👋 Welcome back mbaesken! A progress list of the required criteria for merging this PR into |
@MBaesken 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 90 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
Webrevs
|
@@ -833,7 +833,7 @@ jint Threads::create_vm(JavaVMInitArgs* args, bool* canTryAgain) { | |||
|
|||
// Threads::destroy_vm() is normally called from jni_DestroyJavaVM() when | |||
// the program falls off the end of main(). Another VM exit path is through | |||
// vm_exit() when the program calls System.exit() to return a value or when | |||
// vm_exit() when |
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.
I think you have to read it like this:
Exit Path 1: reaching from Threads::destroy_vm()
Exit Path 2: reaching from
- vm_exit()
- System.exit()
- Serious error
Maybe add commas to disambiguate.
(https://en.wikipedia.org/wiki/Serial_comma)
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.
I adjusted the comment and brought back the deleted part.
// vm_exit() when the program calls System.exit() to return a value, or when | ||
// there is a serious error in VM. |
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.
I'm not a native english speaker but I think all elements in the series need to be separated by commas.
Otherwise the misinterpretation that System.exit()
calls vm_exit()
is more likely.
// vm_exit() when the program calls System.exit() to return a value, or when | |
// there is a serious error in VM. | |
// vm_exit(), when the program calls System.exit() to return a value, or when | |
// there is a serious error in VM. |
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.
Lgtm.
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.
LGTM.
Thanks for the reviews ! /integrate |
Going to push as commit 45ed97f.
Your commit was automatically rebased without conflicts. |
We currently miss a hs_err file generic event entry for before_exit calls. Those would be helpful to see clearly that a crash happened in a shutdown phase (we had this case recently and would have liked to have a hserr event log entry showing this more clearly).
Additionally while testing the event I called System.exit(0) to check the event.
This showed a native backtrace like this
Stack: [0x00007f1cfe825000,0x00007f1cfe926000], sp=0x00007f1cfe924530, free space=1021k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.so+0x8fb21b] before_exit(JavaThread*, bool)+0x4bb (java.cpp:376)
V [libjvm.so+0x9da27c] JVM_Halt+0x6c (jvm.cpp:442)
j java.lang.Shutdown.halt0(I)V+0 java.base@23.0.0.1-internal
j java.lang.Shutdown.halt(I)V+7 java.base@23.0.0.1-internal
j java.lang.Shutdown.exit(I)V+16 java.base@23.0.0.1-internal
j java.lang.Runtime.exit(I)V+14 java.base@23.0.0.1-internal
j java.lang.System.exit(I)V+4 java.base@23.0.0.1-internal
So the comment in thread.cpp seems to be outdated, Threads::destroy_vm() is not in the callstack and vm_exit() is not seen as well in the callstack so probably the comment needs adjustment.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/18809/head:pull/18809
$ git checkout pull/18809
Update a local copy of the PR:
$ git checkout pull/18809
$ git pull https://git.openjdk.org/jdk.git pull/18809/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 18809
View PR using the GUI difftool:
$ git pr show -t 18809
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/18809.diff
Webrev
Link to Webrev Comment