uima-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marshall Schor (JIRA)" <...@uima.apache.org>
Subject [jira] [Resolved] (UIMA-1248) ResourceManager initialization is not thread-safe
Date Fri, 11 Apr 2014 19:12:15 GMT

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

Marshall Schor resolved UIMA-1248.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 2.6.0SDK
         Assignee: Marshall Schor  (was: Adam Lally)

> ResourceManager initialization is not thread-safe
> -------------------------------------------------
>
>                 Key: UIMA-1248
>                 URL: https://issues.apache.org/jira/browse/UIMA-1248
>             Project: UIMA
>          Issue Type: Bug
>          Components: Core Java Framework
>    Affects Versions: 2.2.2, 2.3
>            Reporter: Adam Lally
>            Assignee: Marshall Schor
>            Priority: Minor
>             Fix For: 2.6.0SDK
>
>
> If multiple threads concurrently call UIMAFramework.produceAnalysisEngine and pass the
same instance of ResourceManager as an argument, you can get intermittent exceptions in the
ResourceManager such as:
> java.lang.ArrayIndexOutOfBoundsException
>   at java.lang.System.arraycopy(Native Method)
>   at java.util.ArrayList.ensureCapacity(ArrayList.java:170)
>   at java.util.ArrayList.add(ArrayList.java:351)
>   at org.apache.uima.resource.impl.CasManager_impl.addMetaData(CasManager_impl.java:82)
>   at org.apache.uima.analysis_engine.impl.AnalysisEngineImplBase.initialize(AnalysisEngineImplBase.java:115)
>   at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initialize(AggregateAnalysisEngine_impl.java:126)
> The workaround is to synchronize the calls to UIMAFramework.produceAnalysisEngine.  
However, this is suboptimal if annotator initialization is expensive and you want it to be
run in parallel on multiple cores.  We should consider adding synchronization to the ResourceManager
(and the classes it delegates to such as CasManager) to allow this to work.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message