-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Describe the Issue
Environment:
- Build image: container-registry.oracle.com/graalvm/native-image:25-muslib
- Static musl build (Spring Boot 3.5.6 demo)
- Command uses -march=compatibility (also repros with -march=x86-64)
- GraalVM 24 works on the same target hosts
Target host:
- Intel Xeon E5-2695 v2 (Ivy Bridge) – no 'bmi2' in /proc/cpuinfo flags
Symptom:
- The binary starts, Tomcat initializes, then SIGILL.
- GDB shows SIGILL at RIP 0x2cdb685 executing
shlx %rbx,%rax,%rax
(BMI2), i.e. BMI2 path gets executed without a runtime CPU feature guard. - AVX/AVX2 instructions do appear in the text segment (objdump), which could be fine if guarded; however the crash is caused by BMI2.
What I expect:
- With -march=compatibility or -march=x86-64, native-image should never execute BMI2/AVX2 on legacy x86_64.
- If higher-ISA fast paths are present, they must be protected by CPU feature checks.
What I tried:
- Also tried runtime flags to disable OpenSSL/Netty, issue still reproduces.
- The same app built with GraalVM 24 runs fine on the same machine.
Attachments:
- gdb-stdout.txt (shows RIP and
shlx
) - sysinfo.txt (lscpu + /proc/cpuinfo first flags line; no 'bmi2')
- avx2-grep.txt and avx-bmi-grep.txt (objdump findings)
- crash-slice.s (objdump around the crashing address)
- r_client binary (stripped; available; can rebuild with -g if needed)
- gdb-session.log
Using the latest version of GraalVM can resolve many issues.
- I tried with the latest version of GraalVM.
GraalVM Version
25-graal
Operating System and Version
container-registry.oracle.com/graalvm/native-image:25-muslib
Troubleshooting Confirmation
- I tried the suggestions in the troubleshooting guide.
Run Command
./sigill-capture.sh ./r_client
Expected Behavior
Hope it works properly and meets compatibility standards
Actual Behavior
Illegal instruction
Steps to Reproduce
All compressed files have been included in this discussion
Additional Context
No response
Run-Time Log Output and Error Messages
2025-09-25T11:35:48.381+08:00 INFO 914482 --- [ main] com.semicons.github.OBApplication : Starting AOT-processed OBApplication v0.0.1-SNAPSHOT using Java 25 with PID 914482 (/root/test/r_client started by root in /root/test)
2025-09-25T11:35:48.382+08:00 INFO 914482 --- [ main] com.semicons.github.OBApplication : No active profile set, falling back to 1 default profile: "default"
2025-09-25T11:35:48.433+08:00 INFO 914482 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port 8080 (http)
2025-09-25T11:35:48.437+08:00 INFO 914482 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2025-09-25T11:35:48.437+08:00 INFO 914482 --- [ main] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/10.1.46]
Illegal instruction