-
Notifications
You must be signed in to change notification settings - Fork 18.6k
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
Cannot start container <..>: write <..>memory.memsw.limit_in_bytes: invalid argument #10280
Comments
Can you provide |
Of course! This is from the working machine:
The same commands on the failing host:
Both seem identical to me. Yes, the memory/swap accounting seem to be on, as no errors are shown regarding them on both machines. |
I launched a simple container with no memory limitations and tried to change it on the fly with simple echo (what seems to be an alternative to what Docker does, right?):
This actually works:
Default values are:
Obviously, one cannot change memory.memsw.limit_in_bytes first. memory.limit_in_bytes has to be smaller or equal to that first. However, the same is on the working (VirtualBox) machine, so it's not clear to me why Docker does this correctly on one host, but not on the other:
The above is without memory limitations, whereas the below is with:
Also what's interesting on the working host:
Whatsoever, on that host, both memory.limit_in_bytes and memory.memsw.limit_in_bytes are set correctly. Once again, logs from a failing host: https://gist.github.com/ernetas/c1ac5cf5ee6e1913c611 Logs from a working host: https://gist.github.com/ernetas/6d0d40aa28e0f49c5103 They seem to be very different. |
Reinstalled fresh Fedora, using exactly the same steps as before... Now both hosts are failing. |
Same sing here. A new installed & updated Fedora 21 Server fails on setting memory limits in docker. |
So, this seems to be potentially some interaction with systemd that has changed.. does anything from #7015 seem applicable? |
Can't confirm, nor deny. But yes - the working host has systemd upgrade pending, as it turns out. #7015 does not seem to be applicable for my case, though - there are no similar errors in the logs. Aside - I tested it with vfs before realizing it's a systemd issue - it didn't work as well. |
Can confirm - upgrading systemd and libgudev1 is the cause of the issue:
|
Should we report this to RedHat bugzilla or is this an issue of Docker (given that you can launch a container with Docker and then later successfully change memory limitations yourself)? |
@ernetas are you able to test this with the 1.5.0 RC? We did some work around memory and mem-swap and I would be interested in seeing if you are encountering the same issue with it. You can find binary downloads that are easily replaceable on your system in this comment for the upcoming release. |
Sadly, still encountering it:
|
I'm looking into this a bit deeper. I've reviewed any cgroups related changes in the systemd update from -14 to -16; there are a few that look interesting, not to mention there are over 100 patches to the latest systemd update on Fedora. I have a hunch that something in the systemd changes causes libcontainer's If we can narrow it down and it seems to be a problem in Fedora's systemd, then it would make sense to open a Red Hat bugzilla for the issue. |
Ok, thx, there are some new updates of systemd in fed repos today. Sorry, i Gesendet mit AquaMail für Android |
Tested with these upgrades (-17). Even after reboot and with Docker 1.5, it still throws the same error. |
Works for me with systemd-218:
|
So, I'm fairly confident that a single patch that is unique to the Fedora/RH build of systemd is the culprit. In a working systemd on Fedora (216-12, 216-13, 216-14), this message is output in the logs:
While that message comes from the That message no longer appears with later systemd builds on Fedora (216-16 and 216-17), and this patch also appeared in those builds which are now failing: 0159-cgroup-memory-limits-on-are-not-supported.patch
The A workaround in Docker is possible by catching the error when we try the manual write of |
Thanks, @estesp. I contacted zbyszek, who commited the patches. For me, it seems that we are missing additional patches. E. g. systemd/systemd@4ad4900, which reverts 0159-cgroup-memory-limits-on-are-not-supported.patch patch and, correct me if I'm wrong, is included in systemd-218. Anyways, I will close this issue and update status once everything is clear. |
When it fails, the bad systemd verions is used on the host, in the container, or both? |
For me - on the host only. I'm trying to launch an Ubuntu container, so it doesn't support/have systemd yet. Also, I doubt if systemd could run inside a container? |
Hm, so my first theory is wrong. Yes, it can run in a container. |
Its only on the host in my case. Gesendet mit AquaMail für Android Am 31. Jänner 2015 22:14:46 schrieb keszybz notifications@github.com:
|
Fixed in http://cgit.freedesktop.org/systemd/systemd/commit/?id=a3bd89ea99. I'll try to issue an update for systemd package tomorrow, but it'll be a while before it passes through QA. I made a build at http://koji.fedoraproject.org/koji/taskinfo?taskID=8788274 with this one patch added if you want to upgrade now. |
I hit this using Fedora 21 atomic. @keszybz Thanks for fixing.. Is there a bz that tracks this issue that I can follow? This bug (in systemd) isn't really hard to reproduce but if anyone is interested I wrote down some steps to recreate and recover on F21 atomic host: |
On Sun, Feb 01, 2015 at 08:32:25AM -0800, Dusty Mabe wrote:
|
https://bugzilla.redhat.com/show_bug.cgi?id=1188037 @keszybz I could only open in "NEW" or "ASSIGNED". Do you mind updating to "POST" state? |
The issue was fixed in systemd-216-20.fc21. |
Based on 7539904 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl> Date: Mon, 5 Jan 2015 19:03:08 -0500 Subject: [PATCH] cgroup: memory limits on / are not supported Includes a3bd89e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl> Date: Sat, 31 Jan 2015 23:03:25 -0500 Subject: [PATCH] core/cgroup: fix embarrassing typo moby/moby#10280
Exactly the same container worked fine on another installation of Fedora 21 in VirtualBox. This is running latest Docker from official RPM repos:
journalctl ends with:
Which could be somehow related to #4036, but doesn't seem to be an exact replica of this issue. Full logs here: https://gist.github.com/ernetas/7b1ad29db74cd4f093df
What could be the issue here? The containers fail to start only when started with memory limitations (-m="x").
The text was updated successfully, but these errors were encountered: