oracle / graal

GraalVM compiles Java applications into native executables that start instantly, scale fast, and use fewer compute resources 🚀
https://www.graalvm.org
Other
20.39k stars 1.64k forks source link

Static native executables using G1 GC crashes when attempting to run it (Segmentation fault) #9383

Open JohanSaur opened 3 months ago

JohanSaur commented 3 months ago

Describe the issue While it is possible to build a statically linked executable with musl and the G1 GC, it is not possible to run them. The program crashes right away with the error message Segmentation fault

Steps to reproduce the issue

  1. As build environment I used the official docker image: docker run -it --rm --entrypoint /bin/bash container-registry.oracle.com/graalvm/native-image:22-muslib
  2. I created the example program EnvMap from the section Build a Static Native Executable in your documentation: https://www.graalvm.org/latest/reference-manual/native-image/guides/build-static-executables/
  3. I built it with G1 GC instead: native-image --static --libc=musl --gc=G1 EnvMap
  4. Finally, I attempted to run it: ./envmap

Describe GraalVM and your environment:

fernando-valdez commented 3 months ago

Hello @JohanSaur, can you please share the full error message?

JohanSaur commented 3 months ago

@fernando-valdez I'm afraid the full error message is according to the description. Once you attempt to run the executable all that is printed on the screen is

Segmentation fault