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

Qian Zhang commented on MESOS-10127:
------------------------------------

It seems there is no a proper place in Docker volume isolator's code to erase 
the sequence.

If we erase the sequence after the unmount operation is invoked (like right 
after [this 
line|https://github.com/apache/mesos/blob/1.9.0/src/slave/containerizer/mesos/isolators/docker/volume/isolator.cpp#L658]),
 and another container tries to use the same volume at the same time (so we 
need to mount the volume), then unmount and mount operations could happen 
simultaneously for the same volume which is just what we want to avoid by using 
the sequence.

If we erase the sequence after the unmount operation is complete (like in 
[DockerVolumeIsolatorProcess::_cleanup()|https://github.com/apache/mesos/blob/1.9.0/src/slave/containerizer/mesos/isolators/docker/volume/isolator.cpp#L670]),
 and another container tries to use the same volume before the sequence is 
erased but after the unmount operation is complete, then we could erase the 
sequence when the mount operation is still ongoing which may cause the mount 
operation is discarded.

> The sequences used in Docker volume isolator are never erased
> -------------------------------------------------------------
>
>                 Key: MESOS-10127
>                 URL: https://issues.apache.org/jira/browse/MESOS-10127
>             Project: Mesos
>          Issue Type: Bug
>          Components: containerization
>            Reporter: Qian Zhang
>            Priority: Major
>
> In Docker volume isolator, we use 
> [sequence|https://github.com/apache/mesos/blob/1.9.0/src/slave/containerizer/mesos/isolators/docker/volume/isolator.hpp#L119:L122]
>  to make sure the mount and unmount operations for a single volume are issued 
> serially, but the sequence is never erased which could be a memory leak.
> We have this issue since Mesos 1.0.0 release when Docker volume isolator was 
> introduced.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to