[jdk8u-dev] RFR: 8287073: NPE from CgroupV2Subsystem.getInstance()

Severin Gehwolf sgehwolf at openjdk.org
Fri Aug 11 09:19:58 UTC 2023


On Fri, 11 Aug 2023 03:05:31 GMT, Andrew John Hughes <andrew at openjdk.org> wrote:

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

-------------

PR Comment: https://git.openjdk.org/jdk8u-dev/pull/324#issuecomment-1674415762


More information about the jdk8u-dev mailing list