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
I've made a public container called scraperwiki/go using hack/dind and the principles in this Dockerfile.
The image works on my local machine. It does not work on EC2, I get the behaviour described below. The main difference I'm aware of is that my local machine has AUFS installed where EC2 does not.
I get a prompt by running docker run -t -i -privileged scraperwiki/go dind bash.
When I try to start docker -d &, I get the following output, then nothing:
[/var/lib/docker|2621c420] +job initapi()
[/var/lib/docker|2621c420.initapi()] Creating server
If I subsequently try to use it, it freezes. The whole machine goes into 100% IO wait for longer than 5 minutes. I observe a mkfs.ext4 running, and if I strace it (and wait long enough), I observe:
And nothing more, just those two lines. I've waited ten minutes and nothing more has appeared. If I try to run anything (e.g, "ps aux") inside the dind container, it freezes.
After all of the above, the host machine has 1.4GB of free disk space.
Followup: At the time, I gave up on this for the holidays. Now that I've come back the machine is out of disk space and du -sch reports that /var/lib/docker/devicemapper is using 29GB of disk space. (It's an 8GB disk in total).
What is going on, and how to fix it? If I don't get a response by the time this post is 18 hours old I'll delete the files and setup aufs.
Try adding -x to your du -sch (ie, du -schx) - that will stop it from traversing down inside mount points, which should make it give you a more accurate accounting of actual space used without duplicating layers many times.
Thanks, that reports 4.5GB. @tianon, if I delete the contents of devicemapper will I destroy information needed for debugging? I need to try AUFS so that I can proceed with the current project.
I can't speak for the core guys (who'd be the ones trying to help debug this), but I think they'd need to try to replicate it reliably to debug it properly.
@unclejack it's ubuntu 13.10 and it was a fresh machine with docker ~0.7.0 or whatever the latest version when I posted the issue. I have since installed aufs on the machine and completely sidestepped the problem.
@pwaller I've tried to reproduce this and couldn't reproduce it in any way. I'm not seeing any of the stalls and any strange behavior. It might have been caused by some problems with those particular setups.
I'll close this issue since I can't reproduce it. If anyone runs into a similar problem, please feel free to comment on this issue and provide all the steps to help us reproduce the problem.
Having the same problem, albeit on a quite new, unsupported system: Arch Linux ARM on an Odroid U3, which is an armv7h platform. But docker is now available on ARM and reportedly works on the Raspberry Pi already. The system is fully updated with the latest packages from the ARM repository.
Not trying any dind stuff. The problem already occurs when trying to start the docker daemon:
$ sudo systemctl start docker
$ sudo systemctl status docker
docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled)
Active: active (running) since Tue 2014-01-21 16:31:30 MST; 22min ago
Docs: http://docs.docker.io
Process: 318 ExecStartPre=/bin/mount --make-rprivate / (code=exited, status=0/SUCCESS)
Main PID: 321 (docker)
CGroup: /system.slice/docker.service
├─321 /usr/bin/docker -d
└─347 mkfs.ext4 -E discard,lazy_itable_init=0,lazy_journal_init=0 /dev/mapper/docker-179:3-131-base
Jan 21 16:31:30 alarm systemd[1]: Started Docker Application Container Engine.
Jan 21 16:31:30 alarm docker[321]: [/var/lib/docker|e65fdae1] +job initapi()
Jan 21 16:31:30 alarm docker[321]: [/var/lib/docker|e65fdae1.initapi()] Creating server
This is as far as it gets. The mkfs.ext4 process keeps running and very slowly (about 1MB / min) fills up the partition mounted at /var/lib/docker. (I tried with ext4 and xfs.) strace output looks like @pwaller's, printing some of those lines every few minutes. A couple of minutes later, there are no traces anymore. The devicemapper directory is getting bigger still.
I am getting kernel "task hung" errors when trying to kill the mkfs process. Only a hard reboot helps to get rid of it.
One hour passed, still waiting for the mkfs to complete. Problem occurs with either 0.7.2 or 0.7.6.
$ docker version
Client version: 0.7.6
Go version (client): go1.2
Git commit (client): bc3b2ec-dirty
2014/01/21 16:54:39 dial unix /var/run/docker.sock: no such file or directory
Is there anything else I can do to help debug this?
@djmaze What kernel version are you running on that ARM board?
It sounds like your little ARM board is running into problems when it's formatting the ext4 devicemapper volumes.
I'm not sure what kind of storage you're using on that board, but you might be running into some kind of problems caused by the flash being too slow, the kernel being heavily modified or old, or a combination of both.
@unclejack: The kernel is Linux alarm 3.8.13.14-1-ARCH #3 SMP PREEMPT Mon Dec 30 10:03:31 MST 2013 armv7l GNU/Linux, which is a heavily modified version. The storage is a eMMC card, which ought to be at least as fast as a standard hard drive. (And, after some testing, it really seems to be.)
So it looks like I should try to do some isolated devicemapper testing on that device? Was just wondering because my system was showing the exact same symptoms as @pwaller's.
@alexlarsson I just emailed Mike about that commit before realizing you work for RH, too. :-) Do you know if that commit will be making it into the kernel for RHEL 6.5 any time soon?
No, there are still a bunch of weirdness wrt discard. I'd like to avoid the discard workaround on image remove we have, that speeds up deletes many times (try with --storage-opt dm.blkdiscard=false).
root@ip-10-111-2-76:/etc/init# uname -a
Linux ip-10-111-2-76 3.13.0-24-generic #47-Ubuntu SMP Fri May 2 23:30:00 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
root@ip-10-111-2-76:/etc/init# docker info
Containers: 157
Images: 61
Storage Driver: devicemapper
Pool Name: docker-202:16-1048826-pool
Data file: /var/lib/docker/devicemapper/devicemapper/data
Metadata file: /var/lib/docker/devicemapper/devicemapper/metadata
Data Space Used: 7320.8 Mb
Data Space Total: 102400.0 Mb
Metadata Space Used: 14.3 Mb
Metadata Space Total: 2048.0 Mb
Execution Driver: native-0.2
Kernel Version: 3.13.0-24-generic
The "--storage-opt dm.blkdiscard=false" option brought down the load average from 60 to 8 (for our application. We launch about 40 containers.
# docker info
Containers: 1
Images: 43
Storage Driver: devicemapper
Pool Name: docker-202:1-278932-pool
Data file: /var/lib/docker/devicemapper/devicemapper/data
Metadata file: /var/lib/docker/devicemapper/devicemapper/metadata
Data Space Used: 2126.2 Mb
Data Space Total: 102400.0 Mb
Metadata Space Used: 3.0 Mb
Metadata Space Total: 2048.0 Mb
Execution Driver: native-0.2
Kernel Version: 3.14.17-1-ec2-lts
# docker version
Client version: 1.1.2
Client API version: 1.13
Go version (client): go1.3
Git commit (client): d84a070
Server version: 1.1.2
Server API version: 1.13
Go version (server): go1.3
Git commit (server): d84a070
Regarding the same issue on Ubuntu 14.04, install the linux-image-extra-$version-generic package for your kernel to enable AUFS.
Lets close this for now as the comments above and if anyone is still having the issue please open a new report with your specific problem and configuration.
I'm still having this problem using device mapper on kvm virtual machines, it's running very slow. By looking at the current master branch I see lazy_itable_init=0 (mentioned by @djmaze) is still in the code:
Activity
crosbymichael commentedon Dec 19, 2013
@pwaller FYI @jpetazzo is gone until next year
pwaller commentedon Dec 19, 2013
@crosbymichael thanks. I'm off for the evening. Any chance I'll find help anywhere tomorrow?
The next thing I'll try is setting up AUFS. Will docker use it by default if it is available?
crosbymichael commentedon Dec 19, 2013
Yes docker will try to use aufs by default. What you are seeing is device mapper setting up it's sparse files
pwaller commentedon Dec 20, 2013
How might I understand why the device mapper is being so slow?
pwaller commentedon Jan 6, 2014
Followup: At the time, I gave up on this for the holidays. Now that I've come back the machine is out of disk space and
du -schreports that/var/lib/docker/devicemapperis using 29GB of disk space. (It's an 8GB disk in total).What is going on, and how to fix it? If I don't get a response by the time this post is 18 hours old I'll delete the files and setup aufs.
tianon commentedon Jan 6, 2014
Try adding
-xto yourdu -sch(ie,du -schx) - that will stop it from traversing down inside mount points, which should make it give you a more accurate accounting of actual space used without duplicating layers many times.pwaller commentedon Jan 6, 2014
Thanks, that reports 4.5GB. @tianon, if I delete the contents of devicemapper will I destroy information needed for debugging? I need to try AUFS so that I can proceed with the current project.
tianon commentedon Jan 6, 2014
I can't speak for the core guys (who'd be the ones trying to help debug this), but I think they'd need to try to replicate it reliably to debug it properly.
unclejack commentedon Jan 21, 2014
@pwaller Can you provide the output of
docker versionanddocker info, please? Knowing the Linux distribution you're using would help as well.pwaller commentedon Jan 21, 2014
@unclejack it's ubuntu 13.10 and it was a fresh machine with docker ~0.7.0 or whatever the latest version when I posted the issue. I have since installed aufs on the machine and completely sidestepped the problem.
unclejack commentedon Jan 21, 2014
@pwaller I've tried to reproduce this and couldn't reproduce it in any way. I'm not seeing any of the stalls and any strange behavior. It might have been caused by some problems with those particular setups.
I'll close this issue since I can't reproduce it. If anyone runs into a similar problem, please feel free to comment on this issue and provide all the steps to help us reproduce the problem.
djmaze commentedon Jan 22, 2014
Having the same problem, albeit on a quite new, unsupported system: Arch Linux ARM on an Odroid U3, which is an armv7h platform. But docker is now available on ARM and reportedly works on the Raspberry Pi already. The system is fully updated with the latest packages from the ARM repository.
Not trying any dind stuff. The problem already occurs when trying to start the docker daemon:
This is as far as it gets. The
mkfs.ext4process keeps running and very slowly (about 1MB / min) fills up the partition mounted at /var/lib/docker. (I tried with ext4 and xfs.) strace output looks like @pwaller's, printing some of those lines every few minutes. A couple of minutes later, there are no traces anymore. The devicemapper directory is getting bigger still.I am getting kernel "task hung" errors when trying to kill the mkfs process. Only a hard reboot helps to get rid of it.
One hour passed, still waiting for the mkfs to complete. Problem occurs with either 0.7.2 or 0.7.6.
Is there anything else I can do to help debug this?
unclejack commentedon Jan 22, 2014
@djmaze What kernel version are you running on that ARM board?
It sounds like your little ARM board is running into problems when it's formatting the ext4 devicemapper volumes.
I'm not sure what kind of storage you're using on that board, but you might be running into some kind of problems caused by the flash being too slow, the kernel being heavily modified or old, or a combination of both.
djmaze commentedon Jan 22, 2014
@unclejack: The kernel is
Linux alarm 3.8.13.14-1-ARCH #3 SMP PREEMPT Mon Dec 30 10:03:31 MST 2013 armv7l GNU/Linux, which is a heavily modified version. The storage is a eMMC card, which ought to be at least as fast as a standard hard drive. (And, after some testing, it really seems to be.)So it looks like I should try to do some isolated devicemapper testing on that device? Was just wondering because my system was showing the exact same symptoms as @pwaller's.
39 remaining items
blalor commentedon Apr 2, 2014
@alexlarsson I just emailed Mike about that commit before realizing you work for RH, too. :-) Do you know if that commit will be making it into the kernel for RHEL 6.5 any time soon?
alexlarsson commentedon Apr 3, 2014
@blalor I have no idea unfortunately
unclejack commentedon Jun 18, 2014
@alexlarsson Given the optimizations which went into Docker since this issue was created, do you think this can still be a problem?
alexlarsson commentedon Jun 19, 2014
No, there are still a bunch of weirdness wrt discard. I'd like to avoid the discard workaround on image remove we have, that speeds up deletes many times (try with --storage-opt dm.blkdiscard=false).
daniel-garcia commentedon Jul 17, 2014
Also seeing this using EC2 ubuntu 14.04 image:
The "--storage-opt dm.blkdiscard=false" option brought down the load average from 60 to 8 (for our application. We launch about 40 containers.
jbiel commentedon Aug 21, 2014
I've also seen this on Arch Linux on EC2 using an AMI from here: https://www.uplinklabs.net/projects/arch-linux-on-ec2/ The IO workload is quite intense while doing anything with the containers.
Regarding the same issue on Ubuntu 14.04, install the
linux-image-extra-$version-genericpackage for your kernel to enable AUFS.Make sure docker will up successfully
devmapper: Enable skip_block_zeroing
unclejack commentedon Dec 19, 2014
Is anyone still running into this problem?
pwaller commentedon Dec 20, 2014
I'm the original reporter. I haven't seen this issue in many months, but then I haven't been using the device mapper very much either.
crosbymichael commentedon Feb 12, 2015
Lets close this for now as the comments above and if anyone is still having the issue please open a new report with your specific problem and configuration.
fiorix commentedon Nov 6, 2015
I'm still having this problem using device mapper on kvm virtual machines, it's running very slow. By looking at the current master branch I see
lazy_itable_init=0(mentioned by @djmaze) is still in the code: