-
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
8323685: PrintSystemDictionaryAtExit has mutex rank assert #17471
Conversation
/contributor add @tschatzl |
👋 Welcome back coleenp! A progress list of the required criteria for merging this PR into |
@coleenp |
Webrevs
|
/label add hotspot-gc |
@tschatzl |
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.
Seems to be just like that suggestion in #16062.
Feel free to ignore the other comment, at least I try to avoid extra files if not necessary.
class SampleClass { | ||
public static void main(java.lang.String[] unused) { | ||
System.out.println("Hello from the sample class"); | ||
} | ||
} |
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.
My recommendation to decrease the amount of noise would be to put this class into the other test file, and use SampleClass.class.getname()
to use in ProcessTools
.
Avoids an extra file and an extra copyright header...
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.
Thanks for the suggestion, it's much better.
@coleenp 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 24 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.
Could there be a reasonable default rank?
The default rank is nosafepoint-2, from before the G1 fix. G1 just needed a lower ranking. |
@@ -406,10 +407,11 @@ class ConcurrentHashTable : public CHeapObj<F> { | |||
size_t log2size_limit = DEFAULT_MAX_SIZE_LOG2, | |||
size_t grow_hint = DEFAULT_GROW_HINT, | |||
bool enable_statistics = DEFAULT_ENABLE_STATISTICS, | |||
Mutex::Rank rank = Mutex::nosafepoint-2, |
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.
This is the default rank. It seems reasonable to not stop for safepoints with the resizing lock (since it's the lock taken while in a safepoint - do_safepoint_scan). This was the default before it was lowered to service-1.
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.
Ah. Sorry for missing it. I was thrown off by the explicit constructor below and the different order of arguments.
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.
It took me while to find it from Thomas's original patch too. Thanks!
Thanks Thomas and Albert for reviews, Thomas Stuefe for your comments. |
Going to push as commit 2865afe.
Your commit was automatically rebased without conflicts. |
/backport jdk22u |
@tschatzl the backport was successfully created on the branch backport-tschatzl-2865afe7 in my personal fork of openjdk/jdk22u. To create a pull request with this backport targeting openjdk/jdk22u:master, just click the following link: The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:
If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk22u:
|
Use variant 2 change from PR #16062 that allows the ConcurrentHashTable to specify lock ranking for the resize lock at construction. SystemDictionary printing takes out both CHT resize lock and the ttyLocker.
Tested with tier1-7, special stress test in tier7 to verify JDK-8317440 is still fixed.
Progress
Issue
Reviewers
Contributors
<tschatzl@openjdk.org>
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/17471/head:pull/17471
$ git checkout pull/17471
Update a local copy of the PR:
$ git checkout pull/17471
$ git pull https://git.openjdk.org/jdk.git pull/17471/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 17471
View PR using the GUI difftool:
$ git pr show -t 17471
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/17471.diff
Webrev
Link to Webrev Comment