Bug-Debian: https://bugs.debian.org/
1108294
This reverts commit
af000ce85293b8e608f696f0c6c280bc3a75887f.
Starting in version 11, OpenJDK supports both cgroups v1 and v2 APIs,
but relies on /proc/groups (part of the v1 API) to detect which
controllers are enabled. The VM detects and adjusts its behaviour for
cgroups cpuset and memory limits. The GC will be configured to
collect before hitting the memory limit. I think the cpuset limit is
used to decide how many threads to create in some places.
If it does not detect such limits, it may defer GC so long that it
triggers OOM despite not needing all the allocated memory, or may
create too many threads that use the available CPU resources
inefficiently.
The upstream change restricts /proc/cgroups to only show controllers
that support the v1 API. We have disabled CONFIG_CPUSETS_V1 and
CONFIG_MEMCG_V1 per upstream default, so these controllers do not
support the v1 API and OpenJDK fails to detect them entirely. This
easily results in triggering OOM when running in a container.
OpenJDK 25 (at least the HotSpot VM) has been fixed to detect the
cgroups v2 API without depending on /proc/cgroups, but we also ship
older versions in trixie and bookworm, and this primarily affects
containers which may include OpenJDK from an older release or non-
Debian source.
Revert the upstream change for compatibility with older versions of
OpenJDK.
Gbp-Pq: Topic debian
Gbp-Pq: Name revert-cgroup-do-not-report-unavailable-v1-controlle.patch