Fix VM startup timeout by pinning BoxLite runtime to Cargo.lock revision#8
Open
vaayne wants to merge 2 commits intoboxlite-ai:mainfrom
Open
Fix VM startup timeout by pinning BoxLite runtime to Cargo.lock revision#8vaayne wants to merge 2 commits intoboxlite-ai:mainfrom
vaayne wants to merge 2 commits intoboxlite-ai:mainfrom
Conversation
The release workflow and install script clone BoxLite at HEAD to build the runtime (shim, guest, dylibs), but the boxrun server binary is compiled against the boxlite version pinned in Cargo.lock. When BoxLite's InstanceSpec struct changes between these versions, the server produces JSON config that the shim cannot deserialize, causing "missing field" errors and VM startup timeouts. This was the root cause of boxlite-ai#7: the server (compiled against boxlite cc236c4/v0.5.10) serialized InstanceSpec with `parent_pid` but without `exit_file`/`stderr_file`, while the shim (built from latest main) expected the opposite set of fields. Fix: extract the boxlite git revision from Cargo.lock and checkout that exact commit before building the runtime, ensuring the server and shim always agree on the InstanceSpec schema.
The boxrun binary links against runtime dylibs (libkrun, libgvproxy) via @rpath. The release workflow adds the rpath with install_name_tool, but the local install script was missing this step, causing a dyld "no LC_RPATH's found" error on macOS.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #7 — boxes stuck in "creating" status with
Timeout waiting for guest ready (30s).Root Cause
The release workflow and
install-local.shclone BoxLite atHEAD(latestmain) to build the runtime binaries (boxlite-shim,boxlite-guest, dylibs), but theboxrunserver binary is compiled against the boxlite version pinned inCargo.lock.When BoxLite's
InstanceSpecstruct changes between these two versions, the server produces JSON config that the shim cannot deserialize:cc236c4/v0.5.10): serializesInstanceSpecwithparent_pidfield, withoutexit_file/stderr_filemain): expectsexit_fileandstderr_file, doesn't expectparent_pidmissing field "exit_file", server sees a 30s timeoutFix
Extract the boxlite git revision from
Cargo.lockandgit checkoutthat exact commit before building the runtime. This ensures the server and shim always use the sameInstanceSpecschema.Changed files:
.github/workflows/release.yml— pin BoxLite checkout in CI release buildscripts/install-local.sh— pin BoxLite checkout in local install scriptTest plan
grep -A2 'name = "boxlite"' Cargo.lock | sed -n 's/.*#\([0-9a-f]*\)".*/\1/p'extracts the correct commit hashboxrun shell ubuntuworks