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

8287073: NPE from CgroupV2Subsystem.getInstance() #324

Closed
wants to merge 1 commit into from

Conversation

jerboaa
Copy link
Contributor

@jerboaa jerboaa commented May 26, 2023

Simple low-risk backport avoiding a potential NPE on some cgroups v2 systems. Patch applies clean after path unshuffeling.

Testing:


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8287073: NPE from CgroupV2Subsystem.getInstance() (Bug - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 324

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented May 26, 2023

👋 Welcome back sgehwolf! 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 changed the title Backport 744b822ab194a0f7ef4e7a4053be32c6a0889efc 8287073: NPE from CgroupV2Subsystem.getInstance() May 26, 2023
@openjdk
Copy link

openjdk bot commented May 26, 2023

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

@openjdk openjdk bot added backport rfr Pull request is ready for review labels May 26, 2023
@mlbridge
Copy link

mlbridge bot commented May 26, 2023

Webrevs

@jerboaa
Copy link
Contributor Author

jerboaa commented May 26, 2023

Marking as clean as only the file path has changed to 11u.

/clean

@openjdk openjdk bot added the clean label May 26, 2023
@openjdk
Copy link

openjdk bot commented May 26, 2023

@jerboaa This backport pull request is now marked as clean

@openjdk
Copy link

openjdk bot commented May 26, 2023

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

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

8287073: NPE from CgroupV2Subsystem.getInstance()

Reviewed-by: andrew

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 21 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.

➡️ 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 May 26, 2023
@bridgekeeper
Copy link

bridgekeeper bot commented Jul 13, 2023

@jerboaa 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 Author

jerboaa commented Jul 14, 2023

Please keep open.

Copy link
Member

@gnu-andrew gnu-andrew left a comment

Choose a reason for hiding this comment

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

Backport verified clean and approved for 8u.

A question on the general patch out of interest; do we know that infos.values().iterator().next() will return non-null or is it just a lot less likely? I see that Objects.requireNonNull is still going to throw an NPE if it is null, which will at least catch this earlier than the current code.

@jerboaa
Copy link
Contributor Author

jerboaa commented Aug 11, 2023

Backport verified clean and approved for 8u.

Thanks!

A question on the general patch out of interest; do we know that infos.values().iterator().next() will return non-null or is it just a lot less likely?

At the point when we pick a controller we already know that at least one of them is available, but we don't know which. Previously we hard-coded to memory, which isn't true when only a cpu controller is in effect. To answer your question, I'm pretty sure we cannot see any null values using infos.values().iterator().next() (or it's a bug, which we've yet to see).

HTH.

@jerboaa
Copy link
Contributor Author

jerboaa commented Aug 11, 2023

/integrate

@openjdk
Copy link

openjdk bot commented Aug 11, 2023

Going to push as commit 949d8e7.
Since your change was applied there have been 22 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 Aug 11, 2023
@openjdk openjdk bot closed this Aug 11, 2023
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Aug 11, 2023
@openjdk
Copy link

openjdk bot commented Aug 11, 2023

@jerboaa Pushed as commit 949d8e7.

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

@gnu-andrew
Copy link
Member

A question on the general patch out of interest; do we know that infos.values().iterator().next() will return non-null or is it just a lot less likely?

At the point when we pick a controller we already know that at least one of them is available, but we don't know which. Previously we hard-coded to memory, which isn't true when only a cpu controller is in effect. To answer your question, I'm pretty sure we cannot see any null values using infos.values().iterator().next() (or it's a bug, which we've yet to see).

HTH.

It does, thanks.

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.

2 participants