You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by Jörn Kottmann <ko...@gmail.com> on 2007/11/04 22:33:58 UTC

Deadlocks in CPM tests ?

Hello,

I did build uima serveral times with maven, but in two cases
the tests block. I guess we have race conditions which lead
to deadlocks.

Here are the console output.

First case:

Running org.apache.uima.collection.impl.cpm.CpmInitTest
Initialize was called: true
Nov 4, 2007 8:32:03 PM  
org.apache.uima.collection.impl.cpm.BaseCPMImpl process
WARNING: Processing the request to stop the CPM. (Thread Name: main)
Nov 4, 2007 8:32:03 PM  
org.apache.uima.collection.impl.cpm.engine.CPMEngine process
INFO: The collection reader thread state is: 2007 (Thread Name: main)
Initialize was called: true
Nov 4, 2007 8:32:04 PM  
org.apache.uima.collection.impl.cpm.BaseCPMImpl process
WARNING: Processing the request to stop the CPM. (Thread Name: main)
Nov 4, 2007 8:32:04 PM  
org.apache.uima.collection.impl.cpm.engine.CPMEngine process
INFO: The collection reader thread state is: 1001 (Thread Name: main)
Nov 4, 2007 8:32:04 PM  
org.apache.uima.collection.impl.cpm.engine.CPMEngine process
INFO: The CPM processing unit is 0 and processing state 2004. (Thread  
Name: main)
Nov 4, 2007 8:32:04 PM  
org.apache.uima.collection.impl.cpm.engine.CPMEngine process
INFO: The CAS consumer thread state is 2001. (Thread Name: main)

Second case:
Running org.apache.uima.pear.util.ComponentCategoryTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.272  
sec
Running org.apache.uima.collection.impl.cpm.CpmStopTest
Nov 4, 2007 9:11:51 PM  
org.apache.uima.collection.impl.cpm.BaseCPMImpl process
WARNING: Processing the request to stop the CPM. (Thread Name: main)
Nov 4, 2007 9:11:51 PM  
org.apache.uima.collection.impl.cpm.engine.CPMEngine process
INFO: The collection reader thread state is: 1001 (Thread Name: main)
Nov 4, 2007 9:11:51 PM  
org.apache.uima.collection.impl.cpm.engine.CPMEngine process
INFO: The CPM processing unit is 0 and processing state 2004. (Thread  
Name: main)
Nov 4, 2007 9:11:51 PM  
org.apache.uima.collection.impl.cpm.engine.CPMEngine process
INFO: The CAS consumer thread state is 2001. (Thread Name: main)
Nov 4, 2007 9:11:51 PM  
org.apache.uima.collection.impl.cpm.container.ServiceProxyPool process
WARNING: The CAS processor pool is empty. (Thread Name: [Procesing  
Pipeline#1 Thread]::) Total size: 1 Free in pool: 0

Jörn

Re: Deadlocks in CPM tests ?

Posted by Marshall Schor <ms...@schor.com>.
hmmm - seems we should tackle this...  I can't right now, and next week
I'm in apacheCon, but if it hasn't been fixed by then, I'll take a look.

-Marshall

Michael Baessler wrote:
> Jörn Kottmann wrote:
>> Hello,
>>
>> I did build uima serveral times with maven, but in two cases
>> the tests block. I guess we have race conditions which lead
>> to deadlocks.
>>
>> Here are the console output.
>>
>> First case:
>>
>> Running org.apache.uima.collection.impl.cpm.CpmInitTest
>> Initialize was called: true
>> Nov 4, 2007 8:32:03 PM
>> org.apache.uima.collection.impl.cpm.BaseCPMImpl process
>> WARNING: Processing the request to stop the CPM. (Thread Name: main)
>> Nov 4, 2007 8:32:03 PM
>> org.apache.uima.collection.impl.cpm.engine.CPMEngine process
>> INFO: The collection reader thread state is: 2007 (Thread Name: main)
>> Initialize was called: true
>> Nov 4, 2007 8:32:04 PM
>> org.apache.uima.collection.impl.cpm.BaseCPMImpl process
>> WARNING: Processing the request to stop the CPM. (Thread Name: main)
>> Nov 4, 2007 8:32:04 PM
>> org.apache.uima.collection.impl.cpm.engine.CPMEngine process
>> INFO: The collection reader thread state is: 1001 (Thread Name: main)
>> Nov 4, 2007 8:32:04 PM
>> org.apache.uima.collection.impl.cpm.engine.CPMEngine process
>> INFO: The CPM processing unit is 0 and processing state 2004. (Thread
>> Name: main)
>> Nov 4, 2007 8:32:04 PM
>> org.apache.uima.collection.impl.cpm.engine.CPMEngine process
>> INFO: The CAS consumer thread state is 2001. (Thread Name: main)
>>
>> Second case:
>> Running org.apache.uima.pear.util.ComponentCategoryTest
>> Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.272
>> sec
>> Running org.apache.uima.collection.impl.cpm.CpmStopTest
>> Nov 4, 2007 9:11:51 PM
>> org.apache.uima.collection.impl.cpm.BaseCPMImpl process
>> WARNING: Processing the request to stop the CPM. (Thread Name: main)
>> Nov 4, 2007 9:11:51 PM
>> org.apache.uima.collection.impl.cpm.engine.CPMEngine process
>> INFO: The collection reader thread state is: 1001 (Thread Name: main)
>> Nov 4, 2007 9:11:51 PM
>> org.apache.uima.collection.impl.cpm.engine.CPMEngine process
>> INFO: The CPM processing unit is 0 and processing state 2004. (Thread
>> Name: main)
>> Nov 4, 2007 9:11:51 PM
>> org.apache.uima.collection.impl.cpm.engine.CPMEngine process
>> INFO: The CAS consumer thread state is 2001. (Thread Name: main)
>> Nov 4, 2007 9:11:51 PM
>> org.apache.uima.collection.impl.cpm.container.ServiceProxyPool process
>> WARNING: The CAS processor pool is empty. (Thread Name: [Procesing
>> Pipeline#1 Thread]::) Total size: 1 Free in pool: 0
>>
>> Jörn
> Sometimes I see the same but I have no idea why this happens.
>
> I think we have discussed this issue earlier but it seems nobody
> volunteers to look into the details.
>
> -- Michael
>
>


Re: Deadlocks in CPM tests ?

Posted by Michael Baessler <mb...@michael-baessler.de>.
Jörn Kottmann wrote:
> Hello,
>
> I did build uima serveral times with maven, but in two cases
> the tests block. I guess we have race conditions which lead
> to deadlocks.
>
> Here are the console output.
>
> First case:
>
> Running org.apache.uima.collection.impl.cpm.CpmInitTest
> Initialize was called: true
> Nov 4, 2007 8:32:03 PM org.apache.uima.collection.impl.cpm.BaseCPMImpl 
> process
> WARNING: Processing the request to stop the CPM. (Thread Name: main)
> Nov 4, 2007 8:32:03 PM 
> org.apache.uima.collection.impl.cpm.engine.CPMEngine process
> INFO: The collection reader thread state is: 2007 (Thread Name: main)
> Initialize was called: true
> Nov 4, 2007 8:32:04 PM org.apache.uima.collection.impl.cpm.BaseCPMImpl 
> process
> WARNING: Processing the request to stop the CPM. (Thread Name: main)
> Nov 4, 2007 8:32:04 PM 
> org.apache.uima.collection.impl.cpm.engine.CPMEngine process
> INFO: The collection reader thread state is: 1001 (Thread Name: main)
> Nov 4, 2007 8:32:04 PM 
> org.apache.uima.collection.impl.cpm.engine.CPMEngine process
> INFO: The CPM processing unit is 0 and processing state 2004. (Thread 
> Name: main)
> Nov 4, 2007 8:32:04 PM 
> org.apache.uima.collection.impl.cpm.engine.CPMEngine process
> INFO: The CAS consumer thread state is 2001. (Thread Name: main)
>
> Second case:
> Running org.apache.uima.pear.util.ComponentCategoryTest
> Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.272 sec
> Running org.apache.uima.collection.impl.cpm.CpmStopTest
> Nov 4, 2007 9:11:51 PM org.apache.uima.collection.impl.cpm.BaseCPMImpl 
> process
> WARNING: Processing the request to stop the CPM. (Thread Name: main)
> Nov 4, 2007 9:11:51 PM 
> org.apache.uima.collection.impl.cpm.engine.CPMEngine process
> INFO: The collection reader thread state is: 1001 (Thread Name: main)
> Nov 4, 2007 9:11:51 PM 
> org.apache.uima.collection.impl.cpm.engine.CPMEngine process
> INFO: The CPM processing unit is 0 and processing state 2004. (Thread 
> Name: main)
> Nov 4, 2007 9:11:51 PM 
> org.apache.uima.collection.impl.cpm.engine.CPMEngine process
> INFO: The CAS consumer thread state is 2001. (Thread Name: main)
> Nov 4, 2007 9:11:51 PM 
> org.apache.uima.collection.impl.cpm.container.ServiceProxyPool process
> WARNING: The CAS processor pool is empty. (Thread Name: [Procesing 
> Pipeline#1 Thread]::) Total size: 1 Free in pool: 0
>
> Jörn
Sometimes I see the same but I have no idea why this happens.

I think we have discussed this issue earlier but it seems nobody
volunteers to look into the details.

-- Michael

Re: Deadlocks in CPM tests ?

Posted by Marshall Schor <ms...@schor.com>.
I've found a fix for this, I think - the issue is a kind of race
condition that only happens with asynchronous shutdown.  I'll hold off
checking it in until we clear 2.2.1. 

-Marshall

Marshall Schor wrote:
> Thanks, Jörn, for reporting this. I think I've been able to reproduce
> this (somewhat intermittently) using the ConTest testing tool from
> http://www.alphaworks.ibm.com/tech/contest.  The failures that I see
> also occur on tests where the CPM receives an asynchronous request to
> stop the CPM.  Will investigate further.  This probably will be fixed in
> the next release (after 2.2.1).
>
> -Marshall
>
> Jörn Kottmann wrote:
>   
>> Hello,
>>
>> I did build uima serveral times with maven, but in two cases
>> the tests block. I guess we have race conditions which lead
>> to deadlocks.
>>
>> Here are the console output.
>>
>> First case:
>>
>> Running org.apache.uima.collection.impl.cpm.CpmInitTest
>> Initialize was called: true
>> Nov 4, 2007 8:32:03 PM org.apache.uima.collection.impl.cpm.BaseCPMImpl
>> process
>> WARNING: Processing the request to stop the CPM. (Thread Name: main)
>> Nov 4, 2007 8:32:03 PM
>> org.apache.uima.collection.impl.cpm.engine.CPMEngine process
>> INFO: The collection reader thread state is: 2007 (Thread Name: main)
>> Initialize was called: true
>> Nov 4, 2007 8:32:04 PM org.apache.uima.collection.impl.cpm.BaseCPMImpl
>> process
>> WARNING: Processing the request to stop the CPM. (Thread Name: main)
>> Nov 4, 2007 8:32:04 PM
>> org.apache.uima.collection.impl.cpm.engine.CPMEngine process
>> INFO: The collection reader thread state is: 1001 (Thread Name: main)
>> Nov 4, 2007 8:32:04 PM
>> org.apache.uima.collection.impl.cpm.engine.CPMEngine process
>> INFO: The CPM processing unit is 0 and processing state 2004. (Thread
>> Name: main)
>> Nov 4, 2007 8:32:04 PM
>> org.apache.uima.collection.impl.cpm.engine.CPMEngine process
>> INFO: The CAS consumer thread state is 2001. (Thread Name: main)
>>
>> Second case:
>> Running org.apache.uima.pear.util.ComponentCategoryTest
>> Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.272 sec
>> Running org.apache.uima.collection.impl.cpm.CpmStopTest
>> Nov 4, 2007 9:11:51 PM org.apache.uima.collection.impl.cpm.BaseCPMImpl
>> process
>> WARNING: Processing the request to stop the CPM. (Thread Name: main)
>> Nov 4, 2007 9:11:51 PM
>> org.apache.uima.collection.impl.cpm.engine.CPMEngine process
>> INFO: The collection reader thread state is: 1001 (Thread Name: main)
>> Nov 4, 2007 9:11:51 PM
>> org.apache.uima.collection.impl.cpm.engine.CPMEngine process
>> INFO: The CPM processing unit is 0 and processing state 2004. (Thread
>> Name: main)
>> Nov 4, 2007 9:11:51 PM
>> org.apache.uima.collection.impl.cpm.engine.CPMEngine process
>> INFO: The CAS consumer thread state is 2001. (Thread Name: main)
>> Nov 4, 2007 9:11:51 PM
>> org.apache.uima.collection.impl.cpm.container.ServiceProxyPool process
>> WARNING: The CAS processor pool is empty. (Thread Name: [Procesing
>> Pipeline#1 Thread]::) Total size: 1 Free in pool: 0
>>
>> Jörn
>>
>>     
>
>
>
>   


Re: Deadlocks in CPM tests ?

Posted by Marshall Schor <ms...@schor.com>.
Thanks, Jörn, for reporting this. I think I've been able to reproduce
this (somewhat intermittently) using the ConTest testing tool from
http://www.alphaworks.ibm.com/tech/contest.  The failures that I see
also occur on tests where the CPM receives an asynchronous request to
stop the CPM.  Will investigate further.  This probably will be fixed in
the next release (after 2.2.1).

-Marshall

Jörn Kottmann wrote:
> Hello,
>
> I did build uima serveral times with maven, but in two cases
> the tests block. I guess we have race conditions which lead
> to deadlocks.
>
> Here are the console output.
>
> First case:
>
> Running org.apache.uima.collection.impl.cpm.CpmInitTest
> Initialize was called: true
> Nov 4, 2007 8:32:03 PM org.apache.uima.collection.impl.cpm.BaseCPMImpl
> process
> WARNING: Processing the request to stop the CPM. (Thread Name: main)
> Nov 4, 2007 8:32:03 PM
> org.apache.uima.collection.impl.cpm.engine.CPMEngine process
> INFO: The collection reader thread state is: 2007 (Thread Name: main)
> Initialize was called: true
> Nov 4, 2007 8:32:04 PM org.apache.uima.collection.impl.cpm.BaseCPMImpl
> process
> WARNING: Processing the request to stop the CPM. (Thread Name: main)
> Nov 4, 2007 8:32:04 PM
> org.apache.uima.collection.impl.cpm.engine.CPMEngine process
> INFO: The collection reader thread state is: 1001 (Thread Name: main)
> Nov 4, 2007 8:32:04 PM
> org.apache.uima.collection.impl.cpm.engine.CPMEngine process
> INFO: The CPM processing unit is 0 and processing state 2004. (Thread
> Name: main)
> Nov 4, 2007 8:32:04 PM
> org.apache.uima.collection.impl.cpm.engine.CPMEngine process
> INFO: The CAS consumer thread state is 2001. (Thread Name: main)
>
> Second case:
> Running org.apache.uima.pear.util.ComponentCategoryTest
> Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.272 sec
> Running org.apache.uima.collection.impl.cpm.CpmStopTest
> Nov 4, 2007 9:11:51 PM org.apache.uima.collection.impl.cpm.BaseCPMImpl
> process
> WARNING: Processing the request to stop the CPM. (Thread Name: main)
> Nov 4, 2007 9:11:51 PM
> org.apache.uima.collection.impl.cpm.engine.CPMEngine process
> INFO: The collection reader thread state is: 1001 (Thread Name: main)
> Nov 4, 2007 9:11:51 PM
> org.apache.uima.collection.impl.cpm.engine.CPMEngine process
> INFO: The CPM processing unit is 0 and processing state 2004. (Thread
> Name: main)
> Nov 4, 2007 9:11:51 PM
> org.apache.uima.collection.impl.cpm.engine.CPMEngine process
> INFO: The CAS consumer thread state is 2001. (Thread Name: main)
> Nov 4, 2007 9:11:51 PM
> org.apache.uima.collection.impl.cpm.container.ServiceProxyPool process
> WARNING: The CAS processor pool is empty. (Thread Name: [Procesing
> Pipeline#1 Thread]::) Total size: 1 Free in pool: 0
>
> Jörn
>