Quarkus native image crashes

932 views Asked by At

I have successfully built a native image with Quarkus/Graal and I can run it in the terminal (no container yet). However, it crashes with "Segmentation fault (core dumped)" message. How can I get more information about the error? Are there flags to pass to the native executable or while building the image?

I am using GraalVM Version 20.2.0 (Java Version 11.0.8)

Any help is much appreciated.

Thanks.

2

There are 2 answers

0
Oleg Šelajev On

This could be a bug in the native image implementation. Please report it to the GraalVM team: github.com/oracle/graal.

You can also try debugging the executable: https://github.com/oracle/graal/blob/master/substratevm/DebugInfo.md

You can also build native image with a different level of optimizations passing the flag -H:Optimize=N where N is 0, 1, 2. Maybe there will be a difference in behavior -- suggesting a bug in the compiler.

When building the native image are you using something like --report-unsupported-elements-at-runtime? If yes, try removing it, maybe it tells you what can be wrong. The same with the --allow-incomplete-classpath?

In general, the best is to report it to the GraalVM team.

0
suhasghorp On

It was a condition in my code that caused this behavior. After I fixed the code, native image works like a charm now. Thanks for your help.