-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
8293851: hs_err should print more stack in hex dump #10282
Conversation
👋 Welcome back shade! A progress list of the required criteria for merging this PR into |
Webrevs
|
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 great!
@shipilev 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 28 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 |
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.
+1
I would consider hiding sizeof(intptr_t)
from the call sites. Seems like unnecessary noise to me.
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 dislike a bit that the new function lives in os.hpp since it is a rather specific function used in one place only and would better live locally in vmError.cpp.
I guess it needs to be this way if you want to keep the patch small, because we have no platform-independent API for extracting PC and SP from a context (which would be trivial to implement, but I don't know how far you want to go).
One of the reasons why |
Right. Stack dump is one of those things where we expect word-granularity (almost?) everywhere. Done in new commit. |
@tstuefe -- happy with current PR, or? |
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.
Still ok
All right, I am integrating. /integrate |
Going to push as commit cbd0688.
Your commit was automatically rebased without conflicts. |
Similar to JDK-8217879, the debugging would be easier if we dump more stack in the hex dump. This is especially convenient when debugging Loom and seeing more of the raw stack in the crash log. Reading farther from current SP is generally safe, since stack banging mechanism provides us with accessible stack at all times for normal SPs. In fact, many platforms already read significantly more stack than x86.
We can homogenize the stack printing across all architectures. I believe the stack grows the same way on all supported arches (downwards), so we can read in one direction. Tell me if you still want to make that one selectable.
As the safeguard, JDK-8217994 gives us the facility to read the memory much more safely, so we can dump more stack without elevated risk of secondary crash, in case the stack is not readable.
x86_64 hs_err before:
x86_64 hs_err after:
Testing:
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/10282/head:pull/10282
$ git checkout pull/10282
Update a local copy of the PR:
$ git checkout pull/10282
$ git pull https://git.openjdk.org/jdk pull/10282/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 10282
View PR using the GUI difftool:
$ git pr show -t 10282
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/10282.diff