Skip to content

runner-clean: drop "Register qemu binfmt handlers" step - #35

Merged
igorpecovnik merged 1 commit into
mainfrom
drop/qemu-binfmt-step-runner-clean
Aug 5, 2026
Merged

runner-clean: drop "Register qemu binfmt handlers" step#35
igorpecovnik merged 1 commit into
mainfrom
drop/qemu-binfmt-step-runner-clean

Conversation

@igorpecovnik

Copy link
Copy Markdown
Member

What

Removes the Register qemu binfmt handlers step from runner-clean/action.yml.

Why

The step ran on every job to keep qemu-user current via apt so cross-arch (amd64 host → arm64 target) rootfs postinsts could run under qemu-aarch64-static. It doesn't achieve that and is pure overhead:

  • Can't fix the real failure. The distro qemu is frozen too old for newer guests — Ubuntu noble ships qemu-user-static 8.2.2, so the linux-headers deb tar postinst dies with tar: … Cannot open: Function not implemented. apt-get --only-upgrade is a no-op (already the newest version).
  • Redundant with the build. lib/functions/rootfs/qemu-static.sh (prepare_host_binfmt_qemu_cross) already mounts binfmt_misc and runs update-binfmts --enable itself, provided the package is installed.
  • Noisy and racy. Running apt every job loses the dpkg lock to concurrent apt (Could not get lock … held by process …); the || true then swallowed the failure and gave false confidence.

Seen in the wild (run 30941608953): 21 image builds failed on exactly this Function not implemented tar error across the x86 pool.

Where it's handled instead

At the host level, not per-job:

  • Build hosts are being bumped to a newer release (resolute), which brings a current qemu able to emulate the guest.
  • Runner provisioning installs qemu-user-static + binfmt-support; the build re-enables the handlers per run.

Safety

Current fleet already has qemu-user-static installed and the build re-registers binfmt each run, so no active runner regresses. YAML validated (yaml.safe_load OK).

This per-job step tried to keep qemu-user current via apt so cross-arch
(amd64 host -> arm64 target) rootfs postinsts could run under
qemu-aarch64-static. In practice it did not work and is being removed:

- It cannot fix the real failure. The distro qemu is frozen too old for
  newer guests (Ubuntu noble ships qemu 8.2.2), so the header-deb `tar`
  postinst dies with "tar: ... Cannot open: Function not implemented".
  `apt-get --only-upgrade` is a no-op against that ("already the newest
  version").
- It is redundant with the build. lib/functions/rootfs/qemu-static.sh
  (prepare_host_binfmt_qemu_cross) already mounts binfmt_misc and runs
  `update-binfmts --enable` itself, as long as the package is installed.
- It is noisy and racy. Running apt on every job loses the dpkg lock to
  concurrent apt ("Could not get lock ... held by process ..."), and the
  `|| true` swallowed the failure, giving false confidence.

qemu/binfmt is instead handled at the host level: build hosts are being
bumped to a newer release (resolute), which brings a current qemu able to
emulate the guest, and provisioning installs qemu-user-static +
binfmt-support. The build re-enables the handlers per run.

Signed-off-by: Igor Pecovnik <igor@armbian.com>
@igorpecovnik
igorpecovnik merged commit dbbcf7a into main Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant