-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Revert commit that changed LimitNOFILE to infinity to avoid regressions #7566
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Revert commit that changed LimitNOFILE to infinity to avoid regressions #7566
Conversation
|
Hi @rayburgemeestre. Thanks for your PR. I'm waiting for a containerd member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
…md_updates" This reverts commit 6c74c39, reversing changes made to 09814d4. Signed-off-by: Ray Burgemeestre <[email protected]>
efb4b88 to
d33b2a6
Compare
|
I wonder if this needs some discussion (I'm a bit behind on the linked discussions, and probably should post there as well). So the TL;DR is that; The intent of the
The culprit in the linked issues with MySQL (#3201, #6707, docker-library/mysql#579) is that these containers are started without limits set, so they run with "unconstraint" limits. It looks like MySQL as a default optimizes for performance (?) and consumes "what it can use"; due to the increased limits, this means it consumes way more than before, which is causing the issue. So the "correct" fix for these is to make sure containers are started with the intended limits on resources (cpu, memory, pid limit, ulimits). Those limits vary depending the use-case; some instances may need (expect to need) more resources than others, but in all cases it's good practice to set limits to the expected requirements for it to consume. So, the question is; what should be done?
|
|
Oh this reminds me #6541. Writing a systemd unit file for multiple systemd versions is not the thing. We do need to pick the systemd version first... |
|
I'm curious to know how many people are consuming the unit file from the containerd repo. Typically, distributions that package containerd would be responsible for shipping their own unit file and can make adjustments to it based on the kernel and systemd version available in that distribution. From containerd's perspective, we can't predict what every installed system will have with respect to a kernel and systemd version so we'll need to pick some behavior in our unit file, but that won't necessarily be appropriate for every system. |
|
Hi all,
Took a bit of googling and I found this SO thread and it fixed both issues https://stackoverflow.com/questions/73185002/yum-update-stucks-inside-docker This is whats currently distributed on the fedora 35 machine in /usr/lib/systemd/system/containerd.service and my current version Not sure if this is the place to put it as this might be more of a fedora packaging issue as you guys are discussing but wanted to make it known |
|
I believe the commit should be reverted, as it is a regression in some circumstances. The decision to make the limit infinite (unopiniated) is fine, but it should be communicated as a breaking change in a later release. As far as I know, this change was not made intending to be a breaking change. |
|
Another datapoint: |
Doesn't look like a plausible explanation to me. When you run MySQL without docker, it doesn't have any limits applied and it doesn't try to consume more RAM than is available. When I run MySQL in docker now, it tries to allocate 16.5 Gb of RAM immediately on start, although my laptop has only 16 Gb. There must be something else that causes MySQL to consume RAM in the latest docker so greedily. |
It will have limits applied; Limits on the host: Limits in container: |
Apparently with some recent releases of some OSes where new containerd has been released, default docker community edition causes Airlfow to immediately consume all memory. This happens in Breeze and Docker Compose at least. There is a workaround described in: ttps://github.com/moby/moby/issues/43361#issuecomment-1227617516 to use Docker Desktop instead. The issue is tracked in containerd in this issue - proposing to revert the change (as it impacts other applications run in docker, not only Airlfow): containerd/containerd#7566
Apparently with some recent releases of some OSes where new containerd has been released, default docker community edition causes Airlfow to immediately consume all memory. This happens in Breeze and Docker Compose at least. There is a workaround described in: ttps://github.com/moby/moby/issues/43361#issuecomment-1227617516 to use Docker Desktop instead. The issue is tracked in containerd in this issue - proposing to revert the change (as it impacts other applications run in docker, not only Airlfow): containerd/containerd#7566
|
Just an FYI: This has bitten me in the behind 2 times the last 2 weeks: once for slapd (openldap) and once for airflow (python). |
|
If I may, I would recommend adding a note somewhere to stop this cycle
|
|
This took a bit longer than expected to put together 😅
Personal experience with
|
To
|
History of decisions for
|
|
Almost there, I think I've connected all the dots in this post 👍 March 2019 - Proposal that
|
Summary
Reasons to change away from
|
Apparently with some recent releases of some OSes where new containerd has been released, default docker community edition causes Airlfow to immediately consume all memory. This happens in Breeze and Docker Compose at least. There is a workaround described in: ttps://github.com/moby/moby/issues/43361#issuecomment-1227617516 to use Docker Desktop instead. The issue is tracked in containerd in this issue - proposing to revert the change (as it impacts other applications run in docker, not only Airlfow): containerd/containerd#7566 GitOrigin-RevId: de2889c2e9779177363d6b87dc9020bf210fdd72
containerd recently changed the default LimitNOFILE from 1048576 to infinity. This breaks various applications in containers such as cups, which cannot start and/or print with the infinite ulimit. Issue: moby/moby#45204 PR: containerd/containerd#7566 Signed-off-by: Christian Stewart <[email protected]>
containerd recently changed the default LimitNOFILE from 1048576 to infinity. This breaks various applications in containers such as cups, which cannot start and/or print with the infinite ulimit. Issue: moby/moby#45204 PR: containerd/containerd#7566 Signed-off-by: Christian Stewart <[email protected]>
containerd recently changed the default LimitNOFILE from 1048576 to infinity. This breaks various applications in containers such as cups, which cannot start and/or print with the infinite ulimit. Issue: moby/moby#45204 PR: containerd/containerd#7566 Signed-off-by: Christian Stewart <[email protected]>
containerd recently changed the default LimitNOFILE from 1048576 to infinity. This breaks various applications in containers such as cups, which cannot start and/or print with the infinite ulimit. Issue: moby/moby#45204 PR: containerd/containerd#7566 Signed-off-by: Christian Stewart <[email protected]>
containerd recently changed the default LimitNOFILE from 1048576 to infinity. This breaks various applications in containers such as cups, which cannot start and/or print with the infinite ulimit. Issue: moby/moby#45204 PR: containerd/containerd#7566 Signed-off-by: Christian Stewart <[email protected]>
containerd recently changed the default LimitNOFILE from 1048576 to infinity. This breaks various applications in containers such as cups, which cannot start and/or print with the infinite ulimit. Issue: moby/moby#45204 PR: containerd/containerd#7566 Signed-off-by: Christian Stewart <[email protected]>
containerd recently changed the default LimitNOFILE from 1048576 to infinity. This breaks various applications in containers such as cups, which cannot start and/or print with the infinite ulimit. Issue: moby/moby#45204 PR: containerd/containerd#7566 Signed-off-by: Christian Stewart <[email protected]>
containerd recently changed the default LimitNOFILE from 1048576 to infinity. This breaks various applications in containers such as cups, which cannot start and/or print with the infinite ulimit. Issue: moby/moby#45204 PR: containerd/containerd#7566 Signed-off-by: Christian Stewart <[email protected]>
containerd recently changed the default LimitNOFILE from 1048576 to infinity. This breaks various applications in containers such as cups, which cannot start and/or print with the infinite ulimit. Issue: moby/moby#45204 PR: containerd/containerd#7566 Signed-off-by: Christian Stewart <[email protected]>
Apparently with some recent releases of some OSes where new containerd has been released, default docker community edition causes Airlfow to immediately consume all memory. This happens in Breeze and Docker Compose at least. There is a workaround described in: ttps://github.com/moby/moby/issues/43361#issuecomment-1227617516 to use Docker Desktop instead. The issue is tracked in containerd in this issue - proposing to revert the change (as it impacts other applications run in docker, not only Airlfow): containerd/containerd#7566 GitOrigin-RevId: de2889c2e9779177363d6b87dc9020bf210fdd72
containerd recently changed the default LimitNOFILE from 1048576 to infinity. This breaks various applications in containers such as cups, which cannot start and/or print with the infinite ulimit. Issue: moby/moby#45204 PR: containerd/containerd#7566 Signed-off-by: Christian Stewart <[email protected]>
containerd recently changed the default LimitNOFILE from 1048576 to infinity. This breaks various applications in containers such as cups, which cannot start and/or print with the infinite ulimit. Issue: moby/moby#45204 PR: containerd/containerd#7566 Signed-off-by: Christian Stewart <[email protected]>
containerd recently changed the default LimitNOFILE from 1048576 to infinity. This breaks various applications in containers such as cups, which cannot start and/or print with the infinite ulimit. Issue: moby/moby#45204 PR: containerd/containerd#7566 Signed-off-by: Christian Stewart <[email protected]>
containerd recently changed the default LimitNOFILE from 1048576 to infinity. This breaks various applications in containers such as cups, which cannot start and/or print with the infinite ulimit. Issue: moby/moby#45204 PR: containerd/containerd#7566 Signed-off-by: Christian Stewart <[email protected]>
containerd recently changed the default LimitNOFILE from 1048576 to infinity. This breaks various applications in containers such as cups, which cannot start and/or print with the infinite ulimit. Issue: moby/moby#45204 PR: containerd/containerd#7566 Signed-off-by: Christian Stewart <[email protected]>
containerd recently changed the default LimitNOFILE from 1048576 to infinity. This breaks various applications in containers such as cups, which cannot start and/or print with the infinite ulimit. Issue: moby/moby#45204 PR: containerd/containerd#7566 Signed-off-by: Christian Stewart <[email protected]>
containerd recently changed the default LimitNOFILE from 1048576 to infinity. This breaks various applications in containers such as cups, which cannot start and/or print with the infinite ulimit. Issue: moby/moby#45204 PR: containerd/containerd#7566 Signed-off-by: Christian Stewart <[email protected]>
containerd recently changed the default LimitNOFILE from 1048576 to infinity. This breaks various applications in containers such as cups, which cannot start and/or print with the infinite ulimit. Issue: moby/moby#45204 PR: containerd/containerd#7566 Signed-off-by: Christian Stewart <[email protected]>
containerd recently changed the default LimitNOFILE from 1048576 to infinity. This breaks various applications in containers such as cups, which cannot start and/or print with the infinite ulimit. Issue: moby/moby#45204 PR: containerd/containerd#7566 Signed-off-by: Christian Stewart <[email protected]>
containerd recently changed the default LimitNOFILE from 1048576 to infinity. This breaks various applications in containers such as cups, which cannot start and/or print with the infinite ulimit. Issue: moby/moby#45204 PR: containerd/containerd#7566 Signed-off-by: Christian Stewart <[email protected]>
containerd recently changed the default LimitNOFILE from 1048576 to infinity. This breaks various applications in containers such as cups, which cannot start and/or print with the infinite ulimit. Issue: moby/moby#45204 PR: containerd/containerd#7566 Signed-off-by: Christian Stewart <[email protected]>
containerd recently changed the default LimitNOFILE from 1048576 to infinity. This breaks various applications in containers such as cups, which cannot start and/or print with the infinite ulimit. Issue: moby/moby#45204 PR: containerd/containerd#7566 Signed-off-by: Christian Stewart <[email protected]>
containerd recently changed the default LimitNOFILE from 1048576 to infinity. This breaks various applications in containers such as cups, which cannot start and/or print with the infinite ulimit. Issue: moby/moby#45204 PR: containerd/containerd#7566 Signed-off-by: Christian Stewart <[email protected]>
Apparently with some recent releases of some OSes where new containerd has been released, default docker community edition causes Airlfow to immediately consume all memory. This happens in Breeze and Docker Compose at least. There is a workaround described in: ttps://github.com/moby/moby/issues/43361#issuecomment-1227617516 to use Docker Desktop instead. The issue is tracked in containerd in this issue - proposing to revert the change (as it impacts other applications run in docker, not only Airlfow): containerd/containerd#7566 GitOrigin-RevId: de2889c2e9779177363d6b87dc9020bf210fdd72
Apparently with some recent releases of some OSes where new containerd has been released, default docker community edition causes Airlfow to immediately consume all memory. This happens in Breeze and Docker Compose at least. There is a workaround described in: ttps://github.com/moby/moby/issues/43361#issuecomment-1227617516 to use Docker Desktop instead. The issue is tracked in containerd in this issue - proposing to revert the change (as it impacts other applications run in docker, not only Airlfow): containerd/containerd#7566 GitOrigin-RevId: de2889c2e9779177363d6b87dc9020bf210fdd72
Apparently with some recent releases of some OSes where new containerd has been released, default docker community edition causes Airlfow to immediately consume all memory. This happens in Breeze and Docker Compose at least. There is a workaround described in: ttps://github.com/moby/moby/issues/43361#issuecomment-1227617516 to use Docker Desktop instead. The issue is tracked in containerd in this issue - proposing to revert the change (as it impacts other applications run in docker, not only Airlfow): containerd/containerd#7566 GitOrigin-RevId: de2889c2e9779177363d6b87dc9020bf210fdd72
Apparently with some recent releases of some OSes where new containerd has been released, default docker community edition causes Airlfow to immediately consume all memory. This happens in Breeze and Docker Compose at least. There is a workaround described in: ttps://github.com/moby/moby/issues/43361#issuecomment-1227617516 to use Docker Desktop instead. The issue is tracked in containerd in this issue - proposing to revert the change (as it impacts other applications run in docker, not only Airlfow): containerd/containerd#7566 GitOrigin-RevId: de2889c2e9779177363d6b87dc9020bf210fdd72
Hi there,
This PR is reverting the change introduced by the following PR: #4475
In our case we experienced an issue with it with RHEL 9 and Rocky 9. The system would OOMKill processes running in containers (spawned via Kubernetes, using containerd)
With the limit set to INFINITY the system would become either unresponsive if unlucky, or the process would be killed, similar to below.
This is a very lightweight mysql server, on a very beefy node getting killed right away. This also happened with java stuff, uwsgi, and other processes we have automated tests with.
We tried with Kubernetes 1.24, and 1.21, with cgroups v2 and v1, later tried kubernetes on docker, where it worked. Which led us to the discovery that docker is using
LimitNOFILE=1048576and containerd is usingLimitNOFILE=infinityby default.Others have been running into this as well, for example:
We can work around it, but I believe simply reverting the change will make life easier for others, and maybe therefore worth doing? It would have saved me personally a couple of days troubleshooting.