Details
Description
Similar to MESOS-1885.
mesos-slave create pipes for stdout/stderr for docker pull, forks & execs docker pull. When the output of docker pull exceeds the buffer allocated to the pipe, mesos-slave and docker pull will deadlock, where docker pull blocks on writing to stdout, and mesos-slave is waiting for docker pull to exit.
Under "normal" circumstances this seems somewhat rare, although if you have enough jobs running, you'll get to a point where the sum-total of buffer for pipes allocated gets to fs.pipe-max-size, at which point linux will give you a single page of memory for the pipe buffer, at which point a moderate amount of layers will push you over the 4k pipe buffer.
Is stdout for docker pull being used for anything ? (Cursory testing & reading said no immediate observable harm). If not, the following should do the trick
diff --git a/src/docker/docker.cpp b/src/docker/docker.cpp index d423d56ad..daebb897b 100755 --- a/src/docker/docker.cpp +++ b/src/docker/docker.cpp @@ -1413,7 +1413,7 @@ Future<Docker::Image> Docker::__pull( path, argv, Subprocess::PATH("/dev/null"), - Subprocess::PIPE(), + Subprocess::PATH("/dev/null"), Subprocess::PIPE(), nullptr, environment);