-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8271353: PerfDataManager::destroy crashes in VM_Exit #4913
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
Conversation
|
👋 Welcome back xliu! A progress list of the required criteria for merging this PR into |
Webrevs
|
dholmes-ora
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.
The additional NULL checks seem fine and trivial.
Thanks,
David
|
@navyxliu 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 19 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 |
tstuefe
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.
+1
yminqi
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.
Hi, Xin
The copyright year needs updated.
Maybe '0' is more meaningful than '-1'?
also update copyright year.
Thanks for the head-up. I agree that 0 is easier to understand. I will update it. |
|
Thank all reviewers. |
dholmes-ora
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.
I actually preferred the -1 to indicate "not available", but it doesn't really matter.
Thanks,
David
|
I have a same thought at first, but 0 isn't normal state. We can use 0 for N/A. |
|
/integrate |
|
Going to push as commit 41b4c19.
Your commit was automatically rebased without conflicts. |
This patch check PerfDataManager::_sampled and _constants is NULL. if it is,
return -1.
When the user enables UL
-Xlog:perf+datacreation=debug, it may crash inPerfDataManager::destroy(). The following line will crash when _sampled is NULL.
This only happens when UsePerfData is on and PerfDataManager::destroy() is invoked before
StatSampler::initialize() which initializes PerfDataManager::_sampled.
PerfDataManager::destroy() is called by VM_Exit which can be triggered by SIGINT on Linux anytime.
A reproducible: invoke the following command and keep pressing Ctrl-c.
$perf stat -r 100 java -Xlog:perf+datacreation=debug --version
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/4913/head:pull/4913$ git checkout pull/4913Update a local copy of the PR:
$ git checkout pull/4913$ git pull https://git.openjdk.java.net/jdk pull/4913/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 4913View PR using the GUI difftool:
$ git pr show -t 4913Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/4913.diff