Stack Overflow in catalin.out running 11.6.1

I found this message in my catalina.out. It seems that this errror slows down the rendering when it occurs.
Is there something I can do to avoid this ?

2019-08-13 14:08:33,452 [Notification event executor: count : 4true/20xwiki:XWiki.barmeier///////21//////8projekte/true : 8] ERROR .r.i.NotificationEventExecutor - Failed to retrieve notifications for cache key [4true/20xwiki:XWiki.barmeier///////21//////8projekte/true] 
java.lang.StackOverflowError: null
	at antlr.TokenBuffer.LA(TokenBuffer.java:80)
	at antlr.LLkParser.LA(LLkParser.java:52)
	at org.hibernate.hql.internal.ast.HqlParser.handlePrimaryExpressionDotIdent(HqlParser.java:390)
	at org.hibernate.hql.internal.antlr.HqlBaseParser.atom(HqlBaseParser.java:3548)
	at org.hibernate.hql.internal.antlr.HqlBaseParser.unaryExpression(HqlBaseParser.java:3401)
	at org.hibernate.hql.internal.antlr.HqlBaseParser.multiplyExpression(HqlBaseParser.java:3273)
	at org.hibernate.hql.internal.antlr.HqlBaseParser.additiveExpression(HqlBaseParser.java:2930)
	at org.hibernate.hql.internal.antlr.HqlBaseParser.concatenation(HqlBaseParser.java:615)
	at org.hibernate.hql.internal.antlr.HqlBaseParser.relationalExpression(HqlBaseParser.java:2697)
	at org.hibernate.hql.internal.antlr.HqlBaseParser.equalityExpression(HqlBaseParser.java:2558)

This stackoverflow feels like a bug, would be great if you could report a jira at https://jira.xwiki.org with details on how to reproduce. Thanks (and sorry for the problem!).

A StackOverflowError is simply signals that there is no more memory available. It is to the stack what an OutOfMemoryError is to the heap: it simply signals that there is no more memory available. JVM has a given memory allocated for each stack of each thread, and if an attempt to call a method happens to fill this memory, JVM throws an error. Just like it would do if you were trying to write at index N of an array of length N. No memory corruption can happen. The stack can not write into the heap.

The common cause for a stackoverflow is a bad recursive call. Typically, this is caused when your recursive functions doesn’t have the correct termination condition, so it ends up calling itself forever. Or when the termination condition is fine, it can be caused by requiring too many recursive calls before fulfilling it.

Here’s an example:

public class Overflow {
    public static final void main(String[] args) {
        main(args);
    }
}

That function calls itself repeatedly with no termination condition. Consequently, the stack fills up because each call has to push a return address on the stack, but the return addresses are never popped off the stack because the function never returns, it just keeps calling itself.