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

6383195: javax.crypto.spec.PBEKeySpec is not thread safe #9668

Closed
wants to merge 3 commits into from

Conversation

bradfordwetmore
Copy link
Contributor

@bradfordwetmore bradfordwetmore commented Jul 27, 2022

Simple fix to a long-standing threading bug to help clear the bug backlog.

Without the synchronized, the test case fails almost immediately.

Running JPRT with tier1/tier2.


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-6383195: javax.crypto.spec.PBEKeySpec is not thread safe

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/9668/head:pull/9668
$ git checkout pull/9668

Update a local copy of the PR:
$ git checkout pull/9668
$ git pull https://git.openjdk.org/jdk pull/9668/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 9668

View PR using the GUI difftool:
$ git pr show -t 9668

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/9668.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Jul 27, 2022

👋 Welcome back wetmore! 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 Jul 27, 2022
@openjdk
Copy link

openjdk bot commented Jul 27, 2022

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

  • security

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 security security-dev@openjdk.org label Jul 27, 2022
@mlbridge
Copy link

mlbridge bot commented Jul 28, 2022

Webrevs

Copy link
Contributor

@wangweij wangweij left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

BTW, how often can you observe a test failure before the code change?

@openjdk
Copy link

openjdk bot commented Jul 28, 2022

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

6383195: javax.crypto.spec.PBEKeySpec is not thread safe

Reviewed-by: weijun

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 13 new commits pushed to the master branch:

  • e052d7f: 8288477: nmethod header size reduction
  • 54a2c5a: 8290059: Do not use std::thread in panama tests
  • 5214a17: 8291479: ProblemList compiler/rangechecks/TestRangeCheckHoistingScaledIV.java on ppc64le
  • 471a427: 8287794: Reverse*VNode::Identity problem
  • 5d1ad39: 8290839: jdk/jfr/event/compiler/TestJitRestart.java failed with "RuntimeException: No JIT restart event found: expected true, was false"
  • 97fc8de: 8291106: ZPlatformGranuleSizeShift is redundant
  • dd69a68: 8291000: C2: Purge LoadPLocked and Store*Conditional nodes
  • 07f0612: 8290532: Adjust PKCS11Exception and handle more PKCS11 error codes
  • 93f96d8: 8290399: [macos] Aqua LAF does not fire an action event if combo box menu is displayed
  • 5d82d67: 8290034: Auto vectorize reverse bit operations.
  • ... and 3 more: https://git.openjdk.org/jdk/compare/c1a3347f1731d96621f0769363c10e76156cdf19...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 Jul 28, 2022
@bradfordwetmore
Copy link
Contributor Author

bradfordwetmore commented Jul 28, 2022

BTW, how often can you observe a test failure before the code change?

Usually 1-3 times through the loop.

Testing: 
...
java.lang.RuntimeException: Inconsistent Password: 
	at PBEKeySpecRacing.lambda$main$0(PBEKeySpecRacing.java:61)
	at java.base/java.lang.Thread.run(Thread.java:1589)

I have one more tweak to make, will come back to this soon.

@bradfordwetmore
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented Jul 28, 2022

Going to push as commit 791fc57.
Since your change was applied there have been 13 commits pushed to the master branch:

  • e052d7f: 8288477: nmethod header size reduction
  • 54a2c5a: 8290059: Do not use std::thread in panama tests
  • 5214a17: 8291479: ProblemList compiler/rangechecks/TestRangeCheckHoistingScaledIV.java on ppc64le
  • 471a427: 8287794: Reverse*VNode::Identity problem
  • 5d1ad39: 8290839: jdk/jfr/event/compiler/TestJitRestart.java failed with "RuntimeException: No JIT restart event found: expected true, was false"
  • 97fc8de: 8291106: ZPlatformGranuleSizeShift is redundant
  • dd69a68: 8291000: C2: Purge LoadPLocked and Store*Conditional nodes
  • 07f0612: 8290532: Adjust PKCS11Exception and handle more PKCS11 error codes
  • 93f96d8: 8290399: [macos] Aqua LAF does not fire an action event if combo box menu is displayed
  • 5d82d67: 8290034: Auto vectorize reverse bit operations.
  • ... and 3 more: https://git.openjdk.org/jdk/compare/c1a3347f1731d96621f0769363c10e76156cdf19...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Jul 28, 2022

@bradfordwetmore Pushed as commit 791fc57.

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

@bradfordwetmore bradfordwetmore deleted the JDK-6383195 branch March 6, 2025 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integrated Pull request has been integrated security security-dev@openjdk.org
Development

Successfully merging this pull request may close these issues.

2 participants