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

Chun-Hung Hsiao commented on MESOS-9803:
----------------------------------------

Review: https://reviews.apache.org/r/70766/

Also made a repro test in https://reviews.apache.org/r/70764/ for local testing.

> Memory leak caused by an infinite chain of futures in `UriDiskProfileAdaptor`.
> ------------------------------------------------------------------------------
>
>                 Key: MESOS-9803
>                 URL: https://issues.apache.org/jira/browse/MESOS-9803
>             Project: Mesos
>          Issue Type: Bug
>          Components: storage
>    Affects Versions: 1.5.2, 1.5.3, 1.6.1, 1.6.2, 1.7.0, 1.7.1, 1.8.0
>         Environment: Review: https://reviews.apache.org/r/70766/
>            Reporter: Chun-Hung Hsiao
>            Assignee: Chun-Hung Hsiao
>            Priority: Blocker
>              Labels: mesosphere, mesosphere-dss-ga, storage
>         Attachments: _tmp_libprocess.dazuT6_profile.svg
>
>
> Before MESOS-8906, {{UriDiskProfileAdaptor}} only update its promise for 
> watchers if the polled profile matrix becomes larger in size, and this 
> prevents the following code in the {{watch}} function from creating an 
> infinite chain of futures when the profile matrix keeps the same:
> https://github.com/apache/mesos/blob/fa410f2fb8efb988590f4da2d4cfffbb2ce70637/src/resource_provider/storage/uri_disk_profile_adaptor.cpp#L159-L160
> However, the patch of MESOS-8906 removes the size check in the {{notify}} 
> function to allow profile selectors to be updated. As a result, once the 
> watch function is called, the returned future will be chained with a new 
> promise every time a poll is made, hence creating a memory leak.
> A jemalloc call graph for a 2hr trace is attached.



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

Reply via email to