Installation fails on Ubuntu 24.04 + kernel 6.14 - JVM cgroup v2 compatibility issue
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- docker, java, kubernetes, linux
- Domain
- cloud, devops, distributed-systems, infrastructure
Research direction
Locate the Docker images and installation entry points used for the Kafka and Controller pods, then inspect their bundled JVM versions. Reproduce the failure on Ubuntu 24.04 with cgroup v2 and verify that the chosen image changes allow installation to finish with controller-0 and the other pods healthy.
Written by the indexing model from the issue text.
Description
Ⅰ. Issue Description
OpenServerless installation fails on Ubuntu 24.04 with kernel 6.14 due to JVM cgroup v2 compatibility issue. Kafka and Controller pods crash with NullPointerException in CgroupV2Subsystem.getInstance.
Ⅱ. Describe what happened
Kafka pod crashes immediately on startup with the following exception:
Exception in thread "main" java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndStartAgent(Unknown Source)
at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndCallPremain(Unknown Source)
Caused by: java.lang.NullPointerException
at java.base/jdk.internal.platform.cgroupv2.CgroupV2Subsystem.getInstance(Unknown Source)
at java.base/jdk.internal.platform.CgroupSubsystemFactory.create(Unknown Source)
at java.base/jdk.internal.platform.CgroupMetrics.getInstance(Unknown Source)
at java.base/jdk.internal.platform.SystemMetrics.instance(Unknown Source)
at java.base/jdk.internal.platform.Metrics.systemMetrics(Unknown Source)
at java.base/jdk.internal.platform.Container.metrics(Unknown Source)
at jdk.management/com.sun.management.internal.OperatingSystemImpl.<init>(Unknown Source)
at jdk.management/com.sun.management.internal.PlatformMBeanProviderImpl.getOperatingSystemMXBean(Unknown Source)
at jdk.management/com.sun.management.internal.PlatformMBeanProviderImpl$3.nameToMBeanMap(Unknown Source)
at java.management/sun.management.spi.PlatformMBeanProvider$PlatformComponent.getMBeans(Unknown Source)
at java.management/java.lang.management.ManagementFactory.getPlatformMXBean(Unknown Source)
at java.management/java.lang.management.ManagementFactory.getOperatingSystemMXBean(Unknown Source)
at io.prometheus.jmx.shaded.io.prometheus.client.hotspot.StandardExports.<init>(StandardExports.java:43)
at io.prometheus.jmx.shaded.io.prometheus.client.hotspot.DefaultExports.register(DefaultExports.java:37)
at io.prometheus.jmx.shaded.io.prometheus.client.hotspot.DefaultExports.initialize(DefaultExports.java:28)
at io.prometheus.jmx.JavaAgent.premain(JavaAgent.java:30)
... 6 more
*** java.lang.instrument ASSERTION FAILED ***: "result" with message agent load/premain call failed at src/java.instrument/share/native/libinstrument/JPLISAgent.c line: 422
FATAL ERROR in native method: processing of -javaagent failed, processJavaStart failed
The Controller pod never starts - installation hangs indefinitely waiting for pod/controller-0 to become available.
Ⅲ. Describe what you expected to happen
Installation should complete successfully with all pods running and healthy, allowing user creation and login.
Ⅳ. How to reproduce it (as minimally and precisely as possible)
- Install Ubuntu 24.04 on hardware with NVIDIA kernel 6.14
- Configure ops with minimal settings
- Run installation
- Installation fails with timeout waiting for controller-0
Ⅴ. Anything else we need to know?
Root Cause Analysis:
This is a known issue with JVM versions prior to JDK 21 running on Linux kernel 6.12+ with cgroup v2. The problem occurs because:
- Ubuntu 24.04 uses kernel 6.x + systemd 256+ which enforces cgroup v2
- The memory cgroup controller is missing from
/proc/cgroups:
$ cat /proc/cgroups
#subsys_name hierarchy num_cgroups enabled
cpu 0 860 1
cpuacct 0 860 1
blkio 0 860 1
devices 0 860 1
freezer 0 860 1
net_cls 0 860 1
perf_event 0 860 1
net_prio 0 860 1
hugetlb 0 860 1
pids 0 860 1
rdma 0 860 1
misc 0 860 1
dmem 0 860 1
Note: No "memory" controller present
3. JVM's CgroupV2Subsystem.getInstance() expects the memory controller and crashes with NPE when it's missing
Temporary Workaround:
Force cgroup v1 by adding kernel boot parameter:
# In /etc/default/grub:
GRUB_CMDLINE_LINUX="systemd.unified_cgroup_hierarchy=0"
# Then: sudo update-grub && sudo reboot
Permanent Solution:
Update Docker images to use JDK 21+ or apply JVM patches for cgroup v2 compatibility. Similar issues have been fixed in:
- Elasticsearch 7.17.26+
- OpenJDK bug tracker: https://bugs.openjdk.org/browse/JDK-8287107
Ⅵ. Environment:
- K8S Runtime and version: k3s (installed by ops)
- OPS CLI version: 0.1.0-2409121919.dev
- OS: Ubuntu 24.04 LTS
- Kernel: 6.14.0-1015-nvidia
- Hardware: Dell Pro Max GB10 (NVIDIA GB10 Grace CPU + Blackwell GPU)
- Java version on host: OpenJDK 1.8.0_472
- Cgroup version: v2 (enforced by kernel 6.14)
- Dominant language
- Python
- Stars
- 576
- Forks
- 29
- Avg merge
- 51m
- Merged PRs (30d)
- 14
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/openserverless
-
help wanted
Difficulty 3/5 1-2 days Newbie friendliness 45/100
apache/openserverless#252 ·
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 25/100
apache/openserverless#215 ·
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 58/100
apache/openserverless#214 ·
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 72/100
apache/openserverless#213 ·
-
help wanted
Difficulty 5/5 Over a week Newbie friendliness 15/100
apache/openserverless#195 ·
All issues in apache/openserverless
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
canonical/paas-charm#368 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
tech debt
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
StevenBlack/hosts#3256 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
qualcomm/qai-appbuilder#275 ·