Skip to content

Conversation

@yanglong1010
Copy link
Contributor

@yanglong1010 yanglong1010 commented Apr 18, 2022

Hi!

Please review the backport of JDK-8260589 to 8u.
This crash problem is easy to reproduce, so I feel it is necessary to backport it to 8u.

3 months ago, I launched webrev and it has been reviewed by Zhengyu Gu (the review mail link), thanks a lot to Zhengyu and Mario.
Recently, I learned that the review method of 8u was changed to github, so I re-launched it in the new way.

Bug: https://bugs.openjdk.java.net/browse/JDK-8260589
11u commit: openjdk/jdk11u-dev@1d204c5
Test: jdk/test/jdk/jfr/jvm/TestPrimitiveClasses.java passed.

Due to the differences between JFR in 11u and 17, Denghui made some changes when backporting this fix to 11u.
Denghui's changes also apply to 8u, so I directly quote Denghui's list here. (4 in total)

  1. use MaxJfrEventId + 101 instead of LAST_TYPE_ID + 1 as the klass id of void.class
  2. jdk 11 doesn't support jfr streaming, so I removed the call JfrTraceIdEpoch::set_changed_tag_state() in load_primitive
  3. the Class in jdk 11 doesn't have the field 'hidden', so I removed writer->write<bool>(false); in write_primitive
  4. there are many differences in the API of JfrTraceId between 11u and tip

In addition to the above differences, I also make supplementary explanations for the modifications I made.

  1. The static global variable clear_artifacts in 11u was introduced by the bugfix https://bugs.openjdk.java.net/browse/JDK-8231081, but this fix has not been backported to 8u, so I removed the code related to clear_artifacts. In 8u, the metadata of the primitive types will be written into the previous chunk on every chunk rotation.
  2. In 11u, _artifacts and _class_unload are static global variables, but in 8u, they are static member variables of JfrTypeSet, so I also made necessary changes to the functions that use these two variables.

Thanks


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-8260589: Crash in JfrTraceIdLoadBarrier::load(_jclass*)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 36

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

Using diff file

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

@bridgekeeper bridgekeeper bot added the oca Needs verification of OCA signatory status label Apr 18, 2022
@bridgekeeper
Copy link

bridgekeeper bot commented Apr 18, 2022

Hi @yanglong1010, 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 yanglong1010" 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.

@yanglong1010
Copy link
Contributor Author

/covered

@bridgekeeper bridgekeeper bot added the oca-verify Needs verification of OCA signatory status label Apr 18, 2022
@bridgekeeper
Copy link

bridgekeeper bot commented Apr 18, 2022

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!

@bridgekeeper bridgekeeper bot removed oca Needs verification of OCA signatory status oca-verify Needs verification of OCA signatory status labels Apr 27, 2022
@openjdk openjdk bot added the rfr Pull request is ready for review label Apr 27, 2022
@mlbridge
Copy link

mlbridge bot commented Apr 27, 2022

Webrevs

Copy link
Contributor

@zhengyu123 zhengyu123 left a comment

Choose a reason for hiding this comment

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

LGTM

@openjdk
Copy link

openjdk bot commented May 12, 2022

⚠️ @yanglong1010 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 jfr-8260589-backport
$ git commit --author='Preferred Full Name <you@example.com>' --allow-empty -m 'Update full name'
$ git push

@openjdk
Copy link

openjdk bot commented May 12, 2022

@yanglong1010 This change now passes all automated pre-integration checks.

After integration, the commit message for the final commit will be:

8260589: Crash in JfrTraceIdLoadBarrier::load(_jclass*)

Reviewed-by: zgu

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

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 (@zhengyu123) but any other Committer may sponsor as well.

➡️ 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 the ready Pull request is ready to be integrated label May 12, 2022
@yanglong1010
Copy link
Contributor Author

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label May 13, 2022
@openjdk
Copy link

openjdk bot commented May 13, 2022

@yanglong1010
Your change (at version 1ca0c4a) is now ready to be sponsored by a Committer.

@jerboaa
Copy link
Contributor

jerboaa commented May 24, 2022

Please use Backport a9d2267f8d306522522c999ff584ccaa34c46456 as the PR title so this gets properly recognized as a backport.

@yanglong1010 yanglong1010 changed the title 8260589: Crash in JfrTraceIdLoadBarrier::load(_jclass*) Backport a9d2267f8d306522522c999ff584ccaa34c46456 May 30, 2022
@openjdk openjdk bot changed the title Backport a9d2267f8d306522522c999ff584ccaa34c46456 8260589: Crash in JfrTraceIdLoadBarrier::load(_jclass*) May 30, 2022
@openjdk
Copy link

openjdk bot commented May 30, 2022

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

@openjdk openjdk bot added the backport Port of a pull request already in a different code base label May 30, 2022
Reviewed-by: Zhengyu Gu
Backport-of: a9d2267f8d306522522c999ff584ccaa34c46456
@yanglong1010 yanglong1010 changed the title 8260589: Crash in JfrTraceIdLoadBarrier::load(_jclass*) Backport a9d2267f8d306522522c999ff584ccaa34c46456 May 30, 2022
@openjdk openjdk bot removed the sponsor Pull request is ready to be sponsored label May 30, 2022
@openjdk openjdk bot changed the title Backport a9d2267f8d306522522c999ff584ccaa34c46456 8260589: Crash in JfrTraceIdLoadBarrier::load(_jclass*) May 30, 2022
@openjdk
Copy link

openjdk bot commented May 30, 2022

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

@bridgekeeper
Copy link

bridgekeeper bot commented Jun 27, 2022

@yanglong1010 This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@jerboaa
Copy link
Contributor

jerboaa commented Jun 27, 2022

/sponsor

@openjdk
Copy link

openjdk bot commented Jun 27, 2022

@jerboaa The PR has been updated since the change author (@yanglong1010) issued the integrate command - the author must perform this command again.

@yanglong1010
Copy link
Contributor Author

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Jun 27, 2022
@openjdk
Copy link

openjdk bot commented Jun 27, 2022

@yanglong1010
Your change (at version 8a41ed2) is now ready to be sponsored by a Committer.

@D-D-H
Copy link
Contributor

D-D-H commented Jun 27, 2022

/sponsor

@openjdk
Copy link

openjdk bot commented Jun 27, 2022

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

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Jun 27, 2022
@openjdk openjdk bot closed this Jun 27, 2022
@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 Jun 27, 2022
@openjdk
Copy link

openjdk bot commented Jun 27, 2022

@D-D-H @yanglong1010 Pushed as commit cf6b628.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Port of a pull request already in a different code base integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

4 participants