Skip to content
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

Closed
wants to merge 2 commits into from

Conversation

coleenp
Copy link
Contributor

@coleenp coleenp commented Jan 17, 2024

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

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8323685: PrintSystemDictionaryAtExit has mutex rank assert (Bug - P4)

Reviewers

Contributors

  • Thomas Schatzl <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

@coleenp
Copy link
Contributor Author

coleenp commented Jan 17, 2024

/contributor add @tschatzl

@bridgekeeper
Copy link

bridgekeeper bot commented Jan 17, 2024

👋 Welcome back coleenp! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added the rfr Pull request is ready for review label Jan 17, 2024
@openjdk
Copy link

openjdk bot commented Jan 17, 2024

@coleenp
Contributor Thomas Schatzl <tschatzl@openjdk.org> successfully added.

@openjdk
Copy link

openjdk bot commented Jan 17, 2024

@coleenp The following label will be automatically applied to this pull request:

  • hotspot

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.

@openjdk openjdk bot added the hotspot hotspot-dev@openjdk.org label Jan 17, 2024
@mlbridge
Copy link

mlbridge bot commented Jan 17, 2024

Webrevs

@tschatzl
Copy link
Contributor

/label add hotspot-gc

@openjdk openjdk bot added the hotspot-gc hotspot-gc-dev@openjdk.org label Jan 19, 2024
@openjdk
Copy link

openjdk bot commented Jan 19, 2024

@tschatzl
The hotspot-gc label was successfully added.

Copy link
Contributor

@tschatzl tschatzl left a 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.

Comment on lines 25 to 29
class SampleClass {
public static void main(java.lang.String[] unused) {
System.out.println("Hello from the sample class");
}
}
Copy link
Contributor

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...

Copy link
Contributor Author

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.

@openjdk
Copy link

openjdk bot commented Jan 19, 2024

@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:

8323685: PrintSystemDictionaryAtExit has mutex rank assert

Co-authored-by: Thomas Schatzl <tschatzl@openjdk.org>
Reviewed-by: tschatzl, ayang

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 master branch:

  • 16be388: 8322383: G1: Only preserve marks on objects that are actually moved
  • 0081d8c: 8324147: Serial: Remove generation::compute_new_size
  • 5f71419: 8322366: Add IEEE rounding mode corruption check to JNI checks
  • 0533022: 8222719: libperfstat on AIX - cleanup old API versions
  • 05dad67: 8295804: javax/swing/JFileChooser/JFileChooserSetLocationTest.java failed with "setLocation() is not working properly"
  • 9efdd24: 8324053: Use the blessed modifier order for sealed in java.base
  • 81df265: 8320458: Improve structural navigation in API documentation
  • a6c0b10: 8323684: TypeMirror.{getAnnotationsByType, getAnnotation} return uninformative results
  • 5c874c1: 8324161: validate-source fails after JDK-8275338
  • b6233c3: 8321925: sun/security/mscapi/KeytoolChangeAlias.java fails with "Alias <246810> does not exist"
  • ... and 14 more: https://git.openjdk.org/jdk/compare/ffa33d7b807bfef6ff05c9adba869dddf813cf68...master

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 master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Jan 19, 2024
Copy link
Member

@tstuefe tstuefe left a 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?

@coleenp
Copy link
Contributor Author

coleenp commented Jan 19, 2024

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,
Copy link
Contributor Author

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.

Copy link
Member

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.

Copy link
Contributor Author

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!

@coleenp
Copy link
Contributor Author

coleenp commented Jan 19, 2024

Thanks Thomas and Albert for reviews, Thomas Stuefe for your comments.
/integrate

@openjdk
Copy link

openjdk bot commented Jan 19, 2024

Going to push as commit 2865afe.
Since your change was applied there have been 25 commits pushed to the master branch:

  • 6997bfc: 8323154: C2: assert(cmp != nullptr && cmp->Opcode() == Op_Cmp(bt)) failed: no exit test
  • 16be388: 8322383: G1: Only preserve marks on objects that are actually moved
  • 0081d8c: 8324147: Serial: Remove generation::compute_new_size
  • 5f71419: 8322366: Add IEEE rounding mode corruption check to JNI checks
  • 0533022: 8222719: libperfstat on AIX - cleanup old API versions
  • 05dad67: 8295804: javax/swing/JFileChooser/JFileChooserSetLocationTest.java failed with "setLocation() is not working properly"
  • 9efdd24: 8324053: Use the blessed modifier order for sealed in java.base
  • 81df265: 8320458: Improve structural navigation in API documentation
  • a6c0b10: 8323684: TypeMirror.{getAnnotationsByType, getAnnotation} return uninformative results
  • 5c874c1: 8324161: validate-source fails after JDK-8275338
  • ... and 15 more: https://git.openjdk.org/jdk/compare/ffa33d7b807bfef6ff05c9adba869dddf813cf68...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Jan 19, 2024
@openjdk openjdk bot closed this Jan 19, 2024
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Jan 19, 2024
@openjdk
Copy link

openjdk bot commented Jan 19, 2024

@coleenp Pushed as commit 2865afe.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@coleenp coleenp deleted the cht-mutex branch January 19, 2024 16:58
@tschatzl
Copy link
Contributor

/backport jdk22u

@openjdk
Copy link

openjdk bot commented Apr 23, 2024

@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:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit 2865afe7 from the openjdk/jdk repository.

The commit being backported was authored by Coleen Phillimore on 19 Jan 2024 and was reviewed by Thomas Schatzl and Albert Mingkun Yang.

Thanks!

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:

$ git fetch https://github.com/openjdk-bots/jdk22u.git backport-tschatzl-2865afe7:backport-tschatzl-2865afe7
$ git checkout backport-tschatzl-2865afe7
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk22u.git backport-tschatzl-2865afe7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot hotspot-dev@openjdk.org hotspot-gc hotspot-gc-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

4 participants