fix(linux): lower host glibc floor to 2.28 to support RHEL/Rocky 8#1934
Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
|
🌿 Preview your docs: https://nvidia-preview-pr-1934.docs.buildwithfern.com/openshell |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
|
/ok to test 1b04fd7 |
|
/ok to test f7a9871 |
54e9ef0 to
09e66a9
Compare
|
/ok to test 244a281 |
|
/ok to test 10efa98 |
@maxamillion Thanks for taking a look! |
|
@pimlock oh cool, good to know. Thanks! |
|
@pimlock should |
Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
10efa98 to
4859d8d
Compare
@maxamillion Good catch. I updated |
Summary
Lower the published Linux GNU host-binary glibc floor to 2.28 so OpenShell packages can run on RHEL 8 / Rocky Linux 8 class hosts. The gateway and VM driver release paths now specify explicit
cargo-zigbuildglibc 2.28 targets instead of relying on Zig's default GNU target behavior.The gateway keeps
bundled-z3for Linux release artifacts, so the released gateway remains self-contained instead of adding a system Z3 runtime requirement to each packaging surface.Related Issue
Fixes #1937
Refs #1456
Changes
openshell-gatewayrelease artifacts, image staging artifacts, and local prebuilt gateway artifacts with explicitx86_64-unknown-linux-gnu.2.28/aarch64-unknown-linux-gnu.2.28cargo-zigbuildtargets.--features bundled-z3.tasks/scripts/setup-zig-cc-wrapper.shsoz3-sysCMake builds can use Zig C/C++ with an explicit glibc 2.28 target.openshell-driver-vmrelease artifacts with explicit glibc 2.28 targets.tasks/scripts/verify-glibc-symbols.sh 2.28.z3-sysCMake cache state that points at oldcargo-zigbuildwrapper paths.LD_BIND_NOW=1to Linux smoke checks that execute the gateway.package-smoke-onlymanual workflow input after using it to validate the package smoke path on this PR.Investigation Notes
Previous Gateway Release Artifact
Inspected release
v0.0.63, artifactopenshell-gateway-x86_64-unknown-linux-gnu.tar.gz.cafe1915d15cfdcfcb9b55f1022ae08ce2b46198d208003a525e58c26e66729dGLIBC_2.29andGLIBC_2.30.GLIBC_2.29:log,log2,exp,pow,exp2GLIBC_2.29:posix_spawn_file_actions_addchdir_npGLIBC_2.30:pthread_cond_clockwaitGLIBC_2.30:gettidBranch-Current Gateway glibc 2.28 Build
The current release/image/staging paths use explicit glibc 2.28 targets and bundled Z3:
The explicit
.2.28target needed one extra piece for bundled Z3:z3-sysinvokes CMake and Zig C/C++, where Zig expects the vendorless target form (x86_64-linux-gnu.2.28) instead of Rust's target triple (x86_64-unknown-linux-gnu.2.28).The wrapper helper fixes that by:
CC_*,CXX_*, andCMAKE_TOOLCHAIN_FILE_*environment variables for both suffixed and bare GNU target forms.--target/-targetC/C++ flags thatcc/CMake may inject.z3-sysCMake build directories that still reference oldcargo-zigbuildwrapper paths.The release verifier remains the guardrail:
Focused symbol results from the compatible build:
GLIBC_2.2.5:log,log2,exp,pow,exp2.fcntl64@GLIBC_2.28and weakstatx@GLIBC_2.28.pthread_cond_clockwait@GLIBC_2.30is gone. The binary haspthread_cond_timedwait@GLIBC_2.3.2.gettid,posix_spawn_file_actions_addchdir_np, andposix_spawn_file_actions_addchdirare present only as unversioned weak undefined symbols, so they do not raise the GLIBC floor.GLIBC_2.29orGLIBC_2.30versioned references remain.Weak-Symbol Compatibility Layer
The symbols that caused concern are either gone from the new binary or are guarded weak lookups with older-kernel/libc fallback paths:
posix_spawn_file_actions_addchdir_nplookup is guarded. If unavailable,get_posix_spawn_addchdir()returnsNone,posix_spawn()returnsOk(None), andCommandfalls back to fork/exec. The fork/exec path applies cwd withchdir.gettidpaths use weak lookup with rawsyscall(SYS_gettid)fallback because glibc's wrapper is only available in glibc 2.30+.pthread_cond_clockwaitis not referenced in the new binary.Bundled Z3 and Cache Behavior
We briefly evaluated unbundling Z3, but kept the bundled path. The details are in the issue comment.
The wrapper changed the gateway cache key through
shared-key, not thekeyinput. A probe showed thatkey:did not affect the computedSwatinem/rust-cacheprimary key for this workflow; the working form is:Workflow evidence:
5d836b406624bf78dba49bbc66fdded2324a800a; gateway build steps were about 12m26s (amd64) and 12m30s (arm64).zig-wrapper-...keys.VM Driver Package Contract
openshell-driver-vminto the Linux package at/usr/libexec/openshell/openshell-driver-vm..github/workflows/driver-vm-linux.ymlso Linux VM driver release artifacts are built with explicit.2.28GNU Zig targets and verified withverify-glibc-symbols.sh 2.28.Rocky Linux 8 Gateway Smoke
Ran the branch-current gateway binary on
rockylinux:8with Podman:/opt/podman/bin/podman run --rm --platform linux/amd64 \ -v /Users/pmlocek/dev/navigator/target/x86_64-unknown-linux-gnu/release/openshell-gateway:/usr/local/bin/openshell-gateway:ro \ rockylinux:8 \ bash -lc 'ldd --version | head -1; LD_BIND_NOW=1 openshell-gateway --version; LD_BIND_NOW=1 openshell-gateway --help >/tmp/gateway-help.txt; head -8 /tmp/gateway-help.txt; echo -- weak-symbol-export-check --; objdump -T /lib64/libc.so.6 | grep -E "(gettid|posix_spawn_file_actions_addchdir_np)" || true'Observed:
ldd (GNU libc) 2.28LD_BIND_NOW=1 openshell-gateway --versionprintedopenshell-gateway 0.0.64-dev.9+g294c64ee.LD_BIND_NOW=1 openshell-gateway --helprendered the help header and commands.gettidorposix_spawn_file_actions_addchdir_np, confirming the gateway starts when those weak symbols are unavailable.Testing
mise run pre-commit(passing)bash tasks/scripts/test-install-sh.shbash -n tasks/scripts/setup-zig-cc-wrapper.sh tasks/scripts/stage-prebuilt-binaries.sh tasks/scripts/verify-glibc-symbols.sh tasks/scripts/docker-build-image.sh tasks/scripts/snap-gateway-wrapper.shsnapcraft.yamlYAML parse with PyYAML.bash tasks/scripts/test-packaging-assets.shuv run --frozen pytest python/openshell/release_formula_test.py -qgit diff --check--features bundled-z3.tasks/scripts/verify-glibc-symbols.sh 2.28 target/x86_64-unknown-linux-gnu/release/openshell-gatewayLD_BIND_NOW=1 openshell-gateway --versionandLD_BIND_NOW=1 openshell-gateway --help.Checklist