Skip to content

fix(docker): install patchelf so GenVM post-install can patch prebuilt trees - #1828

Merged
danieljrc888 merged 1 commit into
v0.123-devfrom
fix/genvm-runtime-patchelf
Nov 17, 2026
Merged

danieljrc888 merged 1 commit into
v0.123-devfrom
fix/genvm-runtime-patchelf

Conversation

@danieljrc888

Copy link
Copy Markdown
Contributor

Problem and outcome

The release gate #1670 cannot pass E2E: the Studio image build fails before any test runs (run 43941347030).

RuntimeError: interpreter /home/runner/genlayer-dev-env-stack/builds/genvm/8bc7e29a/lib/libc.so
of /genvm/bin/genvm-modules does not exist on this host, so it must be patched,
but patchelf is not on PATH

Cause: genvm-manager v0.6-dev commit 26b2ff4d ("drop the runner download and lief from post-install", 2026-11-16) removed the bundled lief patcher. When the ELF interpreter baked into bin/genvm-modules is missing on the host, post-install now runs patchelf --set-interpreter <genvm>/lib/libc.so and raises if patchelf is not on PATH. The E2E pipeline builds GenVM on the runner and injects it with GENVM_SOURCE_MODE=prebuilt, so the baked path is the runner's build directory, which does not exist inside the image.

Outcome: the genvm-runtime stage installs patchelf, so post-install can repoint the interpreter.

Non-goals: no change to the GenVM pin (v0.6.0-rc14), to the acquisition modes, or to runtime behavior.

Implementation and validation

  • One package added to the existing apt-get install line in docker/Dockerfile.backend (genvm-runtime stage, shared by jsonrpc and consensus-worker).
  • patchelf 0.18.0 installs from noble/universe on ubuntu:24.04, the stage's base image (checked locally).
  • Read the new post-install (install/lib/python/post-install/__main__.py at 8bc7e29a): with patchelf found by shutil.which, the failing branch runs the patch and continues.
  • Not reproduced locally: the full prebuilt build needs the E2E runner's GenVM tree. The proof is a green Studio build in E2E on this PR.

Risk: low. Post-install versions that still bundle lief (the pinned release) never call patchelf, so the release-mode image is unchanged apart from the extra package.

Rollback: revert this commit.

…t trees

genvm-manager v0.6-dev (26b2ff4d) dropped lief from post-install. When the
ELF interpreter baked into bin/genvm-modules is absent on the host, it now
shells out to patchelf and fails if it is not on PATH.

The E2E pipeline builds GenVM on the runner and injects it with
GENVM_SOURCE_MODE=prebuilt, so the interpreter path points at the runner's
build directory and the Studio image build fails at post-install.

Older post-install versions bundle lief and ignore the extra package.
@danieljrc888 danieljrc888 self-assigned this Nov 17, 2026
@coderabbitai

coderabbitai Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d248d118-6c1c-4036-929c-19291f8e7186

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-17T00:21:58.397156Z 226181f PR opened
🔒 Security Review ✅ Completed 2026-11-17T00:23:21.303957Z 226181f PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@danieljrc888

Copy link
Copy Markdown
Contributor Author

/run-e2e all

@ci-core-e2e-runner

Copy link
Copy Markdown
Contributor

E2E status was updated. Follow the current E2E and merge checks on this PR. Detailed diagnostics are available internally.

@danieljrc888
danieljrc888 merged commit e1597c7 into v0.123-dev Nov 17, 2026
20 checks passed
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