Details
-
Bug
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
14.7.11
-
Flagged
-
Orion
-
Orion.Cycle7.Sprint1
Description
A client got hit by the following IllegalStateException from org.apache.commons.collections4.map.LRUMap, when undergoing a server attack:
java.lang.IllegalStateException: Entry.next=null, data[removeIndex]=PageCacheKey[<reqInfo>]=true previous=PageCacheKey[<reqInfo>]=true key=PageCacheKey[<reqInfo>] value=true size=1000 maxSize=1000 This should not occur if your keys are immutable, and you have used synchronization properly.
The 3 <reqInfo> occurrences above are identical.
We use this LRUMap in an unsynchronized way at
org.hippoecm.hst.cache.CompositeHstCache#uncacheableKeys
and
org.hippoecm.hst.site.request.CachingObjectConverter.ObjectCache#cache
The Javadocs of LRUMap says:
Note that LRUMap is not synchronized and is not thread-safe. If you wish to use this map from multiple threads concurrently, you must use appropriate synchronization. The simplest approach is to wrap this map using Collections.synchronizedMap(Map).
so we can probably improve the product by doing the above.
Attachments
Issue Links
- relates to
-
CMS-14811 Page cache: possible race condition/synchronization issue
- In Progress