moby: Docker 1.9.1 hanging at build step "Setting up ca-certificates-java"
A few of us within the office upgraded to the latest version of docker toolbox backed by Docker 1.9.1 and builds are hanging as per the below build output.
docker version
:
Version: 1.9.1
API version: 1.21
Go version: go1.4.3
Git commit: a34a1d5
Built: Fri Nov 20 17:56:04 UTC 2015
OS/Arch: darwin/amd64
Server:
Version: 1.9.1
API version: 1.21
Go version: go1.4.3
Git commit: a34a1d5
Built: Fri Nov 20 17:56:04 UTC 2015
OS/Arch: linux/amd64
docker info
:
Containers: 10
Images: 57
Server Version: 1.9.1
Storage Driver: aufs
Root Dir: /mnt/sda1/var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 77
Dirperm1 Supported: true
Execution Driver: native-0.2
Logging Driver: json-file
Kernel Version: 4.1.13-boot2docker
Operating System: Boot2Docker 1.9.1 (TCL 6.4.1); master : cef800b - Fri Nov 20 19:33:59 UTC 2015
CPUs: 1
Total Memory: 1.956 GiB
Name: vbootstrap-vm
ID: LLM6:CASZ:KOD3:646A:XPRK:PIVB:VGJ5:JSDB:ZKAN:OUC4:E2AK:FFTC
Debug mode (server): true
File Descriptors: 13
Goroutines: 18
System Time: 2015-11-24T02:03:35.597772191Z
EventsListeners: 0
Init SHA1:
Init Path: /usr/local/bin/docker
Docker Root Dir: /mnt/sda1/var/lib/docker
Labels:
provider=virtualbox
uname -a
:
Darwin JRedl-MB-Pro.local 15.0.0 Darwin Kernel Version 15.0.0: Sat Sep 19 15:53:46 PDT 2015; root:xnu-3247.10.11~1/RELEASE_X86_64 x86_64
Here is a snippet from the docker build uppet that hangs on the Setting up ca-certificates-java line. Something to do with the latest version of docker and openjdk?
update-alternatives: using /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/tnameserv to provide /usr/bin/tnameserv (tnameserv) in auto mode
update-alternatives: using /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/jexec to provide /usr/bin/jexec (jexec) in auto mode
Setting up ca-certificates-java (20140324) ...
Docker file example:
FROM gcr.io/google_appengine/base
# Prepare the image.
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y -qq --no-install-recommends build-essential wget curl unzip python python-dev php5-mysql php5-cli php5-cgi openjdk-7-jre-headless openssh-client python-openssl && apt-get clean
I can confirm that this is not an issue with Docker 1.9.0 or Docker Toolbox 1.9.0d. Let me know if I can provide any further information but this feels like a regression of some sort within the new version.
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Reactions: 3
- Comments: 258 (83 by maintainers)
Commits related to this issue
- Added a work around for docker bug in 1.9.1. See https://github.com/docker/docker/issues/18180 for more information. — committed to Unidata/cloudidv by WardF 9 years ago
- doc: misunderstanding: it was not ZOOKEEPER-2251 (a bug of Linux kernel!) I thought I hit ZOOKEEPER-2251 because Zookeeper client (`zkCli.sh`) was hanging. However, this was due to the bug of Linux k... — committed to osrg/namazu by AkihiroSuda 9 years ago
- Reproduced docker/docker#18180 with lockdep kernel — committed to AkihiroSuda/boot2docker by AkihiroSuda 9 years ago
- lockdep kernel for debugging docker/docker#18180 — committed to AkihiroSuda/boot2docker by AkihiroSuda 9 years ago
- This should fix docker/docker#18180 — committed to AkihiroSuda/boot2docker by AkihiroSuda 9 years ago
- Print an warning for Boot2Docker v1.9.1, which is known to have an issue with AUFS (docker/docker#18180) Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp> — committed to AkihiroSuda/machine by AkihiroSuda 9 years ago
- Print a warning for Boot2Docker v1.9.1, which is known to have an issue with AUFS (docker/docker#18180) Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp> — committed to AkihiroSuda/machine by AkihiroSuda 9 years ago
- Update AUFS to v4.1.13+-20160105 This should fix docker/docker#18180. http://permalink.gmane.org/gmane.linux.file-systems.aufs.user/5345 — committed to AkihiroSuda/boot2docker by AkihiroSuda 8 years ago
- Update AUFS to v4.1.13+-20160111 This should fix docker/docker#18180. http://permalink.gmane.org/gmane.linux.file-systems.aufs.user/5345 — committed to AkihiroSuda/boot2docker by AkihiroSuda 8 years ago
- Update kernel to 4.1.15 Add fix for https://github.com/docker/docker/issues/18180 with aufs update. Signed-off-by: Justin Cormack <justin.cormack@unikernel.com> — committed to linuxkit/linuxkit by justincormack 8 years ago
- util/packer: Pin kernel version to work around Docker/AUFS bug Ubuntu kernel 3.19.0-39 is does not trigger this bug: https://github.com/docker/docker/issues/18180 Verified with: docker run -it ... — committed to flynn/flynn by titanous 8 years ago
- Create VM with boot2docker.iso v1.10.0-rc3 Attempting to fix https://github.com/gmacario/easy-jenkins/issues/24 See also: https://github.com/docker/docker/issues/18180 Signed-off-by: Gianpaolo Macar... — committed to gmacario/easy-jenkins by deleted user 8 years ago
- Update the workaround link (docker/docker#18180) — committed to AkihiroSuda/issues-docker by AkihiroSuda 8 years ago
Debian supported this issue.
LATEST QUICK WORKAROUNDS
If you can upgrade AUFS and build the kernel manually, you can also use AUFS v20160111 or later.
Distributors Issue Tickets
https://github.com/docker/docker/issues/18180#issuecomment-161843456 @andrewgdavis, you’re quite right!
The bug seems to be a regression caused by the commit 296291cd to Linux kernel(
mm/filemap.c
).I made a Boot2Docker ISO (
boot2docker-v1.9.1-fix1.iso
) that omits the commit 296291cd: https://github.com/AkihiroSuda/boot2docker/releases/tag/v1.9.1-fix1Hope it works for everyone. 😃
The commit 296291cd produces infinite
-EINTR
loop inmm/filemap.c:generic_perform_write
, whichfs/aufs/xino.c:do_xino_fwrite()
cannot tolerate:As
do_xino_fwrite()
loops infinitely,zap_pid_ns_processes()
(executed in another LWP) cannot return fromschedule()
when running on a single processor. That’s why we are hitting the bug.@gilles-duboscq You’re hitting the bug because Canonical originally backported the commit 296291cd to the kernel 3.19 tree: http://kernel.ubuntu.com/git/ubuntu/ubuntu-vivid.git/commit/?id=6b08592b8acc677d5b9bb7986343fdd6e0ad3303
31 participants on this issue and counting.
Updated the table about Ubuntu and Debian.
LATEST QUICK WORKAROUNDS
If you can upgrade AUFS and build the kernel manually, you can also use AUFS v20160111 or later.
Distributors Issue Tickets
One more thing; I listed up some known bugs about storage drivers: https://github.com/AkihiroSuda/docker-issues
For information, I listed up some issues and workarounds related to AUFS/Overlay/BtrFS/ZFS/devicemapper storage drivers: https://github.com/AkihiroSuda/docker-issues/
Hope this can help those who are interested in #18180 and others…
The solution for me was change the storage backend.
Add a line to /etc/default/docker ¡¡BE CAREFUL you’ll lose your container data!!
I recommend stop docker service, erase docker folder on /var/lib and then add the line and restart docker service.
I am able to duplicate this issue on my setup (using Docker Machine on Mac).
Here are my findings so far.
As noted by other posters, the simplest way to duplicate this has been to use the boot2docker 1.9.1 ISO with AUFS. This
Dockerfile
should minimally reproduce the problem fairly quickly:Looking at
dmesg
, I see some AUFS errors after attempting such a build, but I am not 100% sure they are related:If I create a Docker 1.9.1 machine which uses
overlay
as the storage driver:The process does NOT hang and this line runs successfully! Looks like AUFS and/or kernel is the problem.
boot2docker/boot2docker did bump both kernel versions and AUFS commit for the 1.9.1 release, so those are both factors which need to be ruled out or investigated further:
Currently trying 1.9.0 ISO with a 1.9.1 binary to see if the surface area of potential bug area can be reduced further.
@bean5 please keep your comments constructive