Skip to content

Prototype: pin the CPU legs' glibc floor with a container, not the runner - #79

Draft
danielhanchen wants to merge 1 commit into
masterfrom
ci/container-glibc-floor
Draft

Prototype: pin the CPU legs' glibc floor with a container, not the runner#79
danielhanchen wants to merge 1 commit into
masterfrom
ci/container-glibc-floor

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Draft. Untested against a real runner. Opened for review of the approach, not to merge.

The problem the label swap cannot solve

ubuntu-22.04 and ubuntu-22.04-arm retire 2027-04-17. Today those labels are what holds the bundles at glibc 2.35 / GLIBCXX <= 3.4.30 so they load on Ubuntu 22.04 and Debian 12. A 24.04 build needs GLIBC_2.38, so the label cannot simply be swapped the way it can for the orchestration jobs.

Moving the userspace into a container decouples the floor from the runner image: the build keeps 2.35 on a 24.04 host, and the same shape survives the 24.04 retirement after it.

Why the CPU legs

They are the only Linux build legs with no vendor SDK to install, and they take their source from download-artifact rather than checkout, so the container needs no git.

What the bare image forces

  • No privilege prefix. The container runs as root and ubuntu:22.04 ships none.
  • ca-certificates, wget, gnupg, lsb-release. Present on the host runner image, absent from the base, and llvm.sh needs all four on arm64.

The assertion the runner label was standing in for

Nothing has ever checked the produced floor. It was inherited from the runner image and trusted, which means nothing would have caught the label drifting either.

This adds a step that reads the highest GLIBC_x.y any binary in bin/ asks the loader for and fails above 2.35. That makes the container's effect checkable rather than assumed, and it is arguably worth having on the build legs regardless of which approach wins.

What I could not verify

I have no container runtime available, so none of this has run. Specifically unproven:

  • that the runner's injected node works against glibc 2.35 (node20 needs 2.28+, so it should, but "should" is not a test)
  • that ccache-action, download-artifact, upload-artifact and cache/save behave inside the container
  • that the arm64 llvm.sh path works with only the packages listed above
  • the actual produced floor, which is exactly what the new assertion exists to answer

The first real run answers all four at once. Worth doing on a staging repo before this goes near a release.

Not converted

CUDA, ROCm and Vulkan each install a vendor toolkit whose behaviour inside a container needs its own test. Note also that the arm64 CUDA leg already runs on ubuntu-24.04-arm at glibc 2.39, so its floor is a separate question from the x64 profiles rather than the same one.

No upstream precedent

ggml-org/llama.cpp uses containers for toolchain provisioning, not floor management: their container base always matches or exceeds the runner, and their ROCm jobs still pin ubuntu-22.04. So they carry the same exposure and there is no working example of this to copy.

…nner

Untested against a real runner. Prototype for review, not to merge.

ubuntu-22.04 and ubuntu-22.04-arm retire 2027-04-17. Today those labels are
what holds the bundles at glibc 2.35 / GLIBCXX <= 3.4.30 so they load on
Ubuntu 22.04 and Debian 12, so the labels cannot simply be swapped: a 24.04
build needs GLIBC_2.38.

Moving the userspace into a container decouples the floor from the runner
image. The build then keeps 2.35 on a 24.04 host, and the same shape survives
the 24.04 retirement after it.

The CPU legs are the prototype because they are the only Linux build legs with
no vendor SDK to install, and because they take their source from
download-artifact rather than checkout, so the container needs no git.

Adjustments the bare image forces: no privilege prefix, since the container is
root and ships none; and ca-certificates, wget, gnupg and lsb-release, which
the host image has and ubuntu:22.04 does not, all of which llvm.sh needs on
arm64.

Also adds the assertion the runner label was silently standing in for. Nothing
ever checked the produced floor, so nothing would have caught the label
drifting. objdump now reports the highest GLIBC_x.y across bin/ and fails the
job above 2.35, which makes the container's effect checkable rather than
assumed.

Not converted: CUDA, ROCm and Vulkan. Each installs a vendor toolkit whose
behaviour inside a container needs its own test, and the arm64 CUDA leg is
already on ubuntu-24.04-arm at glibc 2.39, so its floor is a separate question.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant