You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
/sys/fs/cgroup/memory/memory.limit_in_bytes is missing in the container in version > 4.2.0 #6118
I have tried with the latest version of Docker Desktop
I have tried disabling enabled experimental features
But the same is working in version 4.2.0
Expected behavior
This file needs to be present inside the container which denotes the total available memory for the container. In this case, I had set the limits to 500mb
File name - /sys/fs/cgroup/memory/memory.limit_in_bytes is missing
File contents - 524288000
Actual behavior
In versions above 4.2.0, the directory, "/sys/fs/cgroup/memory" is missing in the containers. So, runtimes like java is not able use the container aware logics which relies on this.
Information
Is it reproducible? Yes
Is the problem new? Yes
Did the problem appear with an update? Yes. post 4.2.0
macOS Version:
Intel chip or Apple chip: Intel
Docker Desktop Version: > 4.2.0
Steps to reproduce the behavior
Download and install the latest docker for mac version which is greater than 4.2.0
docker run -it --rm ubuntu bash
cat /sys/fs/cgroup/memory/memory.limit_in_bytes
Step 3 should show the memory allocated to docker for mac as no limits were set. But the file is missing
@gtskaushik@zhangs-ibm Thanks for the ticket. Recent versions of Docker Desktop switched to cgroupv2 by default. From the linked ticket ibmruntimes/ci.docker#124 it looks like some Java runtime versions only support cgroupv1.
I think the options are:
update the Java runtime to a version which supports cgroupv2
Note that some future Docker Desktop features might not work in cgroupv1 mode: this is because new features for the Linux kernel are only being added to cgroupv2. If you use cgroupv1 mode, I recommend asking your Java vendor to add support for cgroupv2.
Reacted by Tamil Selva Kaushik G and Shuo Zhang (Joshua)
@gtskaushik thanks for the update. We're hoping to release an official build next week. In the official build the field is renamed to deprecatedCgroupv1 but I'll mention this in the release notes and update the various tickets.
Issues go stale after 90 days of inactivity.
Mark the issue as fresh with /remove-lifecycle stale comment.
Stale issues will be closed after an additional 30 days of inactivity.
Prevent issues from auto-closing with an /lifecycle frozen comment.
If this issue is safe to close now please do so.
Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle stale
Activity
zhangs-ibm commentedon Jan 4, 2022
Got exactly the same issue at docker desktop 4.3.2, docker server version info:
This issue break Open J9 feature
-XX:[+|-]UseContainerSupportimmediately: https://www.eclipse.org/openj9/docs/xxusecontainersupport/djs55 commentedon Jan 6, 2022
@gtskaushik @zhangs-ibm Thanks for the ticket. Recent versions of Docker Desktop switched to cgroupv2 by default. From the linked ticket ibmruntimes/ci.docker#124 it looks like some Java runtime versions only support cgroupv1.
I think the options are:
Note that some future Docker Desktop features might not work in cgroupv1 mode: this is because new features for the Linux kernel are only being added to cgroupv2. If you use cgroupv1 mode, I recommend asking your Java vendor to add support for cgroupv2.
gtskaushik commentedon Jan 6, 2022
Thanks @djs55
Looks like only from Java 15, the cgroup v2 detection is possible.
https://bugs.openjdk.java.net/browse/JDK-8230305?subTaskView=unresolved
Moved to the dev docker and used this as mentioned in the link above.
It is working now. Thanks. Is there any timeline on when this will be available for the main builds
djs55 commentedon Jan 6, 2022
@gtskaushik thanks for the update. We're hoping to release an official build next week. In the official build the field is renamed to
deprecatedCgroupv1but I'll mention this in the release notes and update the various tickets.docker-robott commentedon Apr 6, 2022
Issues go stale after 90 days of inactivity.
Mark the issue as fresh with
/remove-lifecycle stalecomment.Stale issues will be closed after an additional 30 days of inactivity.
Prevent issues from auto-closing with an
/lifecycle frozencomment.If this issue is safe to close now please do so.
Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle stale
docker-robott commentedon Jun 5, 2022
Closed issues are locked after 30 days of inactivity.
This helps our team focus on active issues.
If you have found a problem that seems similar to this, please open a new issue.
Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle locked