-
Notifications
You must be signed in to change notification settings - Fork 208
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
8276660: Scalability bottleneck in java.security.Provider.getService() #2730
Conversation
/issue add JDK-8292739 |
👋 Welcome back dlutker! A progress list of the required criteria for merging this PR into |
@lutkerd 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 15 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. As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@shipilev, @coffeys) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
This backport pull request has now been updated with issue from the original commit. |
@lutkerd |
@lutkerd |
60d5a8b
to
8561268
Compare
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 looks okay, but I have questions:
if (s == null) { | ||
synchronized (this) { | ||
ensureLegacyParsed(); | ||
if (legacyMap != null && !legacyMap.isEmpty()) { | ||
s = legacyMap.get(key); | ||
} | ||
s = legacyMap.get(key); | ||
if (s != null && !s.isValid()) { | ||
legacyMap.remove(key, s); |
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 hunk seems to be different from the hunk in the original changeset: openjdk/jdk@9b74749#diff-c2847a8d1997d3d28a13354b05d5e21ac6656e7e17f849bc198715099b9b5bd2L1204-R1286 -- and the follow-ups did not change it as well. Does this stack of patches contain some other patch?
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 block comes from the JFR patch I reverted and re-applied: https://github.com/openjdk/jdk/commit/bc2af47e1e4e6e96020e03a60ce098ddd17f63ba#diff-c2847a8d1997d3d28a13354b05d5[…]f849bc198715099b9b5bd2R1286-R1290
The code should be matching tip minus change changes from openjdk/jdk@1769596#diff-c2847a8d1997d3d28a13354b05d5e21ac6656e7e17f849bc198715099b9b5bd2R1273-R1274
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.
All right, thanks.
@coffeys @valeriepeng, can you take a look? |
Changes look ok to me. |
|
/approval request Backporting JDK-8276660 to fix issue with Provider registration not taking immediate effect. Ran tier1-4 and reproducer of the issue without a problem. Also pulling in followups of JDK-8292739 and JDK-8279222 as to not introduce bugs. This was not clean and required reverting and re-applying JDK-8254711 to get the correct code. |
/integrate |
/sponsor |
Going to push as commit fe1a4a8.
Your commit was automatically rebased without conflicts. |
@Rudometov @lutkerd Pushed as commit fe1a4a8. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Backporting JDK-8276660 which also fixes a bug in SecureRandom registration that was exposed during testing of https://github.com/corretto/amazon-corretto-crypto-provider. Currently, if you register a new provider then
new SecureRandom
doesn't work right away and only after making some other call likeCipher.getInstance()
does it return the ACCP provided SecureRandom.Ran all "java/security/Provider/", "jdk/jfr/event/" and tier1 tests locally on Linux x64 and they passed.
"JDK-8254711: Add java.security.Provider.getService JFR Event" makes changes some of the same functioned but was different in 17u than upstream. To get a cleaner backport I reverted it locally, backported JDK-8276660 and then re-applied 8254711 to get the updated code around the Map changes.
Also backporting the followup fixes:
8292739: Invalid legacy entries may be returned by Provider.getServic…
8279222: Incorrect legacyMap.get in java.security.Provider after JDK-8276660
Progress
Issues
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk17u-dev.git pull/2730/head:pull/2730
$ git checkout pull/2730
Update a local copy of the PR:
$ git checkout pull/2730
$ git pull https://git.openjdk.org/jdk17u-dev.git pull/2730/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 2730
View PR using the GUI difftool:
$ git pr show -t 2730
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk17u-dev/pull/2730.diff
Webrev
Link to Webrev Comment