fix(26.04): rosetta tar shim - #30
Merged
Merged
Conversation
COPYFILE_DISABLE only drops the AppleDouble sidecars; the xattrs survive as pax headers and GNU tar warns about each one on unpack.
The dotglob glob is empty in that case and tar exits with 'no files or directories specified'. Packing '.' also drops the bash-ism.
It was created in the cwd spread runs from, so it landed in the user's repo and got packed into the project tarball.
The unbounded loop kept polling a container that had already died, so the failure surfaced as spread's allocate timeout with nothing about why.
The scan inspected every container on the host, twice each, on every discard. One docker call now covers the lookup, and the label keeps unrelated containers out of the match.
Ubuntu 26.04's patched tar cannot extract anything below the top level under Rosetta, which spread reports as a failure to allocate the system. The shim probes once per container and only reroutes extraction; creation stays on GNU tar for --sort=name.
The shim swapping tar out from under the container was invisible; allocate now probes it (warming the cache too) and says so.
A grep for 'bread' in docker ps also matched containers this project never created. Match the allocate label, plus the bread- name prefix for containers allocated before the label existed.
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.
chisel-releases spread on macOS dies with "Cannot allocate docker:ubuntu-26.04-amd64" after too many retries, with a wall of
/bin/tar: ... Cannot mkdir: Function not implemented above it.ubuntu 26.04's SRU'd tar cannot extract anything below the top level in anamd64container on apple silicon. it's the ubuntu patch specifically -- not tar 1.35, not qemu (will report):the hardening that SRU added resolves paths through a syscall rosetta doesn't implement, so any entry with a directory component fails with ENOSYS, mkdir and open alike. not seccomp (
--privilegedandseccomp=unconfinedboth still fail), not the archive format (gnutar / ustar / pax identical), not fixable by pre-creating the dirs, and no gnu tar flag avoids it (-P,--no-overwrite-dir,--delay-directory-restore,-U, ... all still rc=2, TAR_OPTIONS included).bsdtarandbusyboxtar are both fine.no repack-side fix: repack rewrites the archive host-side.
fix here
/usr/bin/tarin the bread images is now a shim (hack/tar-shim.sh), real binary diverted to/usr/bin/tar.distribviadpkg-divert --local --rename. it probes gnu tar once per container (cached in /run) and routes extraction tobsdtar --no-xattrs --no-mac-metadataiff the probe fails. on an unaffected host it's inert and every call is plain gnu tar.(lots of) drivebys
.spread-worker-num) was written into the cwd spread runs got packed into the project tarball on consecutive runs. minor but polish.docker psmake nuke-spreadis more selective.