Hi Team,

Need help on the stack trace still appears in the logs though the flag is
enabled and the system is stable but worried about the stack trace in the
logs.

---------- Forwarded message ---------
From: Raghunath Mahakud <mahakudraghunath...@gmail.com>
Date: Thu, Mar 20, 2025 at 2:25 PM
Subject: Re: OOM issue with ruta script
To: Peter Klügl <pklu...@gmail.com>


what is the impact of enabling the flag could be less rules match and less
entity detection

On Wed, Mar 19, 2025 at 4:57 PM Raghunath Mahakud <
mahakudraghunath...@gmail.com> wrote:

> Hi Peter,
>
> any thoughts on exception stack trace though system is stable and working
>
> On Wed, Mar 19, 2025 at 9:32 AM Raghunath Mahakud <
> mahakudraghunath...@gmail.com> wrote:
>
>> https://uima.apache.org/d/ruta-current/ruta.html
>>
>> i didn't find any section for rewriting the rules.
>>
>> On Tue, Mar 18, 2025 at 8:34 PM Raghunath Mahakud <
>> mahakudraghunath...@gmail.com> wrote:
>>
>>> Hi Peter,
>>>
>>> Sorry to bug you always but can you check once why error logs and what
>>> is happening though the system is stable now?
>>>
>>> Is any optimization needed for the ruta script and the flag activation
>>> is not enough any links for that?
>>>
>>>
>>>
>>>
>>> On Tue, Mar 18, 2025 at 7:58 PM Raghunath Mahakud <
>>> mahakudraghunath...@gmail.com> wrote:
>>>
>>>> it's working after activating SimpleGreedyForComposed entities getting
>>>> extracted and the system is stable.
>>>>
>>>> But in the logs it's showing stackoverflow error,  is the above config
>>>> waits for error logs?
>>>>
>>>> but without this fix system went down and nothing works.
>>>>
>>>> Failed to run script: address
>>>> java.lang.StackOverflowError: null
>>>> at java.util.TreeMap.addEntryToEmptyMap(TreeMap.java:776) ~[?:?]
>>>> at java.util.TreeMap.put(TreeMap.java:785) ~[?:?]
>>>> at java.util.TreeMap.put(TreeMap.java:534) ~[?:?]
>>>> at java.util.TreeSet.add(TreeSet.java:255) ~[?:?]
>>>> at java.util.AbstractCollection.addAll(AbstractCollection.java:336)
>>>> ~[?:?]
>>>> at java.util.TreeSet.addAll(TreeSet.java:309) ~[?:?]
>>>> at
>>>> org.apache.uima.ruta.rule.ComposedRuleElementMatch.getTextsMatched(ComposedRuleElementMatch.java:285)
>>>> ~[ruta-core-3.3.0.jar:?]
>>>> at
>>>> org.apache.uima.ruta.rule.ComposedRuleElement.doMatch(ComposedRuleElement.java:556)
>>>> ~[ruta-core-3.3.0.jar:?]
>>>> at
>>>> org.apache.uima.ruta.rule.ComposedRuleElement.fallbackContinue(ComposedRuleElement.java:421)
>>>> ~[ruta-core-3.3.0.jar:?]
>>>> at
>>>> org.apache.uima.ruta.rule.RutaRuleElement.continueMatchSomewhereElse(RutaRuleElement.java:211)
>>>> ~[ruta-core-3.3.0.jar:?]
>>>>
>>>>
>>>> On Tue, Mar 18, 2025 at 2:46 PM Raghunath Mahakud <
>>>> mahakudraghunath...@gmail.com> wrote:
>>>>
>>>>> See my answer to the last topic how to rewrite the rules.
>>>>> Can you share the link please?
>>>>>
>>>>> On Tue, Mar 18, 2025 at 2:36 PM Peter Klügl <pklu...@gmail.com> wrote:
>>>>>
>>>>>> It changes the inference to an algorithm that does not use recursion.
>>>>>>
>>>>>>
>>>>>> About disjunctive and quantifiers: do not use "|" and no "*" or "+"
>>>>>> after parentheses.
>>>>>>
>>>>>> See my answer to the last topic how to rewrite the rules.
>>>>>>
>>>>>>
>>>>>> Best
>>>>>>
>>>>>>
>>>>>> Peter
>>>>>>
>>>>>>
>>>>>>
>>>>>> Am 18.03.2025 um 09:50 schrieb Raghunath Mahakud:
>>>>>>
>>>>>> ```
>>>>>> stream.setDynamicAnchoring(dynamicAnchoring);
>>>>>> stream.setGreedyRuleElement(false);
>>>>>> stream.setGreedyRule(false);
>>>>>> stream.setSimpleGreedyForComposed(true);
>>>>>> ```
>>>>>> now i added the new flag  setSimpleGreedyForComposed but how this
>>>>>> going to help?
>>>>>>
>>>>>> On Tue, Mar 18, 2025 at 2:11 PM Raghunath Mahakud <
>>>>>> mahakudraghunath...@gmail.com> wrote:
>>>>>>
>>>>>>> oho got now new flag setSimpleGreedyForComposed you mean we need to
>>>>>>> enable this right.
>>>>>>> but can you help in checking the ruta script once and the
>>>>>>> disjunctive composed rule elements part
>>>>>>>
>>>>>>> On Tue, Mar 18, 2025 at 2:08 PM Raghunath Mahakud <
>>>>>>> mahakudraghunath...@gmail.com> wrote:
>>>>>>>
>>>>>>>> *setGreedyRule is disabled* for us and can you see the script once
>>>>>>>> and let me know if we have any  disjunctive composed rule elements and
>>>>>>>> especially quantifiers at composed elements.
>>>>>>>> I didn't understand  this part of disjunctive composed rule
>>>>>>>> elements and especially quantifiers at composed elements.
>>>>>>>>
>>>>>>>> On Tue, Mar 18, 2025 at 2:05 PM Peter Klügl <pklu...@gmail.com>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> you should rewrite your rules and avoid the disjunctive composed
>>>>>>>>> rule elements and especially quantifiers at composed elements.
>>>>>>>>>
>>>>>>>>> The inference for those rules can "explode" leading to OOM and
>>>>>>>>> similar problems.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> There is also a parameter "simpleGreedyForComposed" which could
>>>>>>>>> try to activate.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Best
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Peter
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Am 18.03.2025 um 09:27 schrieb Raghunath Mahakud:
>>>>>>>>>
>>>>>>>>> Hi Peter,
>>>>>>>>>
>>>>>>>>> attached is the ruta script and texts we are testing with and we
>>>>>>>>> have setted
>>>>>>>>> PARAM_MAX_RULE_MATCHES and PARAM_MAX_RULE_ELEMENT_MATCHES to 12000
>>>>>>>>> but still getting OOM.
>>>>>>>>>
>>>>>>>>> When testing with vanilla ruta workbench there also the issue is
>>>>>>>>> reproducible.
>>>>>>>>>
>>>>>>>>> [image: image.png]
>>>>>>>>>
>>>>>>>>>

Reply via email to