Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-11271

ConcurrentCommonCache causes memory leaks.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 4.0.7
    • 2.5.24, 4.0.18, 3.0.21
    • ast builder
    • None

    Description

      ConcurrentCommonCache uses a read-write lock to wrap CommonCache into a thread-safe data structure. However, CommonCache uses the underlying LinkedHashMap, which causes conflicts when using the LRU algorithm because the LinkedHashMap.get method modifies the internal linked list. This conflicts with the read lock used by the get method in ConcurrentCommonCache when multiple threads access it. Due to multithreading conflicts, the maximum cache size of 64 becomes ineffective, ultimately causing memory leaks. Additionally, we have already encountered memory leaks in our production environment.

      Attachments

        Issue Links

          Activity

            People

              daniel_sun Daniel Sun
              a767856866 cong yang
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: