Uploaded image for project: 'Apache Curator'
  1. Apache Curator
  2. CURATOR-105

Memory leak when using PathChildrenCache

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.4.1, 2.4.2
    • 2.5.0
    • Framework, Recipes
    • Java(TM) SE Runtime Environment (build 1.7.0_55-b13)

    Description

      I've observed a memory leak in our production system using Curator service discovery.

      If you run the attached test case and watch the process with jvisualvm you'll see that the heap grows and grows as the test is running. Taking a heap dump will reveal thousands of ServiceInstance and ServiceCacheImpl instances that are retained even though the provider is closed after each usage. The references appear to be traced back to the PathChildrenCache. This appears to be a leak that shouldn't occur if the provider is correctly closed each time.

      There is also a heap dump available here:

      https://dl.dropboxusercontent.com/u/10909453/heapdump-curator-leak.hprof.tar.gz

      Attachments

        1. ServiceCacheLeakTest.java
          1 kB
          Joe Littlejohn

        Activity

          People

            randgalt Jordan Zimmerman
            japher Joe Littlejohn
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: