|
Is there any plan on applying this patch to a release soon? This has been a long standing bug. In my application a work around is difficult as the queries are dynamic and I will have to do a lot of rework to control the size on the in clauses. I have created a test case (attached at HHH-1123, LongInElementsTest.java and Animal.hbm.xml) and I tried increase the elements in "in" to 10000, even that I cant reproduce this issue, can anyone tell me where am wrong? Try a smaller stack size (e.g. -Xss64k). If it does not reproduce, try a syntax error after some hundred elements in order to see if the stack trace still shows recursion. Hi Thomas, -Xss64k does not work would you guys tell me more detail when you run into this exception, such as OS, JDK VERSION... JDK 1.4 256K of address space per thread --------- I tried "where (x=1 or x=2 or x=3 .....)" (3000 elements) Did you also try "in"? I guess the error is in that cause only. What happens with -Xss64k? This should reduce the stack size per thread, at least for Sun JDK, Windows and Linux. Thomas, yes, I tried "... x in :x" first with my test case, it passes (>3000) nothing happes with -Xss64k on my Mac, it passes btw, why do you want to use this to reduce stack size? just for reproducing this issue? In the original defective code, each element in the "in" list require one or more stack frames. Reducing the stack size forces the error at a smaller collection size. But if it does not show up anymore, I guess the recursion has already been refactored. Can you maybe implement a list wrapper that throws an exception at element 300, for instance? hey, I have reproduced this issue on Linux, with "-Xss64k" looks like the patch doesn't work... weird thing is that I cant reproduce it without -Xss64k even I hvae increase the in elements to 59000.... testLongInElementsByHQL(org.hibernate.test.criteria.LongInElementsTest) Time elapsed: 0.653 sec <<< ERROR! sorry for the last stack: testLongInElementsByHQL(org.hibernate.test.criteria.LongInElementsTest) Time elapsed: 1.467 sec <<< ERROR! Yeah, that's the bad stack. Means the error is still in (or if this is with the patch, it does not work). sorry, the patch is fine, at least for my test case Oh, if the test case fails without the patch, but succeeds with it, everything is ok. I am commenting only, sorry for confusing. the algorithm in org.hibernate.hql.ast.util.NodeTraverser is not correct, it causes ok, done, i changed the algorithm I see that this issue is resolved in trunk and in the 3.3.1 branch, but if you download 3.3.1.GA, it is not resolved in the source bundled in that download. This is also true for hibernate 3.3.2.GA. However, the issue does appear to be resolved in 3.5.0-Beta-4. Here are the download links I am referring to: I'm confused about why this fix isn't included in 3.3.1. Is there any reason I shouldn't download the source for 3.3.1, replace the source code for this file with the latest version from trunk, and rebuild? Thanks. Built 3.5.0 Beta 4 with maven and the test is failing: ------------------------------------------------------------------------------- Benjamin Truitt: the fix version means I fixed this issue in and we haven't release a new 3.3.x to community yet, 3.3.1.ga and 3.3.2.ga was released a couple month ago, so of course, this fix is not in these two release. Manuel Dominguez Sarmiento, I just ran this test locally again, and do not see the test failure, would you please provide more info? All I did was build the project with Maven from the 3.5.0 beta 4 distribution. It was the only test that failed. which OS you're using? Windows XP SP3 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Linking to
HHH-1985which is a duplicate of this bug.