You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Peter Royal <pr...@pace2020.com> on 2003/06/12 23:20:08 UTC

[event] PooledExecutor locking up?

It appears that my PooledExecutor is locking up... From a thread dump:

"Thread-6" prio=1 tid=0x0x8637fc8 nid=0x1292 in Object.wait()  
[89bcd000..89bcd830]
         at java.lang.Object.wait(Native Method)
         - waiting on <0x4dde3d28> (a  
EDU.oswego.cs.dl.util.concurrent.LinkedNode)
         at java.lang.Object.wait(Object.java:426)
         at  
EDU.oswego.cs.dl.util.concurrent.SynchronousChannel.put(SynchronousChann 
el.java:152)
         - locked <0x4dde3d28> (a  
EDU.oswego.cs.dl.util.concurrent.LinkedNode)
         at  
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$WaitWhenBlocked.blockedA 
ction(PooledExecutor.java:773)
         at  
EDU.oswego.cs.dl.util.concurrent.PooledExecutor.execute(PooledExecutor.j 
ava:872)
         at  
org.apache.excalibur.event.command.AbstractThreadManager.run(AbstractThr 
eadManager.java:268)
         at  
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecuto 
r.java:725)
         at java.lang.Thread.run(Thread.java:536)

I'm really unsure of how to go about properly fixing that.. as a  
workaround I'm going to modify TPCThreadManager to not block  
(PoolExecutor.discardOldestWhenBlocked())
-pete


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


Re: [event] PooledExecutor locking up?

Posted by Peter Royal <pr...@apache.org>.
On Thursday, June 12, 2003, at 06:52  PM, Shash Chatterjee wrote:
> I am also noticing (when debugging using Eclipse under Win-XP as well 
> as Solaris) that there is a new thread being created rapidly about 
> once a second and which dies (at least disappears) quickly.  Whenever 
> I've been able to suspend it, the thread stack is:
> Thread [Thread-293] (Suspended)                                        
>           Object.wait(long) line: not available [native method]        
>                     SynchronousChannel.poll(long) line: 353            
>                               PooledExecutor.getTask() line: 707       
>                                         PooledExecutor$Worker.run() 
> line: 731                                            Thread.run() 
> line: 536 [local variables unavailable]
> (without the TPCThreadManager).  I've no clue where this thread is 
> created ....any ideas?

according to the documentation, the PooledExecutor will create a new 
thread if there is work to be done and there aren't enough free 
threads. I believe that thread won't stick around (or it can stick 
around for a configurable amount of time) before dying..

My suggestion would be to increase the number of threads that the 
TPCThreadManager is using and see if that behavior goes away..
-pete


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


Re: [event] PooledExecutor locking up?

Posted by Shash Chatterjee <sh...@hotmail.com>.
Pete,

I am also noticing (when debugging using Eclipse under Win-XP as well as 
Solaris) that there is a new thread being created rapidly about once a 
second and which dies (at least disappears) quickly.  Whenever I've been 
able to suspend it, the thread stack is:
Thread [Thread-293] 
(Suspended)                                                
   Object.wait(long) line: not available [native 
method]                       
      SynchronousChannel.poll(long) line: 
353                                  
         PooledExecutor.getTask() line: 
707                                    
            PooledExecutor$Worker.run() line: 
731                              
               Thread.run() line: 536 [local variables unavailable]
(without the TPCThreadManager).  I've no clue where this thread is 
created ....any ideas?

This is of course using Fortress....

Shash

Peter Royal wrote:

> It appears that my PooledExecutor is locking up... From a thread dump:
>
> "Thread-6" prio=1 tid=0x0x8637fc8 nid=0x1292 in Object.wait()  
> [89bcd000..89bcd830]
>         at java.lang.Object.wait(Native Method)
>         - waiting on <0x4dde3d28> (a  
> EDU.oswego.cs.dl.util.concurrent.LinkedNode)
>         at java.lang.Object.wait(Object.java:426)
>         at  
> EDU.oswego.cs.dl.util.concurrent.SynchronousChannel.put(SynchronousChann 
> el.java:152)
>         - locked <0x4dde3d28> (a  
> EDU.oswego.cs.dl.util.concurrent.LinkedNode)
>         at  
> EDU.oswego.cs.dl.util.concurrent.PooledExecutor$WaitWhenBlocked.blockedA 
> ction(PooledExecutor.java:773)
>         at  
> EDU.oswego.cs.dl.util.concurrent.PooledExecutor.execute(PooledExecutor.j 
> ava:872)
>         at  
> org.apache.excalibur.event.command.AbstractThreadManager.run(AbstractThr 
> eadManager.java:268)
>         at  
> EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecuto 
> r.java:725)
>         at java.lang.Thread.run(Thread.java:536)
>
> I'm really unsure of how to go about properly fixing that.. as a  
> workaround I'm going to modify TPCThreadManager to not block  
> (PoolExecutor.discardOldestWhenBlocked())
> -pete




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org