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

[cgroups v2] Soft memory limit incorrectly using memory.high

    XMLWordPrintable

Details

    • b18
    • generic
    • linux

    Backports

      Description

        As per [1] and [2] the crun OCI runtime supporting cgroups v2 maps --memory-reservation to memory.low. The OpenJDK code still uses memory.high which was a bug in crun fixed in crun 0.11 and better:

        $ grep -rn memory\.high src/hotspot/os/linux/
        src/hotspot/os/linux/cgroupV2Subsystem_linux.cpp:152: GET_CONTAINER_INFO_CPTR(cptr, _unified, "/memory.high",
        $ grep -rn memory\.high src/java.base/linux/classes/jdk/internal/platform/
        src/java.base/linux/classes/jdk/internal/platform/cgroupv2/CgroupV2Subsystem.java:290: String softLimitStr = CgroupSubsystemController.getStringValue(unified, "memory.high");

        This manifests in failing container tests on systems supporting cgroup v2 and having the fixed crun runtime, like Fedora 32.

        [1] https://bugzilla.redhat.com/show_bug.cgi?id=1880452
        [2] https://github.com/containers/crun/blob/master/crun.1.md#cgroup-v2

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                  Created:
                  Updated:
                  Resolved: