Fix k8s tentacle multi-arch Docker build crash under QEMU - #1276
Merged
LukeButters merged 1 commit intoAug 3, 2026
Conversation
The multi-arch k8s tentacle build was crashing with Go compiler panics (fatal error: found pointer to free object / growslice: len out of range) when building the arm64 image on an amd64 agent, because the golang builder stage ran under QEMU emulation instead of natively. The stage only cross-compiles via GOOS/GOARCH, so pinning it to --platform=$BUILDPLATFORM keeps go build running natively and avoids the emulated crash. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
LukeButters
deleted the
luke/fix-k8s-tentacle-multiarch-build-qemu-crash
branch
August 3, 2026 05:25
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.
Summary
Kubernetes Tentacle Multi-Arch Docker imagebuild (9.2.4233-main-nightly) was failing with Go compiler panics (fatal error: found pointer to free object,panic: runtime error: growslice: len out of range) while building thebootstraprunnerbuilderstage.docker buildx build --platform linux/arm64,linux/amd64 ...runs thegolang:1.26builder stage under QEMU emulation for the non-native target platform (arm64 on the amd64 build agent). The stage only needsGOOS/GOARCHcross-compilation, never execution of foreign-arch code, but without a platform pin buildx still runs the compiler itself under QEMU — a known source of Go runtime memory-corruption crashes.--platform=$BUILDPLATFORM(Docker's standard pattern for Go cross-compile stages) sogo buildalways runs natively on the build host and cross-compiles viaGOARCH, in bothdocker/kubernetes-agent-tentacle/Dockerfileand the equivalentdev/Dockerfile.Test plan
bootstraprunnerbuilderstage locally viadocker buildx build --target bootstraprunnerbuilderfor a foreign target platform, confirming it builds successfully and produces allbootstrapRunner-linux-{amd64,arm64,386,arm}binaries.Kubernetes Tentacle Multi-Arch Docker imagebuild on TeamCity to confirm the arm64-on-amd64 crash is resolved (couldn't reproduce the exact amd64-host/arm64-QEMU crash locally since my dev machine is arm64).🤖 Generated with Claude Code