You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by "Adam Lally (JIRA)" <ui...@incubator.apache.org> on 2008/12/10 16:18:44 UTC
[jira] Created: (UIMA-1248) ResourceManager initialization is not
thread-safe
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
Reporter: Adam Lally
Assignee: Adam Lally
Priority: Minor
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 is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (UIMA-1248) ResourceManager initialization is not
thread-safe
Posted by "Marshall Schor (JIRA)" <ui...@incubator.apache.org>.
[ https://issues.apache.org/jira/browse/UIMA-1248?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Marshall Schor updated UIMA-1248:
---------------------------------
Affects Version/s: 2.3
defer past 2.3.0
> 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: Adam Lally
> Priority: Minor
>
> 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 is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.