You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by Marco Laponder <ma...@kewill.com> on 2010/03/22 19:56:43 UTC

unexpected high cpu load

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. 

Kind regards,
Marco Laponder




Re: unexpected high cpu load

Posted by Kevan Miller <ke...@gmail.com>.
On Mar 24, 2010, at 4:06 AM, Marco Laponder wrote:

> Thanks Kevan ! As soon I am able to build the 2.2 branch (it now fails
> and is has been failing for a few days now if I check
> http://people.apache.org/builds/geronimo/server/binaries/2.2/ ) I will
> give it a try.

Ah. Nobody updated dependency version to our new txmanager release. Should be fixed, now.

--kevan

RE: unexpected high cpu load

Posted by Marco Laponder <ma...@kewill.com>.
Thanks Kevan ! As soon I am able to build the 2.2 branch (it now fails
and is has been failing for a few days now if I check
http://people.apache.org/builds/geronimo/server/binaries/2.2/ ) I will
give it a try.

Kind regards,
Marco

-----Oorspronkelijk bericht-----
Van: Kevan Miller [mailto:kevan.miller@gmail.com] 
Verzonden: dinsdag 23 maart 2010 18:32
Aan: user@geronimo.apache.org
Onderwerp: Re: unexpected high cpu load


On Mar 23, 2010, at 2:53 AM, Marco Laponder wrote:

> I have create a jira for this issue
> 
> https://issues.apache.org/jira/browse/GERONIMO-5200

Thanks Marco. Should be fixed in branches/2.1 and branches/2.2 (not
needed in trunk).

--kevan

Re: unexpected high cpu load

Posted by Kevan Miller <ke...@gmail.com>.
On Mar 23, 2010, at 2:53 AM, Marco Laponder wrote:

> I have create a jira for this issue
> 
> https://issues.apache.org/jira/browse/GERONIMO-5200

Thanks Marco. Should be fixed in branches/2.1 and branches/2.2 (not needed in trunk).

--kevan

RE: unexpected high cpu load

Posted by Marco Laponder <ma...@kewill.com>.
I have create a jira for this issue

https://issues.apache.org/jira/browse/GERONIMO-5200

Kind regards,
Marco

-----Oorspronkelijk bericht-----
Van: Kevan Miller [mailto:kevan.miller@gmail.com] 
Verzonden: maandag 22 maart 2010 21:05
Aan: user@geronimo.apache.org
Onderwerp: Re: unexpected high cpu load


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

Re: unexpected high cpu load

Posted by Kevan Miller <ke...@gmail.com>.
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