-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Native image hangs #3241
Comments
@gustavonalle Thanks for reporting the issue |
I have a Lucene project, too, where calling the constructor of IndexWriterConfig makes the process hang with a 100% CPU utilisation. |
@gustavonalle I am getting below error, when running this progeam:
|
@gustavonalle just to clarify i got the above exception with EE and native-image is hanging with CE, |
The underlying issue here is that Lucene makes some assumptions about Java semantics that don't always hold, more exactly it relies on identity of
On SVM (and in JIT mode) the second part of the condition is optimized by the Graal escape analysis as always To fix this there are two options:
|
Looks like there is already a Lucene bug from more than a year ago: https://issues.apache.org/jira/browse/LUCENE-9117 Now I don't understand the Lucene release model enough, but I think it will be fixed in the not-yet-released version 9 of Lucene. And code like that is probably in many other projects too. So if we can detect and properly handle the pattern, it would certainly be good for compatibility. |
Should be resolved by 21d5002 - please re-open if not. |
Describe the issue
Executing the sample native image causes it to hang
Steps to reproduce the issue
git clone https://github.com/gustavonalle/lucene-graalvm
cd lucene-graalvm
mvn clean package
target/lucene-sample
(hangs)
Describe GraalVM and your environment:
Linux 5.8.18-100.fc31.x86_64 #1 SMP Mon Nov 2 20:32:55 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
openjdk version "11.0.10" 2021-01-19
OpenJDK Runtime Environment GraalVM CE 21.0.0.2 (build 11.0.10+8-jvmci-21.0-b06)
OpenJDK 64-Bit Server VM GraalVM CE 21.0.0.2 (build 11.0.10+8-jvmci-21.0-b06, mixed mode, sharing)
More details
Attaching gdb to the hang process:
gdp -p <PID>
gives:
The text was updated successfully, but these errors were encountered: