Uploaded image for project: 'Red Hat build of Keycloak'
  1. Red Hat build of Keycloak
  2. RHBK-2986

Keycloak container incorrectly read CGroups settings on Kernel 6.12 [GHI#36609]

XMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • False

      Before reporting an issue

      [x] I have read and understood the above terms for submitting issues, and I understand that my issue may be closed without action if I do not follow them.

      Area

      dist/quarkus

      Describe the bug

      Main tracking issue: https://github.com/defenseunicorns/uds-core/issues/1212

      When using Fedora F41 (kernel 6.12 line), Keycloak Pod get OOM Killed. The root cause can clearly be seen when manually calling the following command from the Keycloak Pod:

      Kernel 6.11 (Good):

      sh-5.1$ java -XshowSettings:vm -version
      

      Max. Heap Size (Estimated): 247.50M <-- !!!

      ...
      

      Provider: cgroupv2
      Effective CPU Count: 1 <-- !!!

      
      

      Kernel 6.12 (Bad):

      sh-5.1$ java -XshowSettings:vm -version
      ...
      

      Max. Heap Size (Estimated): 7.67G <-- !!! This is the Node value!

      ...
      

      Provider: cgroupv2
      Effective CPU Count: 16 <-- !!! Again, taken from the Node!

      
      

      The issue has already been reported in JDK-8346874 that follows to the actual fix - JDK-8347129. At the time of writing, this has been fixed only in the latest JVM versions with no information about the backports

      Version

      26.0.8

      Regression

      [ ] The issue is a regression

      Expected behavior

      Memory should be properly interpreted

      Actual behavior

      Memory is being pulled from the Node running the container

      How to Reproduce?

      Deploy Keycloak on Fedora F41 (any Kubernetes distribution that doesn't use Virtual Machines, for example k3d) with Kernel 6.12 onwards

      Anything else?

      No response

              Unassigned Unassigned
              pvlha Pavel Vlha
              Keycloak Cloud Native
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: