Alpine template builds fail: glibc busybox in SyncChangesToDisk + missing /usr/bin/ionice and /usr/bin/nice
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 74/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- go, linux
- Domain
- build-system, infrastructure
Research direction
Start with packages/orchestrator/pkg/template/build/sandboxtools/command.go and packages/orchestrator/pkg/template/build/phases/base/distro/init.go, then inspect the OOM wrapper in handler.go. Reproduce the Alpine base-layer failures and verify that sync works with the intended PATH and that envd-spawned commands find ionice and nice. Done means Alpine template builds no longer exit with status 127 for these causes.
Written by the indexing model from the issue text.
Description
Summary
Alpine-based template builds fail at the base layer with two distinct exit status 127 errors.
Bug 1 — SyncChangesToDisk uses glibc-linked busybox
File: packages/orchestrator/pkg/template/build/sandboxtools/command.go
SyncChangesToDisk invokes rootfs.SandboxBusyBoxPath + " sync", which resolves to /usr/bin/busybox sync. The /usr/bin/busybox binary is compiled against glibc and cannot be executed on Alpine (musl libc) — it fails with exit status 127.
Bug 2 — /usr/bin/ionice and /usr/bin/nice missing on Alpine
File: packages/orchestrator/pkg/template/build/phases/base/distro/init.go (InitOpenRC)
envd's OOM wrapper hard-codes /usr/bin/ionice and /usr/bin/nice (handler.go):
exec /usr/bin/ionice -c 2 -n 4 /usr/bin/nice -n N ...
On Alpine, util-linux-misc installs ionice to /bin/ionice (not /usr/bin/ionice), and nice lives only at /bin/nice (busybox symlink). Verified:
$ docker run --rm alpine:3.22 sh -c 'apk add --no-cache util-linux-misc >/dev/null 2>&1; ls /usr/bin/ionice /usr/bin/nice 2>&1'
ls: /usr/bin/ionice: No such file or directory
ls: /usr/bin/nice: No such file or directory
Without symlinks at /usr/bin/ionice and /usr/bin/nice, every command envd spawns during the build step layer exits 127.
Fix
See linked PR: add /usr/bin/{ionice,nice} symlinks in the Alpine InitOpenRC provisioning step, and replace the glibc busybox path in SyncChangesToDisk with plain sync + explicit PATH.
- Dominant language
- Go
- Stars
- 1.6k
- Forks
- 438
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from e2b-dev/runtime
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
sandbox cache: StartRemoving state transition not broadcast, all allocations see stale Running state Open
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
Difficulty 1/5 Under an hour Newbie friendliness 86/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
-
enhancement needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
kind/cleanup
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
kubernetes-sigs/kueue#15947 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
sympozium-ai/sympozium#627 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100