Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-11105

MetricsSystemImpl could leak memory in registered callbacks

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.5.1
    • 2.6.0
    • metrics
    • None
    • Reviewed

    Description

      In MetricsSystemImpl.register(final String name, final String description, final T sink) method, we will also add a callback function to the callbacks array list. However, upon unregistering, the callback function is not removed from the list in existing code. As a result, the memory allocated for the callback function could accumulate in the MetricsSystemImpl list. In one of our cluster, we have seen a case where there are about 874 MB memory retained by MetricsSystemImpl.

      Attachments

        1. memory_leak_2.png
          67 kB
          Chuan Liu
        2. memory_leak_1.png
          29 kB
          Chuan Liu
        3. HADOOP-11105.patch
          5 kB
          Chuan Liu
        4. HADOOP-11105.2.patch
          4 kB
          Chuan Liu

        Issue Links

          Activity

            People

              chuanliu Chuan Liu
              chuanliu Chuan Liu
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: