Hi Peter,

There are no external AEs in our pipeline. We parallelise on the EC2 instances 
using multiple threads with the CPE, and we scale the EC2 instances using a 
custom AWS setup, but the EC2 instances are independent of each other, so that 
shouldn’t play a role.

Cheers,
Mario











> On 12 Nov 2019, at 09:13 , Peter Klügl <peter.klu...@averbis.com> wrote:
> 
> Hi,
> 
> 
> Ruta stores FS objects, but should of course clean them up when a new
> CAS is processed.
> 
> We had some problems with wrong FS caused by a class loader switch. Do
> you use external analysis engines in your Ruta script?
> 
> 
> I actually do not think that one of those is the source of the problem
> because the exception should be reproducible then.
> 
> How do you pallalelize?
> 
> 
> Best,
> 
> 
> Peter
> 
> Am 11.11.2019 um 22:12 schrieb Mario Juric:
>> Best Regards,
>> 
>> Mario Juric
>> Principal Engineer
>> UNSILO.ai <http://unsilo.ai/ <http://unsilo.ai/>>
>> mobile:  +45 3082 4100
>> skype: mario.juric.dk
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> Hi,
>> 
>> Sorry for not posting the versions right away. This particular older setup 
>> runs with UIMA version 2.10.2 and Ruta 2.6.1.
>> 
>> According to my source code CASImpl.ll_getFSRef is calling 
>> FeatureStructureImpl.toString when creating a CASRuntimeException at line 
>> 3653 as specified by the stack trace (UIMA core version 2.10.2). The 
>> exception is a CASRuntimeException.DEREF_FS_OTHER_CAS, which appears to 
>> happen when a feature structure reference is set to a FS that belongs to a 
>> completely different CAS. I am puzzled how that can happen inside a Ruta 
>> script that is applied to a single view only, and I am pretty sure we have 
>> nothing doing stuff across multiple CAS’ in our pipeline. We’ve only seen 
>> this exception in a Ruta context so far, but they are rare and not 
>> reproducible after a second run.
>> 
>> Cheers
>> Mario
>> 
>> 
>>> On 11 Nov 2019, at 15:58 , Marshall Schor <m...@schor.com> wrote:
>>> 
>>> This stack trace seems impossible, because the 3rd line shows
>>> 
>>> CASImpl.ll_getFSRef calling a FeatureStructureImpl.toString method, which I
>>> believe it doesn't do.
>>> 
>>> -M
>>> 
>>> On 11/11/2019 3:58 AM, Mario Juric wrote:
>>>> Hi Peter,
>>>> 
>>>> A while ago we started to get some erratic null pointer exceptions from 
>>>> Ruta because the type of some feature structure element is null (see stack 
>>>> trace below). The error is not consistently reproducible, in fact it 
>>>> seldomly occurs and when reprocessing the document it doesn’t happen 
>>>> again. We therefore think there are some race conditions at play when 
>>>> running in a multithreaded environment as we do in production, and I was 
>>>> hoping that maybe you would get an idea what might be causing it just by 
>>>> looking at the stack trace.
>>>> 
>>>> Cheers
>>>> Mario
>>>> 
>>>> java.lang.NullPointerException at 
>>>> org.apache.uima.cas.impl.FeatureStructureImpl.prettyPrint(FeatureStructureImpl.java:501)
>>>>  at 
>>>> org.apache.uima.cas.impl.FeatureStructureImpl.prettyPrint(FeatureStructureImpl.java:483)
>>>>  at 
>>>> org.apache.uima.cas.impl.FeatureStructureImpl.toString(FeatureStructureImpl.java:472)
>>>>  at 
>>>> org.apache.uima.cas.impl.FeatureStructureImpl.toString(FeatureStructureImpl.java:467)
>>>>  at org.apache.uima.cas.impl.CASImpl.ll_getFSRef(CASImpl.java:3653) at 
>>>> org.apache.uima.cas.impl.FeatureStructureImpl.setFeatureValue(FeatureStructureImpl.java:61)
>>>>  at 
>>>> org.apache.uima.ruta.RutaStream.assignFeatureValue(RutaStream.java:1140) 
>>>> at 
>>>> org.apache.uima.ruta.RutaStream.assignFeatureValues(RutaStream.java:1020) 
>>>> at org.apache.uima.ruta.action.CreateAction.execute(CreateAction.java:74) 
>>>> at 
>>>> org.apache.uima.ruta.rule.AbstractRuleElement.apply(AbstractRuleElement.java:133)
>>>>  at 
>>>> org.apache.uima.ruta.rule.RuleElementCaretaker.applyRuleElements(RuleElementCaretaker.java:121)
>>>>  at 
>>>> org.apache.uima.ruta.rule.ComposedRuleElement.applyRuleElements(ComposedRuleElement.java:621)
>>>>  at 
>>>> org.apache.uima.ruta.rule.AbstractRuleElement.doneMatching(AbstractRuleElement.java:86)
>>>>  at 
>>>> org.apache.uima.ruta.rule.ComposedRuleElement.fallback(ComposedRuleElement.java:526)
>>>>  at 
>>>> org.apache.uima.ruta.rule.ComposedRuleElement.fallbackContinue(ComposedRuleElement.java:419)
>>>>  at 
>>>> org.apache.uima.ruta.rule.RutaRuleElement.startMatch(RutaRuleElement.java:103)
>>>>  at 
>>>> org.apache.uima.ruta.rule.ComposedRuleElement.startMatch(ComposedRuleElement.java:76)
>>>>  at org.apache.uima.ruta.rule.RutaRule.apply(RutaRule.java:63) at 
>>>> org.apache.uima.ruta.rule.RutaRule.apply(RutaRule.java:54) at 
>>>> org.apache.uima.ruta.rule.RutaRule.apply(RutaRule.java:36) at 
>>>> org.apache.uima.ruta.block.RutaScriptBlock.apply(RutaScriptBlock.java:67) 
>>>> at org.apache.uima.ruta.RutaModule.apply(RutaModule.java:56) at 
>>>> org.apache.uima.ruta.engine.RutaEngine.process(RutaEngine.java:561) at 
>>>> org.apache.uima.analysis_component.JCasAnnotator_ImplBase.process(JCasAnnotator_ImplBase.java:48)
>>>>  at 
>>>> org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.callAnalysisComponentProcess(PrimitiveAnalysisEngine_impl.java:401)
>>>>  at 
>>>> org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.processAndOutputNewCASes(PrimitiveAnalysisEngine_impl.java:318)
>>>>  at 
>>>> org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.processUntilNextOutputCas(ASB_impl.java:570)
>>>>  at 
>>>> org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.<init>(ASB_impl.java:412)
>>>>  at 
>>>> org.apache.uima.analysis_engine.asb.impl.ASB_impl.process(ASB_impl.java:344)
>>>>  at 
>>>> org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.processAndOutputNewCASes(AggregateAnalysisEngine_impl.java:271)
>>>>  at 
>>>> org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.processUntilNextOutputCas(ASB_impl.java:570)
>>>>  at 
>>>> org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.<init>(ASB_impl.java:412)
>>>>  at 
>>>> org.apache.uima.analysis_engine.asb.impl.ASB_impl.process(ASB_impl.java:344)
>>>>  at 
>>>> org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.processAndOutputNewCASes(AggregateAnalysisEngine_impl.java:271)
>>>>  at 
>>>> org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.processUntilNextOutputCas(ASB_impl.java:570)
>>>>  at 
>>>> org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.<init>(ASB_impl.java:412)
>>>>  at 
>>>> org.apache.uima.analysis_engine.asb.impl.ASB_impl.process(ASB_impl.java:344)
>>>>  at 
>>>> org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.processAndOutputNewCASes(AggregateAnalysisEngine_impl.java:271)
>>>>  at 
>>>> org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.processUntilNextOutputCas(ASB_impl.java:570)
>>>>  at 
>>>> org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.<init>(ASB_impl.java:412)
>>>>  at 
>>>> org.apache.uima.analysis_engine.asb.impl.ASB_impl.process(ASB_impl.java:344)
>>>>  at 
>>>> org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.processAndOutputNewCASes(AggregateAnalysisEngine_impl.java:271)
>>>>  at 
>>>> org.apache.uima.analysis_engine.impl.AnalysisEngineImplBase.process(AnalysisEngineImplBase.java:269)
>>>>  at 
>>>> org.apache.uima.collection.impl.cpm.engine.ProcessingUnit.processNext(ProcessingUnit.java:895)
>>>>  at 
>>>> org.apache.uima.collection.impl.cpm.engine.ProcessingUnit.run(ProcessingUnit.java:575)
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>> 
> -- 
> Dr. Peter Klügl
> R&D Text Mining/Machine Learning
> 
> Averbis GmbH
> Salzstr. 15
> 79098 Freiburg
> Germany
> 
> Fon: +49 761 708 394 0
> Fax: +49 761 708 394 10
> Email: peter.klu...@averbis.com <mailto:peter.klu...@averbis.com>
> Web: https://averbis.com <https://averbis.com/>
> 
> Headquarters: Freiburg im Breisgau
> Register Court: Amtsgericht Freiburg im Breisgau, HRB 701080
> Managing Directors: Dr. med. Philipp Daumke, Dr. Kornél Markó

Reply via email to