Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8293540

[Metrics] Incorrectly detected resource limits with additional cgroup fs mounts

XMLWordPrintable

    • b18
    • generic
    • linux

        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)

              sgehwolf Severin Gehwolf
              sgehwolf Severin Gehwolf
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: