On Mar 22, 2010, at 2:56 PM, Marco Laponder wrote:

> Hi,
> 
> I am experiencing,while running my web application, a very high load on
> the system where Geronimo is running (4 cpu's are busy). 
> 
> I tried to find the cause of the problem by sending a kill -3 and
> inspecting the java vm thread dump. I attached it to this mail but I
> couldn't detect the cause of the problem of the CPU usage. 
> 
> A number of threads are in the containsKey on the hashmap triggered by
> the getResource on the MultiParentClassLoader which strikes me as odd,
> can this be the source of the problem ? 
> 
> Are there other ways to determine why the CPU is load is this heavy? Any
> tips are appreciated. 

One simple test is to create several thread dumps and compare the two. Java 
profiling tools, java debugger, logging, etc. (in no particular order) are 
additional techniques...

Looking at your thread dump, I see 4 threads in 
NavigatorTalkbackMgr.getMessage() doing a wait() (I assume they have a 
relatively long or infinite wait time) and 4 threads in 
MultiParentClassLoader.getResource(). The getResource calls definitely look 
suspicious... 

I'll bet a beverage of choice that there's been a concurrent read/write on the 
resourcesNotFound HashMap, the write thread caused the HashMap to be resized, 
and the read threads are now stuck in an infinite loop in 
HashMap.containsKey(). MultiParentClassLoader.getResource() is definitely wrong 
and needs to prevent concurrent access to the resourcesNotFound HashMap.

Please create a Jira -- patches are also welcome! :)

--kevan

Reply via email to