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

8261404: Class.getReflectionFactory() is not thread-safe #2153

Closed
wants to merge 2 commits into from

Conversation

Delawen
Copy link
Contributor

@Delawen Delawen commented Jan 22, 2024

This is my first contribution. I am backporting https://bugs.openjdk.org/browse/JDK-8261404

Tier1 tests are passing on my computer, with the exception of one that was failing before trying to apply the changes:

Finished running test 'jtreg:test/lib-test:tier1'
Test report is stored in build/linux-x86_64-server-release/test-results/jtreg_test_lib_test_tier1

==============================
Test summary
==============================
   TEST                                              TOTAL  PASS  FAIL ERROR   
   jtreg:test/hotspot/jtreg:tier1                     1957  1957     0     0   
>> jtreg:test/jdk:tier1                               2094  2093     1     0 <<
   jtreg:test/langtools:tier1                         4238  4238     0     0   
   jtreg:test/jaxp:tier1                                 0     0     0     0   
   jtreg:test/lib-test:tier1                            27    27     0     0   
==============================
TEST FAILURE


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • JDK-8261404 needs maintainer approval

Issue

  • JDK-8261404: Class.getReflectionFactory() is not thread-safe (Bug - P4 - Approved)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk17u-dev.git pull/2153/head:pull/2153
$ git checkout pull/2153

Update a local copy of the PR:
$ git checkout pull/2153
$ git pull https://git.openjdk.org/jdk17u-dev.git pull/2153/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 2153

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk17u-dev/pull/2153.diff

Webrev

Link to Webrev Comment

@bridgekeeper bridgekeeper bot added the oca Needs verification of OCA signatory status label Jan 22, 2024
@bridgekeeper
Copy link

bridgekeeper bot commented Jan 22, 2024

Hi @Delawen, welcome to this OpenJDK project and thanks for contributing!

We do not recognize you as Contributor and need to ensure you have signed the Oracle Contributor Agreement (OCA). If you have not signed the OCA, please follow the instructions. Please fill in your GitHub username in the "Username" field of the application. Once you have signed the OCA, please let us know by writing /signed in a comment in this pull request.

If you already are an OpenJDK Author, Committer or Reviewer, please click here to open a new issue so that we can record that fact. Please use "Add GitHub user Delawen" as summary for the issue.

If you are contributing this work on behalf of your employer and your employer has signed the OCA, please let us know by writing /covered in a comment in this pull request.

@Delawen
Copy link
Contributor Author

Delawen commented Jan 22, 2024

/covered

@bridgekeeper bridgekeeper bot added the oca-verify Needs verification of OCA signatory status label Jan 22, 2024
@bridgekeeper
Copy link

bridgekeeper bot commented Jan 22, 2024

Thank you! Please allow for a few business days to verify that your employer has signed the OCA. Also, please note that pull requests that are pending an OCA check will not usually be evaluated, so your patience is appreciated!

@openjdk openjdk bot changed the title Backport 905b7639424a0fa80f81f734f6fdae1b5018a14a 8261404: Class.getReflectionFactory() is not thread-safe Jan 22, 2024
@openjdk
Copy link

openjdk bot commented Jan 22, 2024

This backport pull request has now been updated with issue from the original commit.

@bridgekeeper bridgekeeper bot removed oca Needs verification of OCA signatory status oca-verify Needs verification of OCA signatory status labels Jan 25, 2024
@openjdk
Copy link

openjdk bot commented Jan 25, 2024

⚠️ @Delawen This change is now ready for you to apply for maintainer approval. This can be done directly in each associated issue or by using the /approval command.

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

mlbridge bot commented Jan 25, 2024

Webrevs

@jerboaa
Copy link
Contributor

jerboaa commented Jan 25, 2024

@Delawen Please enable GHA testing on your fork and trigger a manual run (next time it should trigger automatically when you push to your branch). That also runs tier1.

@Delawen
Copy link
Contributor Author

Delawen commented Jan 26, 2024

@jerboaa all checks have passed!

@jerboaa
Copy link
Contributor

jerboaa commented Jan 26, 2024

Excellent! Please apply for approval as per instructions in #2153 (comment)

@Delawen
Copy link
Contributor Author

Delawen commented Jan 26, 2024

/approval JDK-8261404 request Backport commit 905b7639424a0fa80f81f734f6fdae1b5018a14a

@openjdk
Copy link

openjdk bot commented Jan 26, 2024

@Delawen
JDK-8261404: The approval request has been created successfully.

@openjdk openjdk bot added the approval label Jan 26, 2024
@jerboaa
Copy link
Contributor

jerboaa commented Jan 26, 2024

/approval JDK-8261404 request Backport commit 905b7639424a0fa80f81f734f6fdae1b5018a14a

Hmm, that doesn't seem right. Please read:
https://openjdk.org/projects/jdk-updates/approval.html ("Rule 1") related to "Fix Request" comment.

@Delawen
Copy link
Contributor Author

Delawen commented Jan 26, 2024

Ah, I understood this is not a fix but a backport. But it is both somehow :D Let me improve the text.

@Delawen
Copy link
Contributor Author

Delawen commented Jan 26, 2024

/approval JDK-8261404 request Fix Request
The private method java.lang.Class.getReflectionFactory() appears to not be thread-safe. This commit fixes that.
This fix is a backport. I am applying the same fix that was done for version 19.

@openjdk
Copy link

openjdk bot commented Jan 26, 2024

@Delawen
JDK-8261404: The approval request has been updated successfully.

@GoeLin
Copy link
Member

GoeLin commented Jan 29, 2024

Hi,
welcome to the updates project and thanks for the detailed fix request comment.
You need a fix request comment and an approval for all pushes to update releases.
I.e. for fixes that only apply to the release as well as for backports.

@openjdk
Copy link

openjdk bot commented Jan 29, 2024

⚠️ @Delawen the full name on your profile does not match the author name in this pull requests' HEAD commit. If this pull request gets integrated then the author name from this pull requests' HEAD commit will be used for the resulting commit. If you wish to push a new commit with a different author name, then please run the following commands in a local repository of your personal fork:

$ git checkout my-backport-JDK-8261404
$ git commit --author='Preferred Full Name <you@example.com>' --allow-empty -m 'Update full name'
$ git push

@openjdk
Copy link

openjdk bot commented Jan 29, 2024

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

8261404: Class.getReflectionFactory() is not thread-safe

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

  • 3432698: 8324280: RISC-V: Incorrect implementation in VM_Version::parse_satp_mode
  • 184fac8: 8316304: (fs) Add support for BasicFileAttributes.creationTime() for Linux
  • 9926d7c: 8324659: GHA: Generic jtreg errors are not reported
  • 6d8febb: 8309870: Using -proc:full should be considered requesting explicit annotation processing
  • 8fffc07: 8315761: Open source few swing JList and JMenuBar tests
  • f248ea8: 8318608: Enable parallelism in vmTestbase/nsk/stress/threads tests
  • 86df8c2: 8296631: NSS tests failing on OL9 linux-aarch64 hosts
  • 3be0729: 8316947: Write a test to check textArea triggers MouseEntered/MouseExited events properly
  • 8e50363: 8210410: Refactor java.util.Currency:i18n shell tests to plain java tests
  • 3fa8488: 8313575: Refactor PKCS11Test tests
  • ... and 19 more: https://git.openjdk.org/jdk17u-dev/compare/a6135d783d49dc8047375f62bd969b0874a21891...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.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added ready Pull request is ready to be integrated and removed approval labels Jan 29, 2024
@Delawen
Copy link
Contributor Author

Delawen commented Jan 29, 2024

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Jan 29, 2024
@openjdk
Copy link

openjdk bot commented Jan 29, 2024

@Delawen
Your change (at version ff2ab1e) is now ready to be sponsored by a Committer.

@jerboaa
Copy link
Contributor

jerboaa commented Jan 29, 2024

/sponsor

@openjdk
Copy link

openjdk bot commented Jan 29, 2024

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

  • 3432698: 8324280: RISC-V: Incorrect implementation in VM_Version::parse_satp_mode
  • 184fac8: 8316304: (fs) Add support for BasicFileAttributes.creationTime() for Linux
  • 9926d7c: 8324659: GHA: Generic jtreg errors are not reported
  • 6d8febb: 8309870: Using -proc:full should be considered requesting explicit annotation processing
  • 8fffc07: 8315761: Open source few swing JList and JMenuBar tests
  • f248ea8: 8318608: Enable parallelism in vmTestbase/nsk/stress/threads tests
  • 86df8c2: 8296631: NSS tests failing on OL9 linux-aarch64 hosts
  • 3be0729: 8316947: Write a test to check textArea triggers MouseEntered/MouseExited events properly
  • 8e50363: 8210410: Refactor java.util.Currency:i18n shell tests to plain java tests
  • 3fa8488: 8313575: Refactor PKCS11Test tests
  • ... and 19 more: https://git.openjdk.org/jdk17u-dev/compare/a6135d783d49dc8047375f62bd969b0874a21891...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Jan 29, 2024

@jerboaa @Delawen Pushed as commit d7c67fc.

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

@Delawen Delawen deleted the my-backport-JDK-8261404 branch March 11, 2024 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport clean integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

3 participants