-
Notifications
You must be signed in to change notification settings - Fork 86
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
error creating overlay mount to /var/lib/docker/overlay2/<...>/merged: device or resource busy #711
Comments
Simple patch against linux 5.2-rc7 to disable the check for a temporary workaround |
I'm getting around this by temporarily switching the |
I'm having the same issue but during push of an image to a private registry. Running on Arch Linux
Output of
|
I experienced this issue when pushing to a private registry as well, and am working around it. |
We hit the same error when pushing to a registry using Amazon Linux 2 using with
|
I'm using a private registry (built into GitLab) and have the same issue. The work-arounds listed above work for me. :) sudo systemctl stop docker
sudo dockerd -s overlay
# Rebuild your image, and push. |
hm, but this fix will not survive a reboot. diff -ru home/ec2-user/docker.service /usr/lib/systemd/system/docker.service
--- home/ec2-user/docker.service 2019-08-02 08:44:04.910157580 +0200
+++ /usr/lib/systemd/system/docker.service 2019-08-02 08:44:16.698134581 +0200
@@ -14,7 +14,7 @@
# the default is not to use systemd for cgroups because the delegate issues still
# exists and systemd currently does not support the cgroup feature set required
# for containers run by docker
-ExecStart=/usr/bin/dockerd $OPTIONS $DOCKER_STORAGE_OPTIONS $DOCKER_ADD_RUNTIMES
+ExecStart=/usr/bin/dockerd -s overlay $OPTIONS $DOCKER_STORAGE_OPTIONS $DOCKER_ADD_RUNTIMES
ExecReload=/bin/kill -s HUP $MAINPID
# Having non-zero Limit*s causes performance problems due to accounting overhead
# in the kernel. We recommend using cgroups to do container-local accounting.
I will observe it to see if it fixes the issue here as well. But I think overlay2 is what most people want and this patch disable the usage of overlay2. |
Can't that switch be passed through $OPTIONS? Where is it defined? |
Sure. I guess it's |
It is. This is what I'm using as a workaround: {
"storage-driver": "overlay",
"features": {"buildkit": true}
} |
I'm able to work around by setting only {
"storage-driver": "overlay"
} As a word of warning, changing the storage driver will make all of your images/containers (volumes don't seem to be affected) dissappear. They're still there, but you have to switch back to |
Let me note that the issue always happened while pushing images and never while building. I was mistaken with my test case in the first post. Updated. |
With buildkit enabled it happens when building larger images (> 1GB?) too. |
I've experienced this aswell when using GitLab-CI with docker-in-docker configuration,
dockerfiles:
stage: pre-build
script:
- docker login -u "gitlab-ci-token" -p ${CI_JOB_TOKEN} ${CI_REGISTRY}
- docker pull $HEAD_IMAGE || docker pull $LATEST_IMAGE || true
- docker build --tag $HEAD_IMAGE dockerfiles/
- docker push $HEAD_IMAGE
|
|
I am getting this error with It seems to successfully push 1-2 layers per attempt so YMMV. |
To continue on the comment by @breimers: Because it successfully pushes 1-2 layers per attempt, we -- as a workaround -- improved stability by setting:
on the docker daemon on the pushing side. If you have multiple clients this might be less-than-ideal, but when only the CI/CD pipeline pushes to docker, this might be a viable workaround. (Yes, it is slower this way.) This way, no errors are thrown at all, and it won't have to wait in-between retries. |
Same problem here. But only on one of two machine. Both machines are running arch linux with latest patches and use an m.2 ssd. Two main difference do had the pc's. PC 1 do not has an monitor connected. The assembled processors are # uname -r
5.2.5-arch1-1-ARCH PC 1: Intel(R) Celeron(R) CPU G3930 @ 2.90GHz On PC 1 The bug occurs heavly. |
Alternatively, and until this issue is fixed, one can set the maximum number of parallel uploads to 1 to bypass the issue without changing to overlay. Edit /etc/docker/daemon.json and set the max-concurrent-uploads variable. {
"max-concurrent-uploads": 1
} |
Having this issues when pushing. Docker version 18.09.7-ce, build 2d0083d657 @ Arch Linux |
me too , Manjaro docker version:19.03 . i fix it sudo systemctl stop docker
sudo rm -rf /var/lib/docker
sudo vim /etc/docker/daemon.json
{
"storage-driver": "overlay"
}
sudo systemctl start docker it works. |
I am using docker version 1.13.1 and was facing the same issue. |
Solution proposed by @mdgomes is definitely the least intrusive one. No need to switch from overlayfs2, no need to rebuild images nor to delete or hide all your images and containers. It's much slower but makes for the best tradeoff in my opinion for now. $ sudo systemctl stop docker
$ sudo nano /etc/docker/daemon.json
{
"max-concurrent-uploads": 1
}
$ sudo systemctl start docker
$ docker push [...] |
while changing the storage driver to overlay fixes the issue, is this a good practice? especially as overlay cause excessive inode consumption (especially as the number of images grows) |
Hi. Having the same issue, any updates? |
After upgrading the only time the issues has appeared for me was initially if a prune was not run because of cached layers, per the comment in #711 (comment). |
Debian 'buster' with default distro kernel + docker ce 19.03.4 fails:
It makes CI runs on Debian unusable ;( |
Yeah, this doesn't seem fully resolved from my perspective; I've got a k8s cluster here that was built with Docker version 19.03.4, build 9013bf583a (never had a previous version installed at all) presenting this error: on ubuntu 18.04 with Linux 4.15.0-66-generic. Due to the fact that the docker version was always 19.03.4 running a |
$ vim /etc/docker/daemon.json Posting out this if this helps to someone. I had the same issue with the docker. It was not able to push images to GCR. The above will able to solved my issue. |
@AbhinayGupta741 nice to know. But the problem exists during building as well. |
hrw, I think Abhinay's comment might as well help us because we are building and pushing at the same time. We need to delay pushing too. |
This was mentioned repeatedly throughout this thread; not sure why there's a need to add it again... This is not a solution but rather a cheap work-around. Question for the maintainers: |
So, in the end, we did not need max-concurrent-uploads set to 1, but we needed to stop building and pushing at the same time: |
This fixes Debian job failures during image building. See docker/for-linux#711 for upstream details. Change-Id: Icf3ffb261605ffe5d8f2618c2ed4cb97db97dd49
* Update kolla-ansible from branch 'master' - Merge "CI/Debian: Push images after building" - CI/Debian: Push images after building This fixes Debian job failures during image building. See docker/for-linux#711 for upstream details. Change-Id: Icf3ffb261605ffe5d8f2618c2ed4cb97db97dd49
This fixes Debian job failures during image building. See docker/for-linux#711 for upstream details. Change-Id: Icf3ffb261605ffe5d8f2618c2ed4cb97db97dd49 (cherry picked from commit 6ab144a)
Guys, this is still happening... error creating overlay mount to /var/lib/docker/overlay2/e3003381a4b9d9ef5f527fb36eeb14b98709bedc5a5535f11c42011fae171cd2/merged: device or resource busy
|
Oh yes, we have the same problem like @noice - when our Gitlab CI is building docker images, this problem occurs on daily basis. Using deprecated |
@noice @petr-fischer |
I already tried to do docker system prune (without --all --force). But I'll try it again with them. (Btw somewhere around these issue was mentioned that this should affect only linux >= 5.x, but I have this problem on 4.19.0. Don't know if this is the same core issue.) |
@choopm Unfortunately, still happening. Especially if parallel build of several (but different!) docker images is running (in the GitLab CI). This error occurs randomly in one container from 12. If I manually restart the build job with the overlay2 error, it's OK then. |
@choopm Can confirm - happened to me too again yesterday and now again just before few seconds. There were running around 3 docker build commands at one time and this is the result:
Can we reopen this issue please? Or should we create new one? This issue clearly isn't resolved yet... |
Our systems run stable since when we use I suggest opening a new issue, describing your setup in depth and an example for devs to reproduce. I'm not affiliated in any kind with moby, just trying to help and keeping the noise down on this issue. |
This is a workaround for issue docker/for-linux#711
Hey guys, I have faced this problem when I use an external SD Card for my docker application (It is running on arm64v8).
It works now ! |
After reboot system, I face this issue. I set centos Selinux(/etc/selinux/config) from disabled to permissive. and reboot again . It works! |
Hi guys, this is still happening:
|
Expected behavior
No errors
Actual behavior
error creating overlay mount to /var/lib/docker/overlay2/af8c5d19cde2039cf3b4c3b340b960bac2b2f0504b0b291f6c63c2d5175ea3ba/merged: device or resource busy
dmesg:
[55383.848708] overlayfs: lowerdir is in-use as upperdir/workdir
( https://gitlab.com/freedesktop-sdk/infrastructure/freedesktop-sdk-docker-images/-/jobs/242656806 )
Steps to reproduce the behavior
Install Fedora 30 and update the kernel to 5.1.15-300.fc30 (latest at time of creation of this issue)
Then as root:
Note: kernels that do not have this commit do not suffer from the issue. It looks like this commit added more sanity checks around usage of overlayfs and docker is using overlayfs wrong. I could work around the issue by using an older kernel.
Output of
docker version
:Output of
docker info
:Additional environment details (AWS, VirtualBox, physical, etc.)
QEMU/KVM
The text was updated successfully, but these errors were encountered: