Build s390x runner image independently
We use buildx
to build multiple container image architectures concurrently.
Behind the scenes, buildx
uses qemu-user's emulation to run commands from the Dockerfile for the target architecture. Unfortunately, for s390x
, we appear to be hitting runtime errors/seg faults when gitlab-runner
is emulated, but only when concurrently building other architectures.
The errors we frequently see:
#18 547.1 panic: gzip: invalid checksum
#18 547.1
#18 547.1 goroutine 1 [running]:
#18 547.1 google.golang.org/protobuf/internal/impl.legacyLoadFileDesc({0x2a606a0, 0xc3a, 0xc3a})
#18 547.1 /builds/gitlab-org/gitlab-runner/vendor/google.golang.org/protobuf/internal/impl/legacy_file.go:56 +0x2a8
#30 541.9 panic: proto: invalid compressed file descriptor: gzip: invalid checksum
#30 541.9
#30 541.9 goroutine 1 [running]:
#30 541.9 github.com/golang/protobuf/proto.RegisterFile({0x19c113e, 0x19}, {0x2a606a0, 0xc3a, 0xc3a})
#30 541.9 /builds/gitlab-org/gitlab-runner/vendor/github.com/golang/protobuf/proto/registry.go:42 +0x232
#30 541.9 github.com/googleapis/gnostic/openapiv2.init.1()
#18 501.1 Segmentation fault (core dumped)
#18 505.2 runtime: summary[3][24576] = 0, 1060, 0
#18 505.2 runtime: level = 4, npages = 1024, j0 = 0
#18 505.2 runtime: p.searchAddr = 0xc00038a000, i = 196608
#18 505.2 runtime: levelShift[level] = 22, levelBits[level] = 3
#18 505.2 runtime: summary[4][196608] = (0, 4, 0)
#18 505.2 runtime: summary[4][196609] = (0, 384, 0)
#18 505.2 runtime: summary[4][196610] = (0, 36, 36)
#18 505.2 runtime: summary[4][196611] = (512, 512, 512)
#18 505.2 runtime: summary[4][196612] = (512, 512, 512)
#18 505.2 runtime: summary[4][196613] = (0, 0, 0)
#18 505.2 runtime: summary[4][196614] = (0, 0, 0)
#18 505.2 runtime: summary[4][196615] = (0, 0, 0)
#18 505.2 fatal error: bad summary data
Proposal
Build s390x
images separately.
Edited by Arran Walker