Skip to content

Alpine template builds fail: glibc busybox in SyncChangesToDisk + missing /usr/bin/ionice and /usr/bin/nice #3597

Description

@AdaAibaby

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions