Crash when running container with host mount

Having the same issue with latest Docker for Mac beta.

Console shows the following:

Sep 29 15:37:12 Fredriks-MBP-2 Docker[91284]: sending SIGTERM to com.docker.hyperkit pid 91288 Sep 29 15:37:14 Fredriks-MBP-2 Docker[91261]: dockerState = Starting Sep 29 15:37:28 Fredriks-MBP-2 Docker[91282]: Socket.Stream: caught Uwt.Uwt_error(Uwt.ENOTCONN, "shutdown", "") Sep 29 15:37:29 Fredriks-MBP-2 Docker[91282]: DHCPRELEASE without request ip Sep 29 15:37:29 Fredriks-MBP-2 Docker[91282]: Socket.Stream: caught Uwt.Uwt_error(Uwt.ENOTCONN, "shutdown", "") Sep 29 15:38:55 Fredriks-MBP-2 Docker[91261]: dockerState = Starting 

Unfortunately, the daemon does not get up and running even after a restart, and this seem to affect the ability to upload diagnostics as well:

Docker for Mac: version: 1.12.1-beta26.1 (12c3e63) OS X: version 10.11.6 (build: 15G1004) logs: /tmp/6C609C3B-783E-4D46-9A49-C336F3A029BA/20160929-154553.tar.gz failure: docker ps failed: Failure("docker ps: timeout after 10.00s") [ERROR] docker-cli docker ps failed [OK] virtualization kern.hv_support [OK] menubar [OK] moby-syslog [OK] dns [OK] disk [OK] system [OK] app [OK] osxfs [OK] virtualization VT-X [OK] db [OK] slirp [OK] logs [OK] env [OK] vmnetd [OK] moby-console [OK] moby [OK] driver.amd64-linux Failure: Could not upload diagnostic data to remote server (docker-diagnose exit code is 1) 

Also, I am too new a forum user to upload attachments. (Sorry, new users can not upload attachments.)

If a Docker developer wants the diagnose tar.gz, let me know where to send it.

I see that there is a giant issue in github tracking these kind of issues, and there is a temporary workaround on how to get Docker running again without resetting to factory defaults here: https://github.com/docker/for-mac/issues/119#issuecomment-246635432

I’ll settle for the temporary workaround until a new version comes out. they seem to have enough reported crashes in github already.

I have two modes of failure. Initially I got the “transport endpoint is not connected” error. Now I just get a hung process.

What I do:

#Setup
mkdir /tmp/play
docker run -v /tmp/play:/tmp/play -t -i --name play ubuntu:16.04 /bin/bash

#The heavy activity
Run this on the host:

for ((i = 0; i < 1000 * 1000 * 1000; i++)); do dd if=/dev/urandom of=/tmp/play/"$i" bs=4096 count=1 2>/dev/null; done 

(I originally wanted to just see if docker is suitable for Symfony development, that’s why the large number in the loop. You’ll get the misbehaviour after about 1000 files)

#The quick death
Run this in the container a few times:

du -sh /tmp/play 

It will get slow quickly, and after a few runs you should have either the error originally reported or a hung du. You should kill the heavy activity once it happens.

If it hangs you can still do this:

docker exec -t -i play /bin/bash 

And if you run ps aux you’ll see this:

USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1 0.0 0.1 18240 3200 ? Ss 19:13 0:00 /bin/bash root 16 0.0 0.0 4732 1740 ? D+ 19:15 0:00 du -sh /tmp/play root 17 0.3 0.1 18244 3192 ? Ss 19:16 0:00 /bin/bash root 28 0.0 0.1 34424 2860 ? R+ 19:16 0:00 ps aux 

Notice the du process in the D state. Any attempt to access /tmp/play at this point hangs.

If it crashes… the container exits and the daemon stops responding for a little while.

#Software
Docker version 1.12.1, build 6f9534c
OS X 10.11.6

#Hardware
iMac11,2
Intel Core i3 @ 3.06 GHz
12 GB RAM

I can’t Diagnose & Upload because Failure: Could not upload diagnostic data to remote server (docker-diagnose exit code is 1)