RFR: 8328858: More runtime/stack/Stack0*.java fails intermittently on libgraal

David Holmes dholmes at openjdk.org
Mon Mar 25 01:53:21 UTC 2024


On Sun, 24 Mar 2024 10:36:45 GMT, Doug Simon <dnsimon at openjdk.org> wrote:

> While [JDK-8328312](https://bugs.openjdk.org/browse/JDK-8328312) fixed libgraal failures on `runtime/stack/Stack011.java` and `runtime/stack/Stack012.java`, other `runtime/stack/Stack0*` tests still fail:
> 
> java.lang.Exception: TEST_RFE: no stack overflow thrown, need to try deeper recursion?
>         at Stack013i.run(Stack013.java:127)
>         at Stack013.run(Stack013.java:53)
> java.lang.RuntimeException: Exception in the thread Thread[#22,Thread-2,5,]
>         at Stack013.main(Stack013.java:98)
>         at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
>         at java.base/java.lang.reflect.Method.invoke(Method.java:580)
>         at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
>         at java.base/java.lang.Thread.run(Thread.java:1575)
> Caused by: java.lang.Exception: TEST_RFE: no stack overflow thrown, need to try deeper recursion?
>         at Stack013i.run(Stack013.java:127)
>         at Stack013.run(Stack013.java:53)
> 
> 
> This PR mitigates such failures by bumping `depthToTry` by at least an order of magnitude.
> 
> The right long term fix for these tests is probably [JDK-8328859](https://bugs.openjdk.org/browse/JDK-8328859).

It is somewhat counter-intuitive that `recurse(X)` will throw `StackOverflowError` but then `recurse(2*X)` will not. It is hard to strike a balance between test coverage (e.g. we could limit these tests to running under `-Xint`) and second-guessing how a JIT might undermine the test logic. Hopefully the present adjustments will suffice in that regard.

Thanks

-------------

Marked as reviewed by dholmes (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/18465#pullrequestreview-1956754817


More information about the hotspot-runtime-dev mailing list