You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by "Marshall Schor (JIRA)" <de...@uima.apache.org> on 2013/11/18 22:43:20 UTC

[jira] [Updated] (UIMA-3433) UIMA-AS cleanup of semaphore testing wrong thing

     [ https://issues.apache.org/jira/browse/UIMA-3433?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marshall Schor updated UIMA-3433:
---------------------------------

    Environment: Fails on IBM Java 7 SR5 with error saying too many permits.  Earlier versions of this Java (e.g. v 6) don't give this message.

> UIMA-AS cleanup of semaphore testing wrong thing
> ------------------------------------------------
>
>                 Key: UIMA-3433
>                 URL: https://issues.apache.org/jira/browse/UIMA-3433
>             Project: UIMA
>          Issue Type: Bug
>          Components: Async Scaleout
>    Affects Versions: 2.4.2AS
>         Environment: Fails on IBM Java 7 SR5 with error saying too many permits.  Earlier versions of this Java (e.g. v 6) don't give this message.
>            Reporter: Marshall Schor
>            Assignee: Marshall Schor
>            Priority: Minor
>
> There is a test to clear a semaphore in uima-as as part of the stop method, which does 
> {code:borderStyle=solid}
> 	// release all permits
> 	  if ( semaphore != null ) {
> 		  while ( semaphore.availablePermits() > 0) {
> 		  		semaphore.release();
> 	  	  }
> 	  }
> {code}
> Stepping through this shows that each call to release() increases (not decreases) the number of availablePermits.
> Replace with drainPermits(), which appears to be the intent.



--
This message was sent by Atlassian JIRA
(v6.1#6144)