GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Make the Linux artifacts loadable on musl (Alpine) again by fredericgermain · Pull Request #997 · netty/netty-tcnative Conversation
|
| build | ld-linux-* present? |
|---|---|
| official x86_64 (CentOS 6), 2.0.73–2.0.81 | yes |
| official aarch64 cross (CentOS 7, ARM GCC 10.2) | no |
| native aarch64 glibc 2.28 / GCC 8 | yes |
Both arches — libgcc_s.so.1. gcc_s. is not a reserved stem either, so this too is a real
file lookup, and it resolves only on images that happen to ship Alpine's libgcc package. Alpine
JDK images disagree about that:
| image | ships libgcc? |
|---|---|
eclipse-temurin:21-jdk-alpine |
yes |
amazoncorretto:21-alpine |
no |
many vendor / derived *-jdk-alpine images |
no |
So the dependency is not safe, only invisible on some bases — which is why it survived every
other fix. It is recorded whenever the _Unwind_* symbols that libstdc++.a pulls in are left
undefined, and it is the failure an application actually hits:
java.lang.UnsatisfiedLinkError: .../libnetty_tcnative_linux_aarch_64.so:
Error loading shared library libgcc_s.so.1: No such file or directory
Modifications:
openssl-dynamic/src/main/c/musl_compat.c: weak, default-visibility fallbacks for the__getauxval, fopen64 (musl 1.2.4 removed the__isinf, __isnan, __strdup. Deliberately not guarded on __GLIBC__:weak is what avoids colliding with glibc's own definitions.ld-linux DT_NEEDED post-link with patchelf, next to the existing strip, in thenative-jar antrun target of both release profiles. The two profiles duplicate the wholepatchelf exits 0 when the entrypatchelf in the build images: Dockerfile.centos6 from the upstream prebuilt staticobjcopy cannot remove a DT_NEEDED),Dockerfile.cross_compile_aarch64 from EPEL 7.-l:libstdc++.a -l:libgcc.a -l:libgcc_eh.a, in both Linuxlibgcc_eh.a defines the _Unwind_* family; with them resolved the driver's trailing--as-needed -lgcc_s records no DT_NEEDED. The spelling is not interchangeable with-static-libgcc — see Notes.scripts/check_musl_compat.sh and run it from the native-jar antrun target of the threepackage rather thanverify, because every build, deploy and staging command is clean package <plugin>:goal; and-DskipTests, which is what gives the cross-compiledDT_NEEDED outside the musl-reserved_Unwind_*, a non-static BoringSSL build, or a referenced-but-undefinedmusl_compat.c fallback.musl-verify job to ci-pr.yml and ci-build.yml that loads the already-built jars onubuntu-24.04-arm.bare, nolibgcc, gcompat and a glibc control.docs/musl-compatibility.md documenting the rules, how to verify them, and the dead ends.Two portability details in musl_compat.c that only the official images exposed — every other
toolchain tried (glibc 2.17, 2.28, 2.35, musl, ARM GCC 10.2 cross) accepted the file without them:
<sys/auxv.h> (added in 2.16), so including it unconditionally is a fatal__has_include, falling back to reading/proc/self/auxv. The fallback is kept rather than compiling __getauxval out on old glibc,__strdup under _GNU_SOURCE, so a definition expands into the macro#undef'd first.Result:
Built from source on both official release images and tested on bare Alpine 3.23
(musl 1.2.5, no gcompat, no libc6-compat):
| image | glibc floor | unresolvable syms | bare Alpine | glibc regression | |
|---|---|---|---|---|---|
| x86_64 | docker-compose.centos-6.yaml |
GLIBC_2.12 (unchanged) | none | PASS | none |
| aarch64 | docker-compose.centos-7.yaml cross |
— | none | PASS | none |
"PASS" means System.load, OpenSsl.isAvailable(), and a full TLSv1.3 handshake with
application data round-tripped both ways (in-memory SSLEngine pair, OpenSSL-backed on both
sides) — not merely that the library loads. Released 2.0.81 SIGSEGVs (aarch64) or fails to load
(x86_64) in the same containers.
Two Alpine bases are used, because libgcc gets in two different ways and either one makes the
check vacuous: apk add binutils (needed for readelf/nm) pulls it in as a dependency, and on
eclipse-temurin the JDK itself depends on it, so it cannot be removed there at all. Hence the
nolibgcc leg on amazoncorretto:21-alpine, whose JDK pulls no libgcc and which still provides
javac and jar. It is the only leg that can prove the artifact loads without libgcc present,
and it fails on an artifact still carrying the libgcc_s.so.1 entry.
ABI reach is unchanged: the x86_64 artifact's highest versioned reference is still
GLIBC_2.12, so RHEL 6 / Ubuntu 12.04 support is preserved. patchelf removed
ld-linux-x86-64.so.2 (present before, absent after), BoringSSL remains statically linked
(archives i386:x86-64, no libssl.so/libcrypto.so in DT_NEEDED), and NativeTest passes.
On eclipse-temurin:21-jdk-jammy the patched build negotiates the same cipher suite
(TLSv1.3 / TLS_AES_128_GCM_SHA256) as 2.0.75.Final and 2.0.81.Final on both arches.
Notes:
-static-libgcc does not work here, and the reason generalises. libtool links the sharedarchive_cmds, which expands only $libobjs $deplibs $compiler_flags. -l* isdeplibs, but -static-lib* falls into func_mode_link's catch-all -* | +*)gcc -shared never sees it. Put bothLDFLAGS line and grep dependency_libs target/native-build/*.la shows only-l: one survived. Hence -l:libgcc.a -l:libgcc_eh.a, and the redundant-static-libstdc++ dropped. A comment in the pom and §6/§7 of the doc record this.init_have_lse_atomics into the library as an .init_array__getauxval fallback stops being latent and becomes load-bearing. That isDockerfile.centos6 only builds on a host whose kernel still emulates the legacy vsyscall page.sed -i — worthFixes #907
See #152, netty/netty#15112
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@fredericgermain did you sign our icla yet ? https://netty.io/s/icla |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
361189f to
f55e968
Compare
|
Hi Norman, I just filled it! And I just quickly amended the description of the commit. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Hi again, I left all the tooling / report that was made in https://github.com/fredericgermain/netty-tcnative/tree/alpine-musl-harness/alpine-repro As you can see it's quite extensive. At the same time, for an official merge, I just mostly added a text file for future reference. I didn't want to impact the C/I more than that. But I'd recommand we add a C/I testing at least for the Alpine arm64/x86_64 variants, as they behave a little differently. Mostly tested so it can be used on officials temurin jre/jdk variants containers. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@fredericgermain I think we should also include the CI changes so they run in the PR |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
fac83c8 to
2695142
Compare
The released Linux artifacts are glibc-built but are expected to load on musl from the same jar. That stopped being true after 2.0.65, in three different ways. aarch64: `__getauxval` is unresolved on musl (only `getauxval` exists there) and is called from libgcc's `init_have_lse_atomics`, an .init_array constructor that runs during dlopen. The JVM therefore dies with SIGSEGV inside JVM_LoadLibrary rather than raising UnsatisfiedLinkError, so an application cannot catch it and fall back to the JDK provider. Installing gcompat does not help: gcompat ships /lib/libc.so.6 -> libgcompat.so.0, but `libc.so.6` is one of the names musl's loader satisfies internally without touching the filesystem, so the symlink is never read and libgcompat.so.0 is never loaded. 2.0.65 only worked by accident, via its `libcrypt.so.1` DT_NEEDED which Alpine symlinks to libgcompat.so.0. Both arches: DT_NEEDED can contain `ld-linux-<arch>.so.*`, which does not begin with `lib` and so is a real file lookup that fails on Alpine. It is recorded only because `__tls_get_addr` lives in glibc's loader; musl defines that symbol itself, so the symbol was never the problem and dropping the entry is sufficient. Whether it appears depends on the toolchain and link path, not on the arch or version alone: present in the official x86_64 builds 2.0.73..2.0.81 and in a native aarch64 glibc-2.28/GCC-8 build, absent from the official aarch64 cross build. So the removal is applied unconditionally in both release profiles, where it is a harmless no-op if the entry is not there. Both arches: DT_NEEDED contains `libgcc_s.so.1`. `gcc_s.` is not a musl-reserved stem either, so it too is a real file lookup, and it resolves only on images that happen to ship Alpine's `libgcc` package. Alpine JDK images disagree about that: eclipse-temurin:21-jdk-alpine ships it, amazoncorretto:21-alpine and a good number of vendor and derived images do not. So this dependency is not safe, only invisible on some bases - and it is the one that survives every other fix, because the entry is recorded whenever the `_Unwind_*` symbols that libstdc++.a pulls in are left undefined. Changes: - add openssl-dynamic/src/main/c/musl_compat.c with weak, default-visibility fallbacks for the glibc-internal symbols musl does not export: __getauxval, fopen64 (musl 1.2.4 removed the LFS64 aliases), __isinf, __isnan, __strdup. Deliberately not guarded on __GLIBC__ -- the release images are glibc, so the definitions must be compiled into exactly the artifacts that need them; `weak` is what avoids colliding with glibc's own definitions. The file #undefs those names first: glibc 2.17 macro-defines __strdup under _GNU_SOURCE, so a definition expands into the macro body; glibc 2.28/2.35 only declare it, so three of the four toolchains tried accept the file without the #undefs. It also probes for <sys/auxv.h> with __has_include and falls back to reading /proc/self/auxv, because that header and getauxval() only exist from glibc 2.16 and the x86_64 release image is CentOS 6 (glibc 2.12), where including it is a fatal error. - link the unwinder statically, with `-l:libstdc++.a -l:libgcc.a -l:libgcc_eh.a` in both Linux profiles. libgcc_eh.a defines the _Unwind_* family; with them resolved the driver's trailing `--as-needed -lgcc_s` records no DT_NEEDED. The spelling matters and is not interchangeable with -static-libgcc: libtool links the shared library through archive_cmds, which expands only $libobjs $deplibs $compiler_flags, and while `-l*` is parsed into deplibs, `-static-lib*` falls into func_mode_link's catch-all `-* | +*)` branch and reaches only the program link path, so gcc never sees it. `grep dependency_libs target/native-build/libnetty_tcnative.la` shows what actually survived. The now-redundant -static-libstdc++ is dropped for the same reason. - drop the ld-linux DT_NEEDED post-link with patchelf, next to the existing strip, in the native-jar antrun target of BOTH release profiles (boringssl-static-default and linux-aarch64); the two profiles duplicate the whole native build, so a change to one does not apply to the other. patchelf exits 0 when the entry is absent and is arch-agnostic, so the single invocation is safe and works from the x86_64 cross-compile host. - install patchelf in the build images: Dockerfile.centos6 from the upstream prebuilt static binary (CentOS 6 is EOL with no EPEL, and objcopy cannot remove a DT_NEEDED), Dockerfile.cross_compile_aarch64 from EPEL 7. - document the rules, verification steps and dead ends in docs/musl-compatibility.md. On aarch64 the static libgcc has one consequence worth stating: it brings init_have_lse_atomics into the library as an .init_array constructor, so the __getauxval fallback above stops being latent and becomes load-bearing. That is the Class C shape described in the docs, and it is why the fallback must not later be removed on the grounds that nothing references it. Measured on GCC 4.9.4, 9.5.0 (x86_64) and 10.5.0 (aarch64), bracketing the devtoolset-9 and ARM GCC 10.2.1 toolchains the release images actually use: -l:libstdc++.a alone libgcc_s.so.1 in DT_NEEDED, 11 undefined _Unwind_* + -l:libgcc.a -l:libgcc_eh.a no libgcc_s.so.1, 0 undefined _Unwind_* Both official release images were used. x86_64 on docker-compose.centos-6.yaml (CentOS 6, glibc 2.12): the image builds with the patchelf addition, patchelf 0.18.0 runs in it, musl_compat.c compiles clean, BoringSSL is statically linked, patchelf removes ld-linux-x86-64.so.2 (present before, absent after), and the artifact keeps a GLIBC_2.12 floor -- i.e. neither change costs any ABI reach. Also built on upstream's own official aarch64 image (docker-compose.centos-7.yaml, CentOS 7 cross, ARM GCC 10.2), which keeps a GLIBC_2.17 floor and leaves no glibc-internal symbols undefined. Verified from source on both architectures against bare Alpine 3.23 (musl 1.2.5, no gcompat and no libc6-compat): DT_NEEDED holds only musl-reserved names, the library loads, Library.initialize() reports BoringSSL, and an SSLContext plus memory BIO construct. Repeated on an Alpine JDK image carrying no libgcc package at all, which is the case the third failure mode above is about. No glibc regression -- on eclipse-temurin:21-jdk-jammy the patched build negotiates the same cipher suite as 2.0.75.Final and 2.0.81.Final, and the repo's NativeTest passes. Note the CentOS 6 image only builds on a host whose kernel still emulates the legacy vsyscall page; on kernels that disable it, CentOS 6 userspace segfaults on the image's first sed -i. Fixes netty#907 See netty#152
The previous commit fixes the three ways the glibc-built Linux artifacts stopped
being loadable on musl, but nothing stops any of them recurring. All three were
introduced silently and shipped for eight releases. None is visible on a glibc
builder, and none is covered by a test: boringssl-static's NativeTest stops at
System.load() on the build host, and the aarch64 artifact is cross-compiled with
-DskipTests so it gets no Java-level verification at all. Nor does the x86_64
release path - stage-snapshot and stage-release both pass -DskipTests=true - so
today no released artifact is verified from Java on any architecture.
This is the first of two tiers of verification. This one is static: it inspects
the ELF inside the build, on every build, with no musl present. It is cheap,
runs everywhere including locally, and catches everything decidable from the
bytes alone. The second tier - executing the artifact on real Alpine images -
is a separate commit, because the two answer different questions and fail in
different places.
Add scripts/check_musl_compat.sh and run it from the native-jar antrun target of
the three profiles that produce a Linux boringssl-static artifact. It needs only
readelf and nm, so it also validates the cross-compiled aarch64 object from the
x86_64 host, and it reads the target machine from the ELF header rather than
trusting ${archBits}.
Bound to package rather than verify: every build, deploy and staging command is
"clean package <plugin>:goal" and stops before verify. Unlike surefire, antrun is
unaffected by -DskipTests, which is exactly what lets one placement cover ci-pr,
ci-build, ci-deploy, ci-release and local builds. Placed after the strip and
patchelf steps and before the jar is assembled, so it checks the released bytes
and fails before <attachartifact>.
Errors, deterministic and always fatal on musl:
- a DT_NEEDED outside the set musl's loader satisfies internally (the reserved[]
stems in ldso/dynlink.c). This catches ld-linux-<arch>.so.*, the libcrypt.so.1
entry that made 2.0.65 work by accident, and libgcc_s.so.1.
- any undefined _Unwind_* symbol. This is what makes rejecting libgcc_s.so.1
safe rather than merely quiet: those symbols come from libstdc++.a and have
exactly two providers, libgcc_eh.a and libgcc_s.so.1, so the pair of checks
together distinguishes "the unwinder is linked in statically" from "the
unwinder is missing". Without it, a build whose -l:libgcc*.a flags stopped
reaching the link - libtool silently drops anything outside its pass-through
allowlist - would produce a library that passes the DT_NEEDED check and cannot
unwind. Not caught by the general scan below: _Unwind_ has a single leading
underscore.
- libssl.so/libcrypto.so present, i.e. not a static BoringSSL build. The APR and
BoringSSL steps skip themselves when their target directory exists, so a tree
left from another architecture yields a green build linked against the host's
shared OpenSSL.
- any musl_compat.c fallback referenced but undefined, i.e. the previous commit
has regressed. On aarch64 __getauxval is referenced by the statically linked
libgcc's init_have_lse_atomics constructor, so this is a live check rather
than a latent one.
A general undefined-GLOBAL scan is reported as WARN and deliberately does not
fail. It cannot decide reachability: with lazy PLT binding a symbol nothing calls
never aborts. netty-transport-native-epoll is the proof - it imports
__xpg_strerror_r as an undefined GLOBAL and still loads and runs on bare Alpine
on both architectures, so failing on that shape would make the gate cry wolf.
What the scan cannot rule out is the constructor case, where the symbol runs
during dlopen and crashes the JVM; that is why the runtime tier is a separate
and non-optional part of the verification.
Note the empty allowlist for the static profile is spelled '^$' rather than '':
the check applies it with `grep -Eq "$EXTRA"`, and an empty pattern matches every
input, which would silently disable the DT_NEEDED check altogether.
Verified against the published artifacts. Exit 1 for all six of 2.0.65, 2.0.73
and 2.0.81 on both architectures, each for the reason the previous commit
describes: ld-linux-x86-64.so.2 on x86_64 from 2.0.73, libcrypt.so.1 plus
__getauxval on 2.0.65 aarch64, libgcc_s.so.1 and eleven undefined _Unwind_*
throughout, and the undefined fallbacks. Exit 0 for netty-transport-native-epoll
on both architectures, which is the positive control, and exit 0 for the fixed
artifact from the previous commit. The WARN scan also surfaced __isoc99_sscanf
and __xstat in 2.0.65 on both arches, both gone by 2.0.73.
openssl-dynamic is not gated here. It links the system OpenSSL and APR
dynamically, so it needs "apk add openssl apr" on Alpine by design and wants a
different allowlist; it also still carries the ld-linux entry, which is a real if
narrower gap and a separate change.
The gate in the previous commit is the static tier: it inspects the ELF inside
the build. It cannot answer the question that actually matters, because two of
the three failure classes are only decidable with a real musl present: whether an
undefined GLOBAL symbol is ever reached, and whether reaching it raises
UnsatisfiedLinkError or kills the JVM. On aarch64 it was the latter -
__getauxval is called from libgcc's init_have_lse_atomics, an .init_array
constructor that runs during dlopen - so the artifact has to be executed
somewhere to know. This is the second tier: same invariants, checked by running
the thing.
Add a musl-verify job to ci-pr.yml and ci-build.yml that downloads the jars the
build jobs already upload and loads them on Alpine. Nothing is rebuilt and no
Maven runs inside Alpine, so the os.detected.classifier enforcer rules are not
involved. aarch64 runs natively on ubuntu-24.04-arm, which removes the reason
the cross-compiled artifact has never been executed in CI.
Both runner labels are pinned. There is no ubuntu-latest-arm - the arm64 labels
are version-pinned only - and pairing ubuntu-latest with a pinned arm label
would drift apart as soon as ubuntu-latest moves on. Here the host only supplies
Docker, so pinning costs nothing. Note `needs` cannot depend on a single matrix
leg, so the job waits for all of build-pr.
docker/musl-verify/verify.sh runs ldd for the loader's own verdict, resolves
every DT_NEEDED against the real loader rather than a hardcoded allowlist, diffs
undefined symbols against what is actually exported, then executes three levels
in separate JVMs: System.load, Library.initialize, and SSLContext plus a memory
BIO. Level two is the one that matters most - boringssl-static's NativeTest stops
at System.load, so nothing has ever initialized APR and BoringSSL for the
statically linked artifact.
A JVM that dies without printing a result line is recorded as a failure rather
than silently ignored. That is not defensive coding: it is the normal outcome for
the bug being guarded, and a naive runner would report success.
MuslLoadCheck.java uses only the JDK and netty-tcnative-classes. A full TLS
handshake would be the stronger bar and is reachable through the ByteBuffer BIO
API, but it needs roughly 200 lines of hand-written pumping because netty's
SSLEngine lives in netty-handler, which netty-tcnative does not depend on. Left
out deliberately; the bug being guarded is load-time.
One Alpine base image is not enough, because libgcc gets in two different ways
and either one makes the check vacuous for invariant 1:
- `apk add binutils`, which verify.sh needs for readelf and nm, pulls in libgcc
as a dependency. So binutils is installed as the virtual package .elftools and
removed again, with libgcc, once the ELF inspection is done and only the
runtime checks remain (MUSL_DROP_ELFTOOLS=1).
- on eclipse-temurin the JDK *itself* depends on libgcc, so `apk del` cannot
take it away there at all.
Hence two Alpine bases rather than one. eclipse-temurin:21-jdk-alpine is the
`bare` leg; amazoncorretto:21-alpine, whose JDK pulls no libgcc and which still
provides javac and jar, is the `nolibgcc` leg, and it is the only one that can
prove the artifact loads without libgcc present. jdk_image is a build arg, so
adding a third base later costs one matrix row.
Variants are bare, nolibgcc, gcompat and a glibc control. Bare and nolibgcc are
the invariant. gcompat is not expected to change the answer - libc.so.6 is one of
the names musl resolves internally, so gcompat's symlink is never read - and
exists so that a bare failure is diagnostic: if bare fails and gcompat passes,
the artifact has re-acquired a dependency on the shim, which is how 2.0.65
appeared to work. gcompat runs only in ci-build.yml, which also covers the weekly
schedule. libc6-compat is omitted because on current Alpine it is a `provides` of
gcompat. verify.sh prints the installed compat packages on every run, so a base
image that later starts shipping gcompat, or libgcc, is visible in the log rather
than silently making a leg vacuous.
Verified on aarch64 against a locally built artifact and released 2.0.81:
bare Alpine 2.0.82 fixed PASS
bare Alpine 2.0.81 released FAIL - ldd reports "__getauxval: symbol not
found", and all three levels SIGSEGV in
init_have_lse_atomics, caught by the
crash-synthesis path
nolibgcc Alpine 2.0.82 fixed PASS, with libgcc_s.so.1 confirmed absent
from the image before the JVM starts
nolibgcc Alpine an artifact still linked against libgcc_s.so.1
FAIL - "Error loading shared library
libgcc_s.so.1: No such file or directory"
at all three levels, which is the exact
failure the bare leg cannot see
gcompat 2.0.82 fixed PASS
gcompat 2.0.81 released FAIL, identically - confirming gcompat is
installed but never loaded
glibc control both PASS
and the failure propagates out through `docker compose run` as exit 1.
7100442 to
85c63c0
Compare
Evidence and tooling behind the musl fix on the `musl-compat` branch (netty#997). Not proposed for upstream — this branch exists so the diagnosis and the tools survive, and so the result is reproducible. alpine-repro/ contains: - REPORT.md — the findings: per-arch failure modes, the results matrix across {arm64,amd64} × {bare, libc6-compat, gcompat, full}, and the dead ends, including a `-static-libgcc` attempt that looks correct and is a no-op here. - run-matrix.sh / in-container.sh — the driver and the per-variant sweep. - elf-scan.sh — DT_NEEDED classified against musl's reserved libc alias names, plus ldd and the unresolvable-GLOBAL-symbol set. - verify-built-lib.sh — post-build artifact check: target arch, whether BoringSSL is genuinely statically linked, DT_NEEDED before/after the post-link step, and whether strip ran. - patch-released-jar.sh — fixes an already-released classifier jar by ELF surgery, for unblocking without a rebuild. - src/AlpineNativeLoadTest.java, src/TlsHandshakeTest.java — load, real-API and functional checks; the latter completes a real TLSv1.3 handshake and passes application data, because a library that loads is not necessarily one that works. - shim/musl_shim.c — weak-symbol shim, both an LD_PRELOAD workaround and the template for the in-tree fallbacks. - Dockerfiles for the musl target, a glibc control, and a local build image. - results/ — summary.tsv and the hs_err from the aarch64 SIGSEGV, which is the evidence that the failure is not a catchable UnsatisfiedLinkError. Also included, and deliberately NOT part of the upstream PR: docker/Dockerfile.centos7 + docker/docker-compose.centos-7-x86_64.yaml, a native x86_64 build on the same CentOS 7 base as the aarch64 cross image. It raises that artifact's glibc floor from GLIBC_2.12 to a measured GLIBC_2.16, dropping RHEL 6 and Ubuntu 12.04, which pom.xml documents wanting to keep. Kept here because the CentOS 6 image only builds on a host whose kernel still emulates the legacy vsyscall page, so this is the only way to build x86_64 on a host you cannot reboot.
|
Force-pushed: three commits now, description updated. CI is included as you asked, in two tiers. Correcting myself on one point: I said earlier this was tested for the official temurin containers, and that was exactly the blind spot. The artifacts still carried a DT_NEEDED on libgcc_s.so.1, which only resolves on images shipping Alpine's libgcc — temurin does, amazoncorretto and many vendor images don't. Now linked statically instead. Note -static-libgcc silently does nothing here (libtool drops -static-lib* before gcc sees it); it has to be -l:libgcc.a -l:libgcc_eh.a. The new nolibgcc CI leg on Corretto is what catches this — it fails on an artifact still carrying the entry. glibc floors unchanged, 2.12 x86_64 and 2.17 aarch64. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@fredericgermain so is this ready to review ? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Hi @normanmaurer! Yes, please you can go ahead with the review. Latest changes were to address it working on a corretto container, which has even a more slimmed down version of alpine (no libgcc there). |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| **/hs_err*.log | ||
|
|
||
| # Same verification as ci-pr.yml, plus the gcompat variants. Those are here rather than on every | ||
| # PR because their job is not to pass but to make a bare failure diagnostic: if bare fails and |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I wonder why we not just let it run on every PR as well ? I mean this would let us know it fails before we even merge the PR.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Agreed, moved them onto PRs. ci-pr.yml and ci-build.yml now run the same seven legs and differ only in which build job's artifact they consume. My original reasoning was thin: I was treating them as extra minutes rather than as a signal you would want before merging. The cost is small, since a musl-verify leg downloads an artifact that already exists and runs a small Alpine image rather than building anything.
Worth saying what they are for, since it is not obvious from the name. The gcompat legs are not expected to change the answer, because libc.so.6 is one of the names musl resolves internally, so gcompat's symlink is never read. They earn their place by making a bare failure diagnostic: if bare fails and gcompat passes, the artifact has re-acquired a dependency on the shim, which is exactly how 2.0.65 appeared to work.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
just some nits
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
- Add the Apache license header to the two new shell scripts. - Link async-profiler's packaging step from the patchelf comment rather than just naming the project. It runs the same tool with the same flag and the same two architecture names, so it is worth pointing at directly. Linked pinned to a commit because async-profiler's default branch is master and a branch link would drift off the line. Also added to docs/musl-compatibility.md, which referenced the issue but not the code. - Run the gcompat legs on pull requests too, so a failure shows up before a merge rather than after. ci-pr.yml and ci-build.yml now run the same seven legs and differ only in which build job's artifact they consume. The comment that argued these belonged off the PR path went with them; the rationale that survives is what the legs are actually for, which now sits in ci-pr.yml: gcompat is not expected to change the answer, it makes a bare failure diagnostic. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
|
@fredericgermain amazing work! Thanks |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@fredericgermain I wonder if we need the same for our native linux transports in netty and also the quic codec ? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks! And congratulations on getting #1000 in. On your question: I ran the same analysis over every published Linux native
(incubator quic 0.0.75 and incubator io_uring 0.0.26 match their graduated epoll and io_uring on x86_64 and aarch64 are fine. Nothing but quic is broken on both arches. x86_64 carries Beyond DT_NEEDED there are 16 symbols musl has no definition for: the whole riscv64 epoll and io_uring have the same fatal DT_NEEDED entry I want to be honest about how much this matters though: there is an official One to keep an eye on: All of the above is static analysis, I have not run any of it, and I do not use On sequencing: I would rather a tcnative release goes out first and gets a bit I will try to prepare a PR on quic nonetheless, this week or next: get it Separately, I also spent time on the tcnative CI itself, mostly build times on |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Hi @normanmaurer, A short follow-up on where I will spend my time next. First the quic side, which I am actively working on, the DT_NEEDED entries get the same treatment as here; the unresolved symbols from the quiche/Rust build need more digging, and the PR will come as discussed. Mostly though, what I am building towards is a simple benchmark with high environment coverage. Code-wise there is little to write: the existing I am still working out how to shape the run matrix and where such results would best live. If you have advice, or prior art in the netty orgs I should reuse, I would gladly take it. One caveat on pace: I work on this on my evenings, so I am not the easiest to sync with. But we will get it there! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@fredericgermain done worry :) That said for quic please do it in the 4.2 branch of netty. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
The Linux native artifacts are glibc-built but are expected to load from the same jar on musl. For netty-codec-native-quic that is not true today, in two ways that are hard failures and one that is latent. Reproduced on Alpine 3.23 (musl 1.2.5) against the released 4.2.17.Final jars: x86_64: DT_NEEDED contains `ld-linux-x86-64.so.2`. That name does not begin with `lib`, so it is not one of the names musl's loader satisfies from itself (ldso/dynlink.c: reserved[] = "c.pthread.rt.m.dl.util.xnet."), and the lookup goes to the filesystem and fails. The library cannot be loaded at all, on any Alpine image. The entry is recorded only because __tls_get_addr lives in glibc's loader; musl defines that symbol itself, so the symbol was never the problem and dropping the entry is sufficient. Whether it appears depends on the toolchain and link path rather than on the architecture: present in the x86_64 build, absent from the aarch64 cross build. UnsatisfiedLinkError: Error loading shared library ld-linux-x86-64.so.2: No such file or directory Both arches: DT_NEEDED contains `libgcc_s.so.1`. `gcc_s.` is not a reserved stem either, so it too is a real file lookup, and it resolves only on images that ship Alpine's `libgcc` package. Alpine JDK images disagree about that: eclipse-temurin:21-jdk-alpine ships it, amazoncorretto:21-alpine does not. So the dependency is not safe, only invisible on some bases. On amazoncorretto:21-alpine the aarch64 artifact fails identically to the above, followed by eleven unresolved _Unwind_* relocations. Both arches: 16 undefined symbols musl has no definition for. codec-native-quic links quiche statically and quiche brings the Rust standard library with it, which calls the LFS64 entry points by name (open64, mmap64, readdir64, sendfile64, lseek64, pread64, pwrite64, ftruncate64, openat64) and reaches stat through the __xstat64 family on the older glibc of the x86_64 image, or through stat64/fstat64/ lstat64/fstatat64 on the newer one used for aarch64. BoringSSL contributes fopen64. gnu_get_libc_version and __res_init come from the same Rust side. musl 1.2.4 removed the LFS64 aliases and never had the __?xstat64 family. This one is latent rather than fatal: musl defers a relocation it cannot resolve instead of failing the dlopen, so these abort at first call, and none of them is on the path a handshake takes. Changes: - add codec-native-quic/src/main/c/musl_compat.c with weak, default-visibility fallbacks for the 21 glibc-internal symbols musl does not export. Deliberately not guarded on __GLIBC__ -- the release images are glibc, so the definitions must be compiled into exactly the artifacts that need them; `weak` is what avoids colliding with glibc's own definitions at link time, and at runtime on glibc they are never reached, because a JNI library is dlopened into a local scope and the global scope already holds libc.so.6. The stat shims go straight to SYS_newfstatat/SYS_fstat rather than forwarding to stat() like the rest do, and that is load-bearing rather than stylistic: compiled on glibc 2.17, a stat() call links libc_nonshared.a's stub into this very library, and that stub calls __xstat, which musl does not export either. The forwarding version would resolve one dead symbol into another. Verified: the object's only undefined symbols are fopen, ftruncate, getauxval, lseek, mmap, open, openat, pread, pwrite, readdir, sendfile and syscall, all of which musl 1.2.5 exports on both architectures. The whole file is behind `#ifdef __GLIBC__`, which is the opposite of the guard that would be wrong here: inverting it would compile the definitions out of the glibc artifacts that need them. Guarding them in is nonetheless required, because off64_t, struct stat64 and struct dirent64 do not exist on musl, so a musl-native build of the module would otherwise fail to compile -- and such a build wants none of these shims anyway. The file also #undefs _FILE_OFFSET_BITS before including anything. With it set, glibc's headers __REDIRECT open to open64 and stat to stat64, which would turn every forwarder here into infinite recursion. The quic build does not set it today; this is a guard against a future -D on the command line. - link the unwinder statically, with `-l:libstdc++.a -l:libgcc.a -l:libgcc_eh.a` in both Linux profiles. libgcc_eh.a defines the _Unwind_* family that libstdc++.a and libquiche.a pull in; with them resolved the driver's trailing `--as-needed -lgcc_s` records no DT_NEEDED. The spelling matters and is not interchangeable with -static-libgcc: libtool links the shared library through archive_cmds, which expands only $libobjs $deplibs $compiler_flags, and while `-l*` is parsed into deplibs, `-static-lib*` falls into func_mode_link's catch-all `-* | +*)` branch and reaches only the program link path, so gcc never sees it. That is also why the -static-libstdc++ already in these profiles was doing nothing; it is dropped. On aarch64 the static libgcc has one consequence worth stating: it brings init_have_lse_atomics into the library as an .init_array constructor, so the __getauxval fallback above stops being latent and becomes load-bearing. An unresolved __getauxval there kills the JVM with SIGSEGV inside JVM_LoadLibrary rather than raising UnsatisfiedLinkError, which an application cannot catch. It must not later be removed on the grounds that nothing references it. - drop the ld-linux DT_NEEDED post-link with patchelf, in a new antrun execution at process-test-resources, declared immediately ahead of copy-native-lib-and-license. The phase is not arbitrary: hawtjni 1.18 binds `generate` to process-classes but `build` to generate-test-resources, so the library does not exist any earlier, and executions of one plugin in one phase run in declaration order. The library is located with a fileset rather than a hardcoded path, because hawtjni nests its output under a platform directory (META-INF/native/linux64/lib<name>.so) -- the same reason copy-native-lib-and-license needs a regexpmapper to flatten it -- and a resourcecount check fails the build if that ever stops matching exactly one file, so a layout change cannot turn this into a silent no-op. Guarded to Linux and skipped for android, whose libraries are loaded by bionic. patchelf exits 0 when the entry is absent, so naming both architectures is safe from either host. Same approach as async-profiler. A clear failure is raised when patchelf is not on PATH, since objcopy cannot remove a DT_NEEDED. - install patchelf 0.18.0 in docker/Dockerfile.centos7 and docker/Dockerfile.cross_compile_aarch64, from the upstream release rather than EPEL 7, which is archived. The published binary is fully static -- no DT_NEEDED and no undefined symbols -- so it runs on the CentOS 7 base unmodified. - add .github/scripts/musl-verify/, a harness that runs the artifact under the libc of the container it is in, and .github/workflows/ci-verify-musl.yml wiring it to bare Alpine, Alpine plus gcompat and a glibc control on both architectures. Also add build-native-quic compose services so the verification legs do not have to build and test the whole reactor. The harness does not stop at loading, and that is the point. Because musl defers unresolvable relocations, a check that only loads the library reports PASS for every artifact netty has released. QuicMuslCheck therefore ends in a real QUIC handshake: client and server in one JVM over loopback, exchanging a bidirectional stream. A JVM that dies without printing a RESULT line is turned into a failure rather than being read as success. Built from source in both official release images -- x86_64 on docker-compose.centos-7.111 (CentOS 7, glibc 2.17, devtoolset-11) and aarch64 on docker-compose.centos-7.cross (CentOS 7 cross, ARM GCC 10.3) -- and verified on Alpine with musl 1.2.5. DT_NEEDED of the built libraries is now `librt.so.1` and `libc.so.6` on x86_64 and `libc.so.6` alone on aarch64, all names musl satisfies from itself, with no undefined symbol musl does not export, no _Unwind_* left over, and all 21 fallbacks compiled in on both: x86_64 bare Alpine (has libgcc) load, init, full handshake PASS x86_64 amazoncorretto:21-alpine load, init, full handshake PASS x86_64 glibc control (Ubuntu, JDK 21) load, init, full handshake PASS aarch64 bare Alpine (has libgcc) load, init, full handshake PASS aarch64 amazoncorretto:21-alpine load, init, full handshake PASS The amazoncorretto rows are the ones that fail outright before this change. The aarch64 pair also exercises the __getauxval fallback for real: linking libgcc statically brings init_have_lse_atomics in as an .init_array constructor, so that symbol is resolved during dlopen there, and an unresolved one would be a SIGSEGV rather than a PASS. For contrast, the released 4.2.17 artifacts on the same images: released x86_64, any Alpine fails to load (ld-linux-x86-64.so.2) released x86_64 + patchelf only loads, initializes, full handshake released aarch64, image with libgcc loads, initializes, full handshake released aarch64, image without libgcc fails to load (libgcc_s.so.1) musl_compat.c compiles clean under -Werror on GCC 4.9.4/glibc 2.19, GCC 9.5.0 and GCC 10.5.0/glibc 2.31, bracketing the devtoolset-11 and ARM GCC 10.3 toolchains the release images use, and defines exactly the 21 intended weak symbols. See netty/netty-tcnative#997 for the same treatment in netty-tcnative and netty/netty-tcnative#907 for the original report.
The Linux native artifacts are glibc-built but are expected to load from the same jar on musl. For netty-codec-native-quic that is not true today, in two ways that are hard failures and one that is latent. Reproduced on Alpine 3.23 (musl 1.2.5) against the released 4.2.17.Final jars: x86_64: DT_NEEDED contains `ld-linux-x86-64.so.2`. That name does not begin with `lib`, so it is not one of the names musl's loader satisfies from itself (ldso/dynlink.c: reserved[] = "c.pthread.rt.m.dl.util.xnet."), and the lookup goes to the filesystem and fails. The library cannot be loaded at all, on any Alpine image. The entry is recorded only because __tls_get_addr lives in glibc's loader; musl defines that symbol itself, so the symbol was never the problem and dropping the entry is sufficient. Whether it appears depends on the toolchain and link path rather than on the architecture: present in the x86_64 build, absent from the aarch64 cross build. UnsatisfiedLinkError: Error loading shared library ld-linux-x86-64.so.2: No such file or directory Both arches: DT_NEEDED contains `libgcc_s.so.1`. `gcc_s.` is not a reserved stem either, so it too is a real file lookup, and it resolves only on images that ship Alpine's `libgcc` package. Alpine JDK images disagree about that: eclipse-temurin:21-jdk-alpine ships it, amazoncorretto:21-alpine does not. So the dependency is not safe, only invisible on some bases. On amazoncorretto:21-alpine the aarch64 artifact fails identically to the above, followed by eleven unresolved _Unwind_* relocations. Both arches: 16 undefined symbols musl has no definition for. codec-native-quic links quiche statically and quiche brings the Rust standard library with it, which calls the LFS64 entry points by name (open64, mmap64, readdir64, sendfile64, lseek64, pread64, pwrite64, ftruncate64, openat64) and reaches stat through the __xstat64 family on the older glibc of the x86_64 image, or through stat64/fstat64/ lstat64/fstatat64 on the newer one used for aarch64. BoringSSL contributes fopen64. gnu_get_libc_version and __res_init come from the same Rust side. musl 1.2.4 removed the LFS64 aliases and never had the __?xstat64 family. This one is latent rather than fatal: musl defers a relocation it cannot resolve instead of failing the dlopen, so these abort at first call, and none of them is on the path a handshake takes. Changes: - add codec-native-quic/src/main/c/musl_compat.c with weak, default-visibility fallbacks for the 21 glibc-internal symbols musl does not export. Deliberately not guarded on __GLIBC__ -- the release images are glibc, so the definitions must be compiled into exactly the artifacts that need them; `weak` is what avoids colliding with glibc's own definitions at link time, and at runtime on glibc they are never reached, because a JNI library is dlopened into a local scope and the global scope already holds libc.so.6. The stat shims go straight to SYS_newfstatat/SYS_fstat rather than forwarding to stat() like the rest do, and that is load-bearing rather than stylistic: compiled on glibc 2.17, a stat() call links libc_nonshared.a's stub into this very library, and that stub calls __xstat, which musl does not export either. The forwarding version would resolve one dead symbol into another. Verified: the object's only undefined symbols are fopen, ftruncate, getauxval, lseek, mmap, open, openat, pread, pwrite, readdir, sendfile and syscall, all of which musl 1.2.5 exports on both architectures. The whole file is behind `#ifdef __GLIBC__`, which is the opposite of the guard that would be wrong here: inverting it would compile the definitions out of the glibc artifacts that need them. Guarding them in is nonetheless required, because off64_t, struct stat64 and struct dirent64 do not exist on musl, so a musl-native build of the module would otherwise fail to compile -- and such a build wants none of these shims anyway. The file also #undefs _FILE_OFFSET_BITS before including anything. With it set, glibc's headers __REDIRECT open to open64 and stat to stat64, which would turn every forwarder here into infinite recursion. The quic build does not set it today; this is a guard against a future -D on the command line. - link the unwinder statically, with `-l:libstdc++.a -l:libgcc.a -l:libgcc_eh.a` in both Linux profiles. libgcc_eh.a defines the _Unwind_* family that libstdc++.a and libquiche.a pull in; with them resolved the driver's trailing `--as-needed -lgcc_s` records no DT_NEEDED. The spelling matters and is not interchangeable with -static-libgcc: libtool links the shared library through archive_cmds, which expands only $libobjs $deplibs $compiler_flags, and while `-l*` is parsed into deplibs, `-static-lib*` falls into func_mode_link's catch-all `-* | +*)` branch and reaches only the program link path, so gcc never sees it. That is also why the -static-libstdc++ already in these profiles was doing nothing; it is dropped. On aarch64 the static libgcc has one consequence worth stating: it brings init_have_lse_atomics into the library as an .init_array constructor, so the __getauxval fallback above stops being latent and becomes load-bearing. An unresolved __getauxval there kills the JVM with SIGSEGV inside JVM_LoadLibrary rather than raising UnsatisfiedLinkError, which an application cannot catch. It must not later be removed on the grounds that nothing references it. - drop the ld-linux DT_NEEDED post-link with patchelf, in a new antrun execution at process-test-resources, declared immediately ahead of copy-native-lib-and-license. The phase is not arbitrary: hawtjni 1.18 binds `generate` to process-classes but `build` to generate-test-resources, so the library does not exist any earlier, and executions of one plugin in one phase run in declaration order. The library is located with a fileset rather than a hardcoded path, because hawtjni nests its output under a platform directory (META-INF/native/linux64/lib<name>.so) -- the same reason copy-native-lib-and-license needs a regexpmapper to flatten it -- and a resourcecount check fails the build if that ever stops matching exactly one file, so a layout change cannot turn this into a silent no-op. Guarded to Linux and skipped for android, whose libraries are loaded by bionic. patchelf exits 0 when the entry is absent, so naming both architectures is safe from either host. Same approach as async-profiler. A clear failure is raised when patchelf is not on PATH, since objcopy cannot remove a DT_NEEDED. - install patchelf 0.18.0 in docker/Dockerfile.centos7 and docker/Dockerfile.cross_compile_aarch64, from the upstream release rather than EPEL 7, which is archived. The published binary is fully static -- no DT_NEEDED and no undefined symbols -- so it runs on the CentOS 7 base unmodified. - add .github/scripts/musl-verify/, a harness that runs the artifact under the libc of the container it is in, and .github/workflows/ci-verify-musl.yml wiring it to bare Alpine, Alpine plus gcompat and a glibc control on both architectures. Also add build-native-quic compose services so the verification legs do not have to build and test the whole reactor. The harness does not stop at loading, and that is the point. Because musl defers unresolvable relocations, a check that only loads the library reports PASS for every artifact netty has released. QuicMuslCheck therefore ends in a real QUIC handshake: client and server in one JVM over loopback, exchanging a bidirectional stream. A JVM that dies without printing a RESULT line is turned into a failure rather than being read as success. Built from source in both official release images -- x86_64 on docker-compose.centos-7.111 (CentOS 7, glibc 2.17, devtoolset-11) and aarch64 on docker-compose.centos-7.cross (CentOS 7 cross, ARM GCC 10.3) -- and verified on Alpine with musl 1.2.5. DT_NEEDED of the built libraries is now `librt.so.1` and `libc.so.6` on x86_64 and `libc.so.6` alone on aarch64, all names musl satisfies from itself, with no undefined symbol musl does not export, no _Unwind_* left over, and all 21 fallbacks compiled in on both: x86_64 bare Alpine (has libgcc) load, init, full handshake PASS x86_64 amazoncorretto:21-alpine load, init, full handshake PASS x86_64 glibc control (Ubuntu, JDK 21) load, init, full handshake PASS aarch64 bare Alpine (has libgcc) load, init, full handshake PASS aarch64 amazoncorretto:21-alpine load, init, full handshake PASS The amazoncorretto rows are the ones that fail outright before this change. The aarch64 pair also exercises the __getauxval fallback for real: linking libgcc statically brings init_have_lse_atomics in as an .init_array constructor, so that symbol is resolved during dlopen there, and an unresolved one would be a SIGSEGV rather than a PASS. For contrast, the released 4.2.17 artifacts on the same images: released x86_64, any Alpine fails to load (ld-linux-x86-64.so.2) released x86_64 + patchelf only loads, initializes, full handshake released aarch64, image with libgcc loads, initializes, full handshake released aarch64, image without libgcc fails to load (libgcc_s.so.1) musl_compat.c compiles clean under -Werror on GCC 4.9.4/glibc 2.19, GCC 9.5.0 and GCC 10.5.0/glibc 2.31, bracketing the devtoolset-11 and ARM GCC 10.3 toolchains the release images use, and defines exactly the 21 intended weak symbols. See netty/netty-tcnative#997 for the same treatment in netty-tcnative and netty/netty-tcnative#907 for the original report.
### What changes were proposed in this pull request? This PR aims to upgrade `netty-tcnative` to 2.0.83.Final. ### Why are the changes needed? To bring the latest bug fixes. - https://github.com/netty/netty-tcnative/releases/tag/netty-tcnative-parent-2.0.83.Final (2026-08-29) - netty/netty-tcnative#1001 - https://github.com/netty/netty-tcnative/releases/tag/netty-tcnative-parent-2.0.82.Final (2026-08-28) - netty/netty-tcnative#995 - netty/netty-tcnative#996 - netty/netty-tcnative#997 - netty/netty-tcnative#999 ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Pass the CIs. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Opus 5 Closes #58528 from dongjoon-hyun/SPARK-59259. Authored-by: Dongjoon Hyun <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
## Why [#997](#997) added the musl compatibility check to the FIPS `native-jar` execution, but did not port the corresponding link and post-link handling from the Linux release profiles. As a result, FIPS artifacts retain glibc loader and runtime dependencies that make them fail the new check. ## Changes - link the C++ runtime and unwinder archives statically in `fips-boringssl-static` - remove the architecture-specific `ld-linux` `DT_NEEDED` entry from the final FIPS native library before the musl check - document that FIPS, x86_64, and aarch64 profiles each duplicate these compatibility settings ## Verification - `xmllint --noout boringssl-static/pom.xml` - `git diff --check` - downstream Linux FIPS builds completed successfully on x86_64 and aarch64, including the native musl compatibility check Local Maven model validation was not run because this machine has no Java runtime.
…both jars on Alpine Motivation: CI built boringssl-static only on the two release images and never built the FIPS profile at all, so netty#997 could add the musl check to that profile without the matching link changes and nothing failed until a downstream build did (netty#1008). Modifications: - docker/Dockerfile.debian13 + docker-compose.debian-13.yaml: `build` (default profile) and `build-fips`. The image carries the build environment from certificate #5244's security policy, the module the FIPS profile pins: clang 17.0.6 and ninja 1.12.1 from the Debian archive, go 1.22.3 and cmake 3.29.3 downloaded at those versions. No JDK 8 in trixie: the build runs on JDK 21 with the pom's --release 8. - ci-pr.yml / ci-build.yml: legs debian13-x86_64 and debian13-x86_64-fips, and two bare-Alpine musl-verify legs on their jars. The FIPS one is the leg with no substitute: the module's integrity check and self-tests run in an ELF constructor at dlopen, so only a real load proves the post-link patchelf left it intact. - docker/README.md, docs/musl-compatibility.md. Result: A change to the FIPS profile, or to the release profiles that is not ported to it, fails on the PR. Not a release image: the artifacts have a glibc 2.34 floor.
…both jars on Alpine Motivation: CI built boringssl-static only on the two release images and never built the FIPS profile at all, so netty#997 could add the musl check to that profile without the matching link changes and nothing failed until a downstream build did (netty#1008). Modifications: - docker/Dockerfile.debian13 + docker-compose.debian-13.yaml: `build` (default profile) and `build-fips`. The image carries the build environment from certificate #5244's security policy, the module the FIPS profile pins: clang 17.0.6 and ninja 1.12.1 from the Debian archive, go 1.22.3 and cmake 3.29.3 downloaded at those versions. No JDK 8 in trixie: the build runs on JDK 21 with the pom's --release 8. - ci-pr.yml / ci-build.yml: legs debian13-x86_64 and debian13-x86_64-fips, and two bare-Alpine musl-verify legs on their jars. The FIPS one is the leg with no substitute: the module's integrity check and self-tests run in an ELF constructor at dlopen, so only a real load proves the post-link patchelf left it intact. - docker/README.md, docs/musl-compatibility.md. Result: A change to the FIPS profile, or to the release profiles that is not ported to it, fails on the PR. Not a release image: the artifacts have a glibc 2.34 floor.
Motivation: netty#997 made the boringssl-static native-jar step run `patchelf --remove-needed` on Linux. Only the two CI images got the binary. The `build` service of the Debian, Arch and openSUSE images builds boringssl-static too and has failed since with "patchelf: not found"; CI never saw it because it only runs Debian's dynamic-only service. Modifications: Arch and openSUSE take the distro package; any version works, the option dates from patchelf 0.7. Debian 7 gets the upstream static binary like CentOS 6: wheezy has no patchelf package at all. Result: `docker compose ... run build` works again on all three.
…both jars on Alpine Motivation: CI built boringssl-static only on the two release images and never built the FIPS profile at all, so netty#997 could add the musl check to that profile without the matching link changes and nothing failed until a downstream build did (netty#1008). Modifications: - docker/Dockerfile.debian13 + docker-compose.debian-13.yaml: `build` (default profile) and `build-fips`. The image carries the build environment from certificate #5244's security policy, the module the FIPS profile pins: clang 17.0.6 and ninja 1.12.1 from the Debian archive, go 1.22.3 and cmake 3.29.3 downloaded at those versions. No JDK 8 in trixie: the build runs on JDK 21 with the pom's --release 8. - ci-pr.yml / ci-build.yml: legs debian13-x86_64 and debian13-x86_64-fips, and two bare-Alpine musl-verify legs on their jars. The FIPS one is the leg with no substitute: the module's integrity check and self-tests run in an ELF constructor at dlopen, so only a real load proves the post-link patchelf left it intact. - docker/README.md, docs/musl-compatibility.md. Result: A change to the FIPS profile, or to the release profiles that is not ported to it, fails on the PR. Not a release image: the artifacts have a glibc 2.34 floor.
Motivation: netty#997 made the boringssl-static native-jar step run `patchelf --remove-needed` on Linux, but only the two CI images got the binary. The `build` service of the Arch and openSUSE images has failed since with "patchelf: not found". CI does not run them, so nothing flagged it. Modifications: Add the distro's `patchelf` package to both images. The Debian 7 image is left alone: wheezy packages no patchelf, and its GCC 4.9 cannot build BoringSSL's C++17 anyway, so only its dynamic-only service, the one CI runs, is usable. Result: `docker compose ... run build` works again on Arch and openSUSE.
…both jars on Alpine Motivation: CI builds boringssl-static only on the two release images and never builds the FIPS profile. netty#997 could add the musl check to that profile without the matching link changes, and nothing failed until a downstream build did (netty#1008). Modifications: - docker/Dockerfile.debian13 + docker-compose.debian-13.yaml, services `build` and `build-fips`. Every input is pinned: base image by digest, Debian archive by snapshot.debian.org timestamp, clang by version, Go by version and checksum (BoringSSL's go.mod is ahead of trixie's Go). trixie has no JDK 8, so the build runs on JDK 21 with the pom's --release 8. - ci-pr.yml / ci-build.yml: legs debian13-x86_64 and debian13-x86_64-fips, plus bare-Alpine musl-verify legs on their jars. The FIPS module's integrity check runs in an ELF constructor at dlopen, so only a real load proves the post-link patchelf left it intact. Result: A change to the FIPS profile, or one to the release profiles that is not ported to it, fails on the PR. Not a release image: glibc 2.34 floor.
…both jars on Alpine Motivation: CI builds boringssl-static only on the two release images and never builds the FIPS profile. netty#997 could add the musl check to that profile without the matching link changes, and nothing failed until a downstream build did (netty#1008). Modifications: - docker/Dockerfile.debian13 + docker-compose.debian-13.yaml, services `build` and `build-fips`. Every input is pinned: base image by digest, Debian archive by snapshot.debian.org timestamp, clang by version, Go by version and checksum (BoringSSL's go.mod is ahead of trixie's Go). trixie has no JDK 8, so the build runs on JDK 21 with the pom's --release 8. - ci-pr.yml / ci-build.yml: legs debian13-x86_64 and debian13-x86_64-fips, plus bare-Alpine musl-verify legs on their jars. The FIPS module's integrity check runs in an ELF constructor at dlopen, so only a real load proves the post-link patchelf left it intact. Result: A change to the FIPS profile, or one to the release profiles that is not ported to it, fails on the PR. Not a release image: glibc 2.34 floor.
…both jars on Alpine Motivation: CI builds boringssl-static only on the two release images and never builds the FIPS profile. netty#997 could add the musl check to that profile without the matching link changes, and nothing failed until a downstream build did (netty#1008). Modifications: - docker/Dockerfile.debian13 + docker-compose.debian-13.yaml, services `build` and `build-fips`. Every input is pinned: base image by digest, Debian archive by snapshot.debian.org timestamp, clang by version, Go by version and checksum (BoringSSL's go.mod is ahead of trixie's Go). trixie has no JDK 8, so the build runs on JDK 21 with the pom's --release 8. - ci-pr.yml / ci-build.yml: legs debian13-x86_64 and debian13-x86_64-fips, plus bare-Alpine musl-verify legs on their jars. The FIPS module's integrity check runs in an ELF constructor at dlopen, so only a real load proves the post-link patchelf left it intact. Result: A change to the FIPS profile, or one to the release profiles that is not ported to it, fails on the PR. Not a release image: its artifacts need a newer glibc than the release ones.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
__getauxval symbols cannot be found after 2.0.66 on musl Linux
There was an error while loading. Please reload this page.