Class OsUtils

java.lang.Object
org.elasticsearch.gradle.util.OsUtils

public final class OsUtils extends Object
  • Method Details

    • jdkIsIncompatibleWithOS

      public static boolean jdkIsIncompatibleWithOS(Version version)
      OpenJDK 17 that we ship with for older ES distributions is incompatible with Ubuntu 24.04 and newer due to a change in newer kernel versions that causes JVM crashes.

      See https://github.com/oracle/graal/issues/4831 that exposes a similar issue with GraalVM.

      It can be reproduced using Jshell on Ubuntu 24.04+ with:

       jshell> java.lang.management.ManagementFactory.getOperatingSystemMXBean()
       |  Exception java.lang.NullPointerException: Cannot invoke "jdk.internal.platform.CgroupInfo.getMountPoint()" because "anyController" is null
       

      This method returns true if the given version of the JDK is known to be incompatible