You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (Jira)" <ji...@apache.org> on 2024/03/05 01:54:00 UTC

[jira] [Closed] (GROOVY-11271) ConcurrentCommonCache causes memory leaks.

     [ https://issues.apache.org/jira/browse/GROOVY-11271?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul King closed GROOVY-11271.
------------------------------

> ConcurrentCommonCache causes memory leaks.
> ------------------------------------------
>
>                 Key: GROOVY-11271
>                 URL: https://issues.apache.org/jira/browse/GROOVY-11271
>             Project: Groovy
>          Issue Type: Bug
>          Components: ast builder
>    Affects Versions: 4.0.7
>            Reporter: cong yang
>            Assignee: Daniel Sun
>            Priority: Critical
>             Fix For: 2.5.24, 4.0.18, 3.0.21
>
>
> 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.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)