Skip to content

Fix GLIBC mismatch, and make the release prove the container boots - #29

Merged
WaylandYang merged 1 commit into
mainfrom
fix/glibc-mismatch-and-smoke-test
Aug 27, 2026
Merged

WaylandYang merged 1 commit into
mainfrom
fix/glibc-mismatch-and-smoke-test

Conversation

@WaylandYang

Copy link
Copy Markdown
Contributor

The failure

The published image pulled and started, then exited immediately:

utopia-server: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found
                                                (required by utopia-server)

rust:1-slim tracks upstream and is on trixie now (glibc 2.41). The runtime stage is debian:bookworm-slim (glibc 2.36). The binary linked against a newer libc than the image it ships in.

Pinning the build stage to rust:1-slim-bookworm ties both ends to one distro, and keeps a future upstream bump from silently reopening the same gap.

Why CI could not have caught it

It builds clean. Publishing succeeded. Every signal was green — the image simply cannot start. The gap between "builds" and "runs" had nothing covering it.

So the release now loads the image and runs it against a real Postgres before publishing, asserting:

  1. /api/v1/health returns {"status":"ok"} — process alive, migrations applied
  2. POST /api/v1/auth/register returns 200 with a token — argon2 hashing and JWT issuance work end to end (the path that would have caught the rust_crypto panic in Fix auth-bypass advisory in jsonwebtoken (CVE-2026-25537) #23)

Only then does it push.

Health is checked at the nested path with a body assertion on purpose: the image serves an SPA fallback, so a request to /health returns 200 with index.html. Checking that would have passed while proving nothing.

Polling conditions are written as if, not cmd && break — under set -e the latter aborts the run the first time a service is not ready yet.

The image built and published fine, then died on start:

  utopia-server: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found

rust:1-slim follows upstream and is on trixie now (glibc 2.41); the runtime stage
is bookworm (2.36). Nothing in a successful build reveals that. Pinning the build
stage to rust:1-slim-bookworm ties both ends to one distro and keeps a future
upstream bump from silently reopening the gap.

The workflow now loads the image, runs it against Postgres, and only publishes
after the container serves /api/v1/health and registers a user — migrations,
argon2 and JWT issuance all exercised for real. Health is checked at its nested
path with a body assertion: the image serves an SPA fallback, so /health returns
200 with index.html and would have passed while proving nothing.
@WaylandYang
WaylandYang merged commit bb83c79 into main Aug 27, 2026
2 checks passed
@WaylandYang
WaylandYang deleted the fix/glibc-mismatch-and-smoke-test branch August 27, 2026 18:13
WaylandYang added a commit that referenced this pull request Aug 28, 2026
The image built and published fine, then died on start:

  utopia-server: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found

rust:1-slim follows upstream and is on trixie now (glibc 2.41); the runtime stage
is bookworm (2.36). Nothing in a successful build reveals that. Pinning the build
stage to rust:1-slim-bookworm ties both ends to one distro and keeps a future
upstream bump from silently reopening the gap.

The workflow now loads the image, runs it against Postgres, and only publishes
after the container serves /api/v1/health and registers a user — migrations,
argon2 and JWT issuance all exercised for real. Health is checked at its nested
path with a body assertion: the image serves an SPA fallback, so /health returns
200 with index.html and would have passed while proving nothing.
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