Similar to JDK-8293472, but for the Java serviceability code.
The Java code triggers an assertion if turned on:
$ sudo podman run --rm -ti --memory=300M --memory-swap=300M -v /sys/fs/cgroup:/cgroup-in:ro -v $(pwd)/build/linux-x86_64-server-fastdebug/images/jdk/:/opt/jdk:z fedora:36 /opt/jdk/bin/java -esa -ea -XshowSettings:system -version
Exception in thread "main" java.lang.AssertionError
at java.base/jdk.internal.platform.CgroupSubsystemFactory.amendCgroupInfos(CgroupSubsystemFactory.java:324)
at java.base/jdk.internal.platform.CgroupSubsystemFactory.determineType(CgroupSubsystemFactory.java:186)
at java.base/jdk.internal.platform.CgroupSubsystemFactory.create(CgroupSubsystemFactory.java:85)
at java.base/jdk.internal.platform.CgroupMetrics.getInstance(CgroupMetrics.java:183)
at java.base/jdk.internal.platform.SystemMetrics.instance(SystemMetrics.java:29)
at java.base/jdk.internal.platform.Metrics.systemMetrics(Metrics.java:58)
at java.base/jdk.internal.platform.Container.metrics(Container.java:43)
at java.base/sun.launcher.LauncherHelper.printSystemMetrics(LauncherHelper.java:317)
at java.base/sun.launcher.LauncherHelper.showSettings(LauncherHelper.java:172)