Skip to content

Conversation

dylanlott
Copy link
Contributor

@dylanlott dylanlott commented Oct 7, 2025

fix: glibc runtime errors

This PR updates the docker stage 0 to use a known version of bookworm​ in for the next cargo-chef​ build step instead of the lukemathwalker/cargo-check​ image that it previously used in order to maintain glibc​ compatibility with the debian:bookwork-slim​ image used in stage 3.

Testing

Built a container with github actions and ran it in DevNet - tl;dr it landed blocks and the runtime error was gone.

Closes ENG-1424

Copy link
Contributor Author

dylanlott commented Oct 7, 2025

@dylanlott dylanlott changed the title fix glibc errors fix: glibc runtime errors Oct 7, 2025
@dylanlott dylanlott marked this pull request as ready for review October 7, 2025 01:36
@dylanlott dylanlott requested a review from rswanson October 7, 2025 01:46
@dylanlott dylanlott changed the base branch from dylan/update-alloy to graphite-base/159 October 7, 2025 01:48
@graphite-app graphite-app bot changed the base branch from graphite-base/159 to main October 7, 2025 01:49
Dockerfile Outdated
FROM --platform=$TARGETPLATFORM lukemathwalker/cargo-chef:latest-rust-latest as chef
### Use a Debian bookworm-based Rust image so GLIBC matches the final runtime (bookworm ships glibc 2.36)
### cargo-chef is then installed into this pinned base
FROM --platform=$TARGETPLATFORM rust:1.90-bookworm AS chef
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this locks our rust version used in the dockerfile and this is something i'd preferably not want to track. Can't we use a "latest stable" image?

Copy link
Member

@rswanson rswanson Oct 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I concur, specifically I think we'd want the tag slim as that appears to be the equivalent of latest slim and I can't think of a good reason to pin to the version of debian at all. I think slim has everything we need (with the installs)

Copy link
Member

@rswanson rswanson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What changed that impacted glibc btw, just curious

Copy link
Contributor Author

Root cause was that 5 days ago, a new release of cargo-chef's changed the version of glibc in the lukemathwalker/cargo-chef builds to a newer version of glibc than was compatible with the builder runtime stage 3, so builds on main branch were building but erroring at runtime. Changing to the rust:bookworm image aligns the glibc version with what's available in stage 3's bookworm-slim image.

Re: Image version - Version specification can loosen to rust:1-bookworm or even rust:bookworm. Those are much less strict and still solve the glibc issue and prevent it popping up in the future. I've updated it to rust:bookworm for now.

Copy link
Member

@rswanson rswanson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this works

Copy link
Member

@Evalir Evalir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perfect

@dylanlott dylanlott merged commit 60c3b30 into main Oct 8, 2025
6 checks passed
Copy link
Contributor Author

Merge activity

@dylanlott dylanlott deleted the dylan/glibc branch October 8, 2025 09:16
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.

3 participants