Uploaded image for project: 'Mesos'
  1. Mesos
  2. MESOS-9803

Memory leak caused by an infinite chain of futures in `UriDiskProfileAdaptor`.

    XMLWordPrintableJSON

Details

    Description

      Before MESOS-8906UriDiskProfileAdaptor 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.

      Attachments

        1. _tmp_libprocess.dazuT6_profile.svg
          49 kB
          Chun-Hung Hsiao

        Activity

          People

            chhsia0 Chun-Hung Hsiao
            chhsia0 Chun-Hung Hsiao
            Benjamin Bannier Benjamin Bannier
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: