Stack overflow in JoinProcessor.doFindAllNodes

Description

Problem

JoinProcessor.doFindAllNodes fails with a StackOverflowError if you have a query like FROM Foo WHERE id IN :ids with lots of IDs as parameter.

Suggested solution:

Change the sibling processing from recursive to iterative:

Activity

Show:

Christian Beikov November 28, 2019 at 6:07 PM

Should be fixed as changed this part of the code

Stephen Devine November 28, 2019 at 8:52 AM

Is this issue limited to version 5.4.5, i.e. has it been resolved in a later release up to 5.4.9? I've looked in direct release notes and can't see anything mentioning this issue directly, but I do note that that affected versions in this Jira show 5.4.5 only.

Christian Beikov November 12, 2019 at 1:44 PM

Mathieu Gueurce November 12, 2019 at 8:51 AM

The solution proposed by Dennis Shirazi is not working properly. Based on his solution, we solved this issue with this :

 

Hope this can help…

Lumír Návrat November 12, 2019 at 6:54 AM

Exists in 5.4.8. Final too:(

I migrated from 5.4.1.Final JDK8 to OpenJDK11 and latest Hibernate. During run intergration test in our environment got this bug too:

Caused by: java.lang.StackOverflowError
at org.hibernate.hql.internal.ast.util.JoinProcessor.doFindAllNodes(JoinProcessor.java:113) [hibernate-core-5.4.8.Final.jar:5.4.8.Final]

Our use case is reading of max postgresql bindable parameters: 32767.

so would be nice to have it fixed.

Out of Date

Details

Assignee

Reporter

Worked in

Fix versions

Affects versions

Priority

Created September 23, 2019 at 3:07 PM
Updated November 28, 2019 at 7:33 PM
Resolved November 28, 2019 at 6:07 PM