Docker Community Forums

Share and learn in the Docker community.

Docker run hangs


(Pditommaso) #1

Expected behavior

Run successfully or exit with an error status

Actual behavior

I’m running a container running memory intensive tasks. After launching the docker run .. command I can see the container running with the docker ps command. After a while the container disappear i.e. is not reported anymore by the docker ps command but the docker run .. never exit.

Information

$ pinata diagnose -u
OS X: version 10.11.2 (build: 15C50)
Docker.app: version v1.11.0-beta6
Running diagnostic tests:
[OK]      docker-cli
[OK]      Moby booted
[OK]      driver.amd64-linux
[OK]      vmnetd
[OK]      osxfs
[OK]      db
[OK]      slirp
[OK]      menubar
[OK]      environment
[OK]      Docker
[OK]      VT-x
Docker logs are being collected into /tmp/20160406-161913.tar.gz.
Upload to bugsnag failed:
2016/04/06 16:19:31 notifying bugsnag: unknown error
2016/04/06 16:19:42 bugsnag.Notify: bugsnag/payload.deliver: Got HTTP 400 Bad Request

Steps to reproduce the behavior

docker run -i -e "NXF_DEBUG=${NXF_DEBUG:=0}" -e "BASH_ENV=/Users/pditommaso/projects/kallisto-nf/work/2c/17b9ecc11f07f0cc5ab03af95d4455/.command.env" -v /Users/pditommaso/projects/kallisto-nf:/Users/pditommaso/projects/kallisto-nf -v "$PWD":"$PWD" -w "$PWD" --entrypoint /bin/bash --name $NXF_BOXID cbcrg/kallisto-nf:1.1 -c "/bin/bash -ue /Users/pditommaso/projects/kallisto-nf/work/2c/17b9ecc11f07f0cc5ab03af95d4455/.command.sh"

(Camilo Aguilar) #2

I’m running into this as well, fresh install:

$ pinata diagnose -u
OS X: version 10.11.4 (build: 15E65)
Docker.app: version v1.11.0-beta6
Running diagnostic tests:
[OK] docker-cli
[OK] Moby booted
[OK] driver.amd64-linux
[OK] vmnetd
[OK] osxfs
[OK] db
[OK] slirp
[OK] menubar
[OK] environment
[OK] Docker
[OK] VT-x

Docker logs are being collected into /tmp/20160406-111144.tar.gz.
Your unique id in bugsnag is: 0A4954DF-E289-4D40-B740-FF83CDC04698
Please quote this in all correspondence.

$ uname -a
Darwin camilompb.nyhq.nytint.com 15.4.0 Darwin Kernel Version 15.4.0: Fri Feb 26 22:08:05 PST 2016; root:xnu-3248.40.184~3/RELEASE_X86_64 x86_64 i386 MacBookPro11,2 Darwin

Output
docker run gliderlabs/alpine /bin/bash
Unable to find image ‘gliderlabs/alpine:latest’ locally
Pulling repository docker.io/gliderlabs/alpine
docker: Network timed out while trying to connect to https://index.docker.io/v1/repositories/gliderlabs/alpine/images. You may want to check your internet connection or if you are behind a proxy…
See ‘docker run --help’.


(Filippo Valsorda) #3

I ran into this, too, and I think I isolated it down to a timeout or stuck I/O on the Docker socket forwarder.

Running docker run debian /bin/bash -c "sleep 10" will freeze and require a kill -9. The container exits normally, but the docker client hangs.

Sleeping for less seconds works as expected. More interestingly, docker run debian /bin/bash -c "echo 1 && sleep 10" works, while docker run debian /bin/bash -c "sleep 10 && echo 1" hangs before printing 1.

So I think the issue is that docker run hangs if there’s no output in the first 10 seconds.

Needless to say, this is a major blocker :slight_smile:

pinata diagnose -u
OS X: version 10.11.3 (build: 15D21)
Docker.app: version v1.11.0-beta6
Running diagnostic tests:
[OK]      docker-cli
[OK]      Moby booted
[OK]      driver.amd64-linux
[OK]      vmnetd
[OK]      osxfs
[OK]      db
[OK]      slirp
[OK]      menubar
[OK]      environment
[OK]      Docker
[OK]      VT-x
Docker logs are being collected into /tmp/20160407-160540.tar.gz.
Your unique id in bugsnag is: EA6641F7-AC78-49A7-9047-9899171D78BD
Please quote this in all correspondence.