There was a change in Caffeine that might fix this infinite loop: https://github.com/ben-manes/caffeine/commit/9cd509c69344e304eb3ff99fe61cd8810957e6e8 - it is included in Caffeine 3.1.2, so in XWiki since 15.0RC1, see XCOMMONS-2147. Caffeine mentions keys that change equality or hash code. This is not possible in our cases afaik as we're using strings as keys in the cache. However, it also mentions: > In previous versions a Cache.put could spin forever by assuming it had a stale read and the removal was in-progress. However, if the entry was evicted but could not be removed, this led to an infinite loop and the cause was not described in the method comments so it does not communicate the user's error. I wonder if this might indeed have been caused by the removal listener doing weird stuff and thereby preventing the proper completion of the removal. It might be interesting to try reproducing this problem in XWiki >= 15.0, < 15.6 to maybe get a more useful error message. In any cases, it seems likely that this has either has been fixed in XWiki 15.0 or 15.6. |