You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
linux-amd64 native library in 1.13.0/1.14.0 requires AVX2/BMI2 (x86-64-v3), SIGILL on older CPUs #186
Since 1.13.0, net/jpountz/util/linux/amd64/liblz4-java.so is compiled for x86-64-v3 (AVX2, BMI2, LZCNT, MOVBE). On x86-64 CPUs without those extensions the JVM aborts with SIGILL the first time the JNI implementation is used. 1.12.1 and earlier run fine on the same machine.
This looks unintentional: the release notes for 1.13.0 and 1.14.0 don't mention a new CPU baseline, and nothing in the build configuration changed between 1.12.1 and 1.13.0.
Crash
lz4-java 1.14.0, Temurin 25.0.5, linux-amd64, Intel Xeon E5-2640 (Sandy Bridge: AVX, no AVX2/BMI2). Triggered by the Kafka client's first use of lz4.
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGILL (0x4) at pc=0x00007f9e85c30d8c, pid=5330, tid=5403
#
# Problematic frame:
# C [liblz4-java-17693407819068721459.so+0x20d8c] XXH32+0x4c
The linux-i386 library (same GCC, -m32) and the windows-amd64 DLL in 1.14.0 contain no AVX2/BMI2 code. I did not check the darwin-x86_64 library.
Likely cause
The Linux natives are built in .github/workflows/build-all-and-publish.yml on runs-on: ubuntu-latest, and the amd64 flags (-O2 ... -mno-omit-leaf-frame-pointer -fcf-protection) contain no -march, so the baseline is whatever the runner's GCC defaults to.
GitHub is migrating ubuntu-latest to Ubuntu 26.04 between 19 Oct and 19 Nov 2026 (actions/runner-images#14748). 1.12.1 was released on 22 Oct and still built on 24.04; 1.13.0 on 4 Nov built with the new toolchain. The 26.04 image uses Ubuntu's amd64v3 package variant (actions/runner-images#14600), and other projects report that its GCC is configured with --with-arch-64=x86-64-v3 (for example Pagefind/pagefind#1425). That would also explain why the -m32 build is unaffected. I have not confirmed the GCC default from an official source.
Your diagnosis was right: since ubuntu-latest moved to Ubuntu 26.04, the toolchain defaults (and the prebuilt libgcc/CRT objects that end up in the library) targeted newer CPUs. Besides amd64 (x86-64-v3), this also affected s390x (z15) and riscv64 (RVA23).
The Linux natives are built in a pinned Debian stable container, with an explicit CPU baseline per arch: x86-64, i686, armv8-a, POWER8 (lower than the POWER9 of earlier releases), z13 and rv64gc. The Windows DLL is now plain x86-64 too; earlier releases contained SSE3.
CI checks every native library in the jar for instructions above its baseline, for the minimum glibc/macOS version and for its library dependencies (scripts/check_natives.py), and runs that check against the 1.13.0 jar as a regression test.
The 1.14.1 Linux natives also pass a compress/decompress round trip under QEMU emulating a Sandy Bridge CPU.
Activity
Build Linux natives on ubuntu-24.04 to restore the CPU baseline
yawkat commentedon Nov 16, 2026
Fixed in 1.14.1, thanks for the detailed report.
Your diagnosis was right: since
ubuntu-latestmoved to Ubuntu 26.04, the toolchain defaults (and the prebuilt libgcc/CRT objects that end up in the library) targeted newer CPUs. Besides amd64 (x86-64-v3), this also affected s390x (z15) and riscv64 (RVA23).In 1.14.1 (#187):
scripts/check_natives.py), and runs that check against the 1.13.0 jar as a regression test.The 1.14.1 Linux natives also pass a compress/decompress round trip under QEMU emulating a Sandy Bridge CPU.
Update skafka from 21.0.4 to 21.0.5 (lz4-java to 1.14.1) (#1059)
Update skafka from 21.0.4 to 21.0.5 (lz4-java to 1.14.1) (#999)