[11u] RFR: 8257746: Regression introduced with JDK-8250984 - memory might be null in some machines

Severin Gehwolf sgehwolf at redhat.com
Wed Feb 24 17:30:09 UTC 2021


Hi,

Please review this backport which adds necessary null checks before
actually using the memory controller which might be null in some cases.
JDK-8250984 introduced this regression and has been backported to
11.0.10. There have been reports where an NPE happens. For example on
an old SLES 11 system (cgroups v1) which only has the cpu controller
mounted and a jtreg test is attempted to be run. jtreg itselfs as some
initialization logic that uses OperatingSystemMXBean which has been
made container aware via JDK-8226575.

The JDK head patch doesn't apply since it has cgroups v2 support. It's
a rather simple rewrite though.

Bug: https://bugs.openjdk.java.net/browse/JDK-8257746
webrev: https://cr.openjdk.java.net/~sgehwolf/webrevs/JDK-8257746/jdk11/01/webrev/

Testing:
Container tests on Linux (cgroups v1). Mattias Baesken reports that on
a system which reproduces the issue it's fixed with the proposed patch.

Thoughts?

Thanks,
Severin



More information about the jdk-updates-dev mailing list