You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by "Jerry Cwiklik (JIRA)" <ui...@incubator.apache.org> on 2010/02/19 21:32:28 UTC

[jira] Closed: (UIMA-1743) UIMA AS aggregate may hang when one of its primitive delgates fails during initialization

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

Jerry Cwiklik closed UIMA-1743.
-------------------------------

    Resolution: Fixed

Modified initializeAnalysisEngine() to destroy AE and return if a service was stopped while initializing AE in the core's produceAnalysisEngine() method. Modified postInitialize() to spin a cleanup thread and mark service as initialized only if the service is not stopped.

> UIMA AS aggregate may hang when one of its primitive delgates fails during initialization
> -----------------------------------------------------------------------------------------
>
>                 Key: UIMA-1743
>                 URL: https://issues.apache.org/jira/browse/UIMA-1743
>             Project: UIMA
>          Issue Type: Bug
>          Components: Async Scaleout
>    Affects Versions: 2.3AS
>            Reporter: Jerry Cwiklik
>            Assignee: Jerry Cwiklik
>
> There is a race condition in UIMA AS that may lead to a hang while trying to stop an aggregate service with multiple primitive delegates. If one of the delegates fails during initialization and the DD says to terminate, the aggregate sends STOP event to each delegate to force clean shutdown. When a primitive is instantiating AE via produceAnalysisEngine() call and the STOP comes on another thread, the state of the service is changed to stopped. When the AE is finally initialized and produceAnalysisEngine() returns, the code does not check for service status and proceeds to call postInitialize() which spins a cleanup thread and marks the service as initialized successfully. There are two problems:
> 1) Primitive service doesnt check if it has been stopped after produceAnalysisEngine()  returns
> 2) In postInitialize(), the primitive service always starts a cleanup thread no matter what the status of the service is. This cleanup thread is never stopped and leads to a hang.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.