You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Jie Yu (JIRA)" <ji...@apache.org> on 2018/06/06 00:16:00 UTC

[jira] [Commented] (MESOS-8980) mesos-slave can deadlock with docker pull

    [ https://issues.apache.org/jira/browse/MESOS-8980?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16502687#comment-16502687 ] 

Jie Yu commented on MESOS-8980:
-------------------------------

Yeah, it does seem unnecessary to me given we never read the output. Can you send a patch and I'll get that committed.

> mesos-slave can deadlock with docker pull
> -----------------------------------------
>
>                 Key: MESOS-8980
>                 URL: https://issues.apache.org/jira/browse/MESOS-8980
>             Project: Mesos
>          Issue Type: Bug
>            Reporter: Kjetil Joergensen
>            Priority: Major
>
> Similar to MESOS-1885.
> mesos-slave crate 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
> {code}
> 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);
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)