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

8317360: Missing null checks in JfrCheckpointManager and JfrStringPool initialization routines #16310

Closed
wants to merge 1 commit into from

Conversation

mgronlun
Copy link

@mgronlun mgronlun commented Oct 23, 2023

Greetings,

Adding missing null checks for initialization routines.

Testing: jdk_jfr

Thanks
Markus


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-8317360: Missing null checks in JfrCheckpointManager and JfrStringPool initialization routines (Bug - P3)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 16310

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 23, 2023

👋 Welcome back mgronlun! 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
Copy link

openjdk bot commented Oct 23, 2023

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

  • hotspot-jfr

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-jfr hotspot-jfr-dev@openjdk.org label Oct 23, 2023
Copy link
Member

@shipilev shipilev left a comment

Choose a reason for hiding this comment

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

I guess it is fine, but it is weird to see the abrupt return from the initialize methods that allocate stuff. Isn't this effectively a memory leak when JFR could not initialize for some reason?

@mgronlun
Copy link
Author

mgronlun commented Oct 23, 2023

I guess it is fine, but it is weird to see the abrupt return from the initialize methods that allocate stuff. Isn't this effectively a memory leak when JFR could not initialize for some reason?

All JFR subsystems expose a create() and a destroy(), and some also an initialize(), which are lifecycle controlling entry points for JfrRecorder::create().

If any subsystem returns false as part of the transactional JfrRecorder::create(), every subsystem destroy() is invoked. This is so that starting JFR dynamically would not exit the VM in case of initialization failure.

@mgronlun
Copy link
Author

Thank you, @shipilev and @egahlin for the reivews.

@mgronlun
Copy link
Author

/integrate

@openjdk
Copy link

openjdk bot commented Oct 25, 2023

@mgronlun This pull request has not yet been marked as ready for integration.

@openjdk
Copy link

openjdk bot commented Oct 25, 2023

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

8317360: Missing null checks in JfrCheckpointManager and JfrStringPool initialization routines

Reviewed-by: shade, egahlin

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

  • 9e98ee6: 8318735: RISC-V: Enable related hotspot tests run on riscv
  • 29d462a: 8318727: Enable parallelism in vmTestbase/vm/gc/concurrent tests
  • 43f31d7: 8318607: Enable parallelism in vmTestbase/nsk/stress/jni tests
  • cee44a6: 8318608: Enable parallelism in vmTestbase/nsk/stress/threads tests
  • b026d0b: 8312980: C2: "malformed control flow" created during incremental inlining
  • 3abd772: 8316017: Refactor timeout handler in PassFailJFrame
  • 202c013: 8318669: Target OS detection in 'test-prebuilt' makefile target is incorrect when running on MSYS2
  • c587211: 8316003: Update FileChooserSymLinkTest.java to HTML instructions
  • 42b9ac8: 8294156: Allow PassFailJFrame.Builder to create test UI
  • 14090ef: 8294158: HTML formatting for PassFailJFrame instructions
  • ... and 44 more: https://git.openjdk.org/jdk/compare/99de9bb83ff70fe81c89751516a86a94c8f552be...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 ready Pull request is ready to be integrated rfr Pull request is ready for review labels Oct 25, 2023
@mgronlun
Copy link
Author

/integrate

@openjdk
Copy link

openjdk bot commented Oct 25, 2023

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

  • 9e98ee6: 8318735: RISC-V: Enable related hotspot tests run on riscv
  • 29d462a: 8318727: Enable parallelism in vmTestbase/vm/gc/concurrent tests
  • 43f31d7: 8318607: Enable parallelism in vmTestbase/nsk/stress/jni tests
  • cee44a6: 8318608: Enable parallelism in vmTestbase/nsk/stress/threads tests
  • b026d0b: 8312980: C2: "malformed control flow" created during incremental inlining
  • 3abd772: 8316017: Refactor timeout handler in PassFailJFrame
  • 202c013: 8318669: Target OS detection in 'test-prebuilt' makefile target is incorrect when running on MSYS2
  • c587211: 8316003: Update FileChooserSymLinkTest.java to HTML instructions
  • 42b9ac8: 8294156: Allow PassFailJFrame.Builder to create test UI
  • 14090ef: 8294158: HTML formatting for PassFailJFrame instructions
  • ... and 44 more: https://git.openjdk.org/jdk/compare/99de9bb83ff70fe81c89751516a86a94c8f552be...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Oct 25, 2023

@mgronlun Pushed as commit cf4ede0.

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

@mlbridge
Copy link

mlbridge bot commented Oct 25, 2023

Webrevs

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