container support not enabled due to required cgroup subsystems not found
Bob Vandette
bob.vandette at oracle.com
Thu Mar 15 12:52:40 UTC 2018
Yes, please send us the contents of /proc/self/mountinfo.
What Linux operating system distro are you running? What kernel version?
You might want to try the JDK 11 Early Access build. It provides a bit more logging for container detection.
You will at least see which subsystem was not located.
http://jdk.java.net/11/
Are you running cgroups version 1 or 2?
Bob.
> On Mar 15, 2018, at 8:27 AM, David Holmes <david.holmes at oracle.com> wrote:
>
> Moving to hotspot-dev
>
> On 15/03/2018 8:51 PM, ashutosh mehra wrote:
>> When I run jdk-10+46 build in a docker container, I don't see MaxHeapSize
>> being adjusted based on container memory limit.
>> Command to run docker container with 2G memory, 2 CPUs:
>> $ docker run -m2g --memory-swap=2g --cpus=2 -it --rm -v
>> /home/ashu/data/builds/openjdk/jdk-10+46:/root/jdk-10 ubuntu:16.04
>> Once inside the container ran the following command:
>> # /root/jdk-10//bin/java -XX:+UnlockDiagnosticVMOptions
>> -XX:+PrintFlagsFinal -version | grep MaxHeapSize
>> Output:
>> size_t MaxHeapSize = 2015363072
>> {product} {ergonomic}
>> openjdk version "10" 2018-03-20
>> OpenJDK Runtime Environment 18.3 (build 10+46)
>> OpenJDK 64-Bit Server VM 18.3 (build 10+46, mixed mode)
>> When I used -Xlog:os+container=trace option, I get following information:
>> # /root/jdk-10//bin/java "-Xlog:os+container=trace" -version
>> [0.001s][trace][os,container] OSContainer::init: Initializing Container
>> Support
>> [0.001s][debug][os,container] Required cgroup subsystems not found
>> openjdk version "10" 2018-03-20
>> OpenJDK Runtime Environment 18.3 (build 10+46)
>> OpenJDK 64-Bit Server VM 18.3 (build 10+46, mixed mode)
>> Following subsystems are present in the docker container:
>> # ls /sys/fs/cgroup/
>> blkio cpu cpuacct cpuacct,cpu cpuset devices freezer hugetlb
>> memory net_cls net_prio net_prio,net_cls perf_event pids systemd
>> As far as I understand, JVM is using only memory, cpu and cpuset subsystems
>> which are present in my system. Not sure why is it reporting "Required
>> cgroup subsystems not found".
>> Any idea what could be wrong here? Are there other debug options to figure
>> out what is going wrong?
>
> What does /proc/self/mountinfo show?
>
> David
>
>> Regards,
>> Ashutosh Mehra
More information about the jdk-dev
mailing list