New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jaotc: Error: Failed compilation due to NullPointerException #290
Comments
@dougxc , the following program can trigger the
Options:
Log:
|
Thanks for the test. However, it shows a crash on
To test with larger values of
Any larger value of |
@dougxc Thanks, Doug. Since an error can also be triggered with the latest publicly available Oracle JDK 9.0.4+11, we may verify this issue later after a stable version of the new JDK is released. |
Ok, great. Please re-open this issue or create a new one at that time. |
Doug, what is default value of InlineDuringParsingMaxDepth for recursion? In C2 it is MaxRecursiveInlineLevel=1 (it is separate from normal inlining depth limit). |
I reproduced crash with latest jdk/hs. public static NodeList getNodeListUnsafe(Node node, long offset) { Graal uses wrong Unsafe offset (0!!!): #r018 rsi:rsi : parm 0: org/graalvm/compiler/graph/Node * 00c movl R11, [RSI + RDX] # compressed ptr RSI=0x000000008d9a5a10 As result instead of field you got Object's markword: |
The default value for When you reproduced the latest crash with latest jdk/hs, what version of Graal is that using? I'm trying to find out if this is a bug that has been already fixed in github Graal. That's why it's helpful to reproduce with a Graal unit test and not rely on |
Unfortunately Graal in JDK is relatively old. Last push was on Dec 13: We waited changes for http://ol-jira.us.oracle.com/browse/GR-7679 to be propagated from jdk10 (where it was pushed) into jdk/hs. We how have it here and Igor should update Graal soon. It is tracked by: https://bugs.openjdk.java.net/browse/JDK-8194819 |
Let me update Graal locally and test with it. |
I rebuilt Graal after Igor updated it today and problems still present. Very long compilation time due to inlining of recursion and crash in C2 generated code or exception in Interpreter if disable compilation of method: 0 methods compiled, 1 methods failed (156672 ms) |
What happens if you omit the |
I've managed to find the root cause of the NPEs/crashes and can reproduce with this unit test:
We will fix it. |
I think we want to avoid the situation that leads to merge nodes with more than 65536 predecessors. |
I agree which is why we changed the default value of |
Thank you, Doug. I tested with InlineDuringParsingMaxDepth=3 and it works: Note, ignore time - I am running with fastdebug build. Also with -Xcomp flag slowdown execution too (it enforce -Xbatch). It is passed too (same time) with omit -Dgraal.InlineDuringParsingMaxDepth |
jaotc crashed in Oracle JDK 9.0.4+11 and failed compilation in OpenJDK head.
Command:
Files:
https://drive.google.com/open?id=1p2qRGKtRkayhoWdZG6tYdNSEaZfDWx3F
Output with JDK 9.0.4+11
Output with OpenJDK head
The text was updated successfully, but these errors were encountered: