mayo wrote: > I am using OFBiz 4.0. > > I been trying to figure out what causes random high CPU utilization from > OFBiz since its deployment (08/2009), which usually requires a restart of > the application. I have done lots research at the software and hardware > level and tried many changes, including replacing Minerva with Apache DBCP, > but I still (seemingly) random times when my server CPU is at 100% > utilization, all from the OFBiz application. > > I think I may have stumbled upon a possible reason. The most recent time it > has happened I did a thread dump--something I wish I did last year. The > thread dump showed one particular process that wasn't finishing, and seemed > to be stuck on > org.apache.commons.collections.map.AbstractHashedMap.put(AbstractHashedMap.java:273). > > The OFBiz log showed the same. A packing session was being completed and > gets stuck on that put function. The thread stack is pasted below. > > I am wondering if this rings any bells with some of the more veteran > developers. I found this URL > (http://www.mail-archive.com/[email protected]/msg14324.html) which seems > to be related to my issue. I also saw that on 4/29/2007 (revision 533476) > that the commons jars were updated.
Sure does. Incorrect locking on the map, multiple threads running, one tries a modification while another is reading, so the reading thread ends up getting stuck following a ptr->ptr_to_itself kinda loop, and deadlock+hilarity ensues. > OFBiz 4.0 seems to using the old commons-collections. Before I start > replacing my commons jars, I wanted to see if anyone had any knowledge of > this situation. Replacing commons-collections with a newer version won't fix the problem, as it's ofbiz's use of it that is wrong. But it might be fixed in later versions.
