Docker Community Forums

Share and learn in the Docker community.

Docker engine (mac) crash when sending 1.4Kb to private IP

docker

(Asanchezstephens) #1

Run a long runner container. e.g.
docker run -d python python3 -m http.server

Then run a container that will send some UDP data to the 192.168.X.X range:
docker run python python3 -c “import socket; sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM); sock.sendto(bytes(’-’*1473, ‘utf-8’), (‘127.0.0.2’, 80))”

Expected behavior

When I send less than 1473 bytes the container exits as I would expect.
The IP address I am sending to here has no server listening. However I am sending UDP so this process does not know this.
Not sure why the magic number is 1473 - maybe a it is different on different machines?

Actual behavior

The Docker engine appears to crash.
The long running container we started will no longer be running
It will however restart

Information

  • the output of:
    • pinata diagnose -u on OSX
      3.5 ~/code/cpython> pinata diagnose -u
      OS X: version 10.11.4 (build: 15E65)
      Docker.app: version v1.11.0-beta8.2
      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/20160422-160546.tar.gz
      Most specific failure is: No error was detected
      Your unique id is: 1A5420F5-AB91-4583-B383-AAE5B4BC7CEC
      Please quote this in all correspondence.
    • DockerDebugInfo.ps1 using Powershell on Windows
  • a reproducible case if this is a bug, Dockerfiles FTW
    docker run python python3 -c “import socket; sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM); sock.sendto(bytes(’-’*1473, ‘utf-8’), (‘192.101.101.101’, 80))”
  • page URL if this is a docs issue or the name of a man page
  • host distribution and version ( OSX 10.10.x, OSX 10.11.x, Windows, etc )
    OSX El Cap’ 10.11.4

Steps to reproduce the behavior

3.5 ~/code/cpython> docker run -d python python3 -m http.server
a3673e9e46d165499b27cea5a133587d001507e5cc2e3c69967d91b8b0a5ec06
3.5 ~/code/cpython> docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
a3673e9e46d1 python “python3 -m http.serv” 2 seconds ago Up 1 seconds suspicious_kare
3.5 ~/code/cpython> docker run python python3 -c "import socket; sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM); sock.sendto(bytes(’-’*1473, ‘utf-8’), (‘192.101.101.101’, 80))"
An error occurred trying to connect: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.23/containers/1e155817095a79559a9ae0fdd5c87c30ef9e2ec565d768017bfd5e719538460e/wait: EOF
exit 1
3.5 ~/code/cpython> docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
3.5 ~/code/cpython>