Skip to content

fix(packaging): build the Linux agent on glibc 2.34 so older distros run it - #5545

Merged
kovtcharov-amd merged 4 commits into
mainfrom
fix/linux-agent-glibc
Oct 21, 2026
Merged

kovtcharov-amd merged 4 commits into
mainfrom
fix/linux-agent-glibc

Conversation

@kovtcharov-amd

@kovtcharov-amd kovtcharov-amd commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

The GAIA agent wouldn't start on Ubuntu 22.04, Debian 12 or RHEL 9: it was frozen on the newest Ubuntu runner, so it needed glibc 2.38 and died at launch with GLIBC_2.38 not found. The shipped v0.25.0 agent has the same problem. The Linux binary is now built on glibc 2.34 (Rocky Linux 9), which covers all three. The build now fails if anything packed into the binary needs a newer glibc, and the smoke test runs on all four distros before a release can use the build.

  • A guard for HTTPS from scripts. Building on RHEL means the bundled OpenSSL looks for CA certificates under /etc/pki, which Ubuntu and Debian don't have, so a run_python script's HTTPS would have failed there. A small runtime hook points it at the host's CA bundle, and the smoke test checks this on every distro. On Ubuntu and Debian, the run shows the hook switching to /etc/ssl/certs/ca-certificates.crt.
  • The installer journeys can't confirm this yet. test_installers_headless.yml installs published releases, so its known_failures.json entry for GAIA agent won't start on Ubuntu 22.04, Debian 12 or RHEL 9: the Linux build needs glibc 2.38 #5526 stays for now. ubuntu22-tui-deb should clear at the next RC, which rebuilds packages from the candidate's agent. ubuntu22-install-sh installs the hub's flagship, so it clears only after the next flagship release. Remove the entry for each row once it stops matching.

Test plan

  • build_flagship_sidecar.yml dispatched on this branch (run 39677811952): the glibc check passes at 2.34, and the smoke test passes on Rocky 9 (2.34), Ubuntu 22.04 (2.35), Debian 12 (2.36) and Ubuntu 24.04 (2.39)
  • Windows and macOS freeze rows are unchanged and pass in the same run
  • python -m pytest hub/agents/gaia/python/tests/test_linux_glibc_floor.py
🔍 Technical details
  • The manylinux images were ruled out because their Pythons are built without a shared libpython, which PyInstaller needs. Rocky 9's python3.12 package has one and is built for the same glibc. UV_PYTHON_PREFERENCE=only-system keeps uv from substituting another interpreter.
  • check_glibc.py reads every ELF file in the one-file archive (230 in this build) with PyInstaller's CArchiveReader, then checks each glibc symbol imported above the floor. The only exception allowed is _dl_find_object@GLIBC_2.35. RHEL 9's glibc 2.34 backports it, Rocky's own libgcc_s imports it, and Ubuntu 22.04 and Debian 12 have it natively. GLIBC_ABI_DT_RELR counts as 2.36. If it finds no libpython3 or reads nothing, the check stops with an error instead of passing.
  • publish.yml, release_agent_gaia.yml and the dry-run train call this workflow with uses:, so they pick up the change unedited. The new distro-smoke job is part of what they wait on.

Closes #5526

…run it

The GAIA agent wouldn't start on Ubuntu 22.04, Debian 12 and RHEL 9: it was
frozen on the newest Ubuntu runner, so its Python runtime needed glibc 2.38
and failed at launch with "GLIBC_2.38 not found".

The Linux binary is now built in a Rocky Linux 9 container (glibc 2.34) with
the distro's own shared-library Python 3.12. A build check fails if the
binary or anything packed in it needs a newer glibc, and the smoke test now
runs on Rocky 9, Ubuntu 22.04, Debian 12 and Ubuntu 24.04 before a release
can use the build.

The bundled OpenSSL now comes from RHEL and would look for CA certificates
under /etc/pki, so a runtime hook points it at the host's bundle when its own
default is missing; otherwise HTTPS from run_python scripts would fail on
Ubuntu and Debian. The smoke test checks that on every distro.

Closes #5526
@github-actions github-actions Bot added devops DevOps/infrastructure changes sidecar Agent sidecar contract / harness labels Oct 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Verdict: Approve with suggestions

This fixes the Linux agent refusing to start on Ubuntu 22.04, Debian 12 and RHEL 9: the binary is now built on glibc 2.34, and the build fails if anything inside it needs a newer glibc. Before release, it is smoke-tested on all four target distros. I found no correctness bugs. The design holds up: the glibc gate won't pass on an empty scan, the CA-bundle hook does nothing when the host's default store already works, and the tests cover the parsing details that could go wrong.

The one thing to confirm before merge is the new container build itself. Nothing on this PR has run build_flagship_sidecar.yml yet (it only runs on dispatch or from release workflows), and its test-plan items are still unchecked. Please dispatch it on this branch and check that the Rocky 9 freeze, the glibc gate, all four distro smoke tests and the unchanged Windows/macOS rows go green.

Real-world evidence

N/A: the evidence stage reported no CLI, API or MCP surface changed. This PR changes the packaging and CI pipeline only. The verdict rests on a static review. The new tests didn't run here because pytest isn't installed on this runner. Only the workflow dispatch named above can prove the build works on real distros.

🔍 Technical details

Issues found

🟡 Container build is unverified (.github/workflows/build_flagship_sidecar.yml): four things in this file can only be proven by a real run:

  • container: ${{ matrix.container }} evaluates to an empty string on the Windows and macOS rows.
  • uv venv --python 3.12 runs with UV_PYTHON_PREFERENCE=only-system against Rocky's python3.12.
  • The [api,rag,diarize,browser] dependencies need wheels that resolve on glibc 2.34.
  • check_glibc.py relies on PyInstaller.archive.readers.CArchiveReader (.toc/.extract), an internal API that can change between PyInstaller versions.

None of these looks wrong, but the PR's own test plan depends on that dispatch, so tick it before merge.

🟢 GLIBC_ABI_DT_RELR is not caught (check_glibc.py:29): _VERSION_REF only matches numeric GLIBC_x.y. A library linked with -z pack-relative-relocs (glibc ≥ 2.36 toolchains) needs GLIBC_ABI_DT_RELR and fails to load on 2.34 just the same. It's unlikely from manylinux wheels, but the gate could name it:

_VERSION_REF = re.compile(r"^\s+0x[0-9a-f]+\s+0x[0-9a-f]+\s+\d+\s+GLIBC_([\d.]+|ABI_DT_RELR)\s*$")

This would also need parse_version to map ABI_DT_RELR to (2, 36).

🟢 distro-smoke waits on the best-effort Intel Mac leg: needs: freeze covers every matrix leg, including darwin-x64, which has a 60-minute timeout and continue-on-error. The Linux smoke tests can't start until that leg finishes. It's not a correctness issue, only added wall-clock time on every release.

Strengths

  • check_glibc.py fails loudly rather than passing by accident. It refuses an empty scan, refuses an archive with no libpython3, and reads only "Version References", never "Version definitions". Each of these has a test.
  • The CA hook is narrowly scoped. It does nothing when the user set SSL_CERT_FILE/SSL_CERT_DIR or the bundled OpenSSL's default path exists, and the smoke test checks that it works on every distro rather than trusting the unit test.
  • smoke_test.py uses only the standard library and parses under Python 3.9, so it runs on Rocky 9's system python3 in the bare distro containers.

…ject backport

Rocky 9's own libgcc_s imports _dl_find_object@GLIBC_2.35, which RHEL 9's
glibc 2.34 backports and Ubuntu 22.04 and Debian 12 have natively, so a bare
version cap rejected a binary that runs on every target. Also catches
GLIBC_ABI_DT_RELR, which needs glibc 2.36 but carries no number.
@kovtcharov-amd

Copy link
Copy Markdown
Collaborator Author

The dispatch is green on the final commit: the Rocky 9 freeze, the glibc gate, all four distro smoke tests, and the unchanged Windows and macOS rows (run 39677811952).

  • GLIBC_ABI_DT_RELR: taken. It now counts as 2.36 and fails the gate.
  • The first real run caught one more thing: Rocky 9's own libgcc_s needs GLIBC_2.35. That's RHEL 9's backported _dl_find_object, which every target has. The gate now checks per symbol, allows only that one named backport, and the Rocky 9 smoke run proves the backport is present.
  • distro-smoke waiting on the Intel Mac leg: leaving it. A job can't depend on one matrix leg, and splitting Linux into its own job would duplicate the shared install step that the freeze tests pin. The cost is wall-clock time on a release, not correctness.

@kovtcharov-amd
kovtcharov-amd added this pull request to the merge queue Oct 21, 2026
Merged via the queue into main with commit d4d91fc Oct 21, 2026
36 checks passed
@kovtcharov-amd
kovtcharov-amd deleted the fix/linux-agent-glibc branch October 21, 2026 21:48
kovtcharov-amd added a commit to kovtcharov/gaia that referenced this pull request Oct 24, 2026
…5625)

The v0.25.1 notes stopped at the release PR (amd#5474). That left fixes
that users will notice out of the notes, and the changelog stopped short
of the release commit. This PR adds those three fixes: the GAIA agent
starts on Ubuntu 22.04, Debian 12 and RHEL 9 (amd#5545); Intel Macs can
install again (amd#5546, amd#5481); and Windows settings folders you can read
but can't create files in now load (amd#5469). It also adds six fixes from
rc6 and rc7 and regenerates the changelog from git against rc7.

## Test plan
- [x] `python util/validate_release_notes.py docs/releases/v0.25.1.mdx
--tag v0.25.1`
- [x] `pytest tests/unit/test_docs_json_release.py`
- [x] `mintlify validate` from `docs/`
- [x] The changelog lists 213 commits, the same count as `git rev-list
--count v0.25.0..v0.25.1-rc7`. The narrative stays within the 350-word
patch cap.
burgulvedant pushed a commit to burgulvedant/gaia that referenced this pull request Oct 26, 2026
amd#5545 shipped in GAIA 0.25.1, which package 0.3.1 was released with, so the fix belongs under 0.3.1, not Unreleased.
kovtcharov-amd added a commit to tylerbea/gaia that referenced this pull request Oct 27, 2026
…md#5857)

## Summary

The published `@amd-gaia/gaia` docs now state that the Linux x64 agent
needs glibc 2.34 or newer.

## Why

amd#5545 rebuilt the Linux agent on glibc 2.34 so it starts on Ubuntu
22.04, Debian 12 and RHEL 9, but the package docs never recorded the fix
or the floor. Someone on an older distro had no way to tell why the
agent would not start.

## Linked issue

Closes amd#5557

## Changes

- `[Unreleased]` CHANGELOG entry for the glibc 2.34 rebuild
- glibc 2.34 floor added to the README requirements, SPEC section 2.4
and SKILL section 4

## Test plan

- [ ] `grep -n glibc hub/agents/gaia/npm/{README,SPEC,SKILL}.md` shows
the same floor in all three
- [ ] The CHANGELOG entry matches the v0.25.1 release note

## Evidence

Docs only, no code or agent behaviour changed, so no screenshots or API
output apply.

## Checklist

- [x] I have linked a GitHub issue above (`Closes #N` / `Fixes #N` /
`Refs #N`).
- [x] I have described **why** this change is being made, not just what
changed.
- [ ] I have run linting and tests locally (`python util/lint.py --all`,
`pytest tests/unit/`).
- [ ] I have attached **real-world evidence** matched to the surface I
changed (see Evidence above), or marked each surface N/A.
- [x] I have updated documentation if user-visible behavior changed (see
CONTRIBUTING.md).

---------

Co-authored-by: burgulvedant <[email protected]>
Co-authored-by: Kalin Ovtcharov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

devops DevOps/infrastructure changes sidecar Agent sidecar contract / harness

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GAIA agent won't start on Ubuntu 22.04, Debian 12 or RHEL 9: the Linux build needs glibc 2.38

1 participant