Created attachment 26163 [details] Proposed patch for tc6 trunk There is a WeakHashMap instance that is accessed concurrently and sometimes causes infinite loop. It's extremely hard to reproduce but you can refer to similar concurrent access looping problem by the following search keywords: * weakhashmap infinite loop 100% cpu stuck synchronized concurrent * java.util.WeakHashMap.put(WeakHashMap.java:405) * java.util.WeakHashMap.get(WeakHashMap.java:355) The org.apache.el.util.ConcurrentCache and javax.el.BeanELResolver.ConcurrentCache classes have this problem. There are 20 threads get stuck at the following thread stack: "ajp-146.215.106.42-8009-38" daemon prio=10 tid=0x00002aab6425d800 nid=0x135b runnable [0x0000000048c14000] java.lang.Thread.State: RUNNABLE at java.util.WeakHashMap.get(WeakHashMap.java:355) at org.apache.el.util.ConcurrentCache.get(ConcurrentCache.java:24) at org.apache.el.lang.ExpressionBuilder.createNodeInternal(ExpressionBuilder.java:90) "ajp-146.215.106.42-8009-18" daemon prio=10 tid=0x00002aab643ea000 nid=0x538d runnable [0x00000000458fd000] java.lang.Thread.State: RUNNABLE at java.util.WeakHashMap.put(WeakHashMap.java:405) at java.util.WeakHashMap.putAll(WeakHashMap.java:518) at org.apache.el.util.ConcurrentCache.put(ConcurrentCache.java:34)
Ooops, this needs to be fixed ASAP. The map sizes need to be made configurable I think (with the sync, 5000 might be too low for big setups and would result in a lot of syncs).
Thanks for the patch. I have fixed in this in trunk and that fix will be in 7.0.4 onwards. I added the ability to control the cache sizes. The patches have also been proposed for 6.0.x.
This has been fixed in 6.0.x and will be included in 6.0.30 onwards.