-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Closed as not planned
Closed as not planned
Copy link
Labels
BugReportIssues describing a possible bug in the Go implementation.Issues describing a possible bug in the Go implementation.NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.compiler/runtimeIssues related to the Go compiler and/or runtime.Issues related to the Go compiler and/or runtime.
Description
Update(2026-02-18): This is a QEMU bug, which is fixed in the new versions of QEMU. QEMU 10.0.6+ is known to work. 7.1.0+ may also work.
For users with an older version of QEMU, there is a workaround on the Go side: set GODEBUG=madvdontneed=0.
This splits off the QEMU emulation issue from #74552 (comment).
When running go install on amd64 host with qemu arm64 emulation it seems to crash.
#27 [linux/arm64 tools 4/4] RUN --mount=type=cache,target=/root/.cache/go-build,id=gobuild --mount=type=cache,target=/go/pkg/mod,id=gopkg go install ./...
#27 0.888 runtime: pointer 0x39d8218b4000 to unallocated span span.base()=0x39d8218c0000 span.limit=0x39d8218c1ec0 span.state=0
#27 0.896 fatal error: found bad pointer in Go heap (incorrect use of unsafe or cgo?)
#27 0.901
#27 0.901 runtime stack:
#27 0.903 runtime.throw({0x71ec51?, 0x49e000?})
#27 0.904 runtime/panic.go:1229 +0x38 fp=0x39d821579ea0 sp=0x39d821579e70 pc=0x93918
#27 0.905 runtime.badPointer(0x554740a080, 0x39d8218b4000, 0x0, 0x0)
#27 0.905 runtime/mbitmap.go:1334 +0x128 fp=0x39d821579ef0 sp=0x39d821579ea0 pc=0x330f8
#27 0.906 runtime.findObject(0x39d8218a4000?, 0x55475485a8?, 0x39d8217bbc20?)
#27 0.906 runtime/mbitmap.go:1386 +0xac fp=0x39d821579f30 sp=0x39d821579ef0 pc=0x9213c
#27 0.906 runtime.wbBufFlush1(0x39d821311808)
#27 0.906 runtime/mwbbuf.go:243 +0x120 fp=0x39d821579fa0 sp=0x39d821579f30 pc=0x56cb0
#27 0.906 runtime.wbBufFlush.func1()
#27 0.906 runtime/mwbbuf.go:181 +0x24 fp=0x39d821579fc0 sp=0x39d821579fa0 pc=0x8e8f4
#27 0.906 runtime.systemstack(0x39d821576000)
#27 0.906 runtime/asm_arm64.s:399 +0x68 fp=0x39d821579fd0 sp=0x39d821579fc0 pc=0x992a8
#27 0.907
and
#24 1.163 runtime: marked free object in span 0x55474772a8, elemsize=128 freeindex=1 (bad use of unsafe.Pointer or having race conditions? try -d=checkptr or -race)
#24 1.172 0x7b979736000 alloc unmarked
#24 1.177 0x7b979736080 free unmarked
#24 1.178 0x7b979736100 free unmarked
#24 1.178 0x7b979736180 free unmarked
#24 1.178 0x7b979736200 free unmarked
...
#24 1.181 fatal error: found pointer to free object
#24 1.197
#24 1.197 runtime stack:
#24 1.198 runtime.throw({0x703f56?, 0x0?})
#24 1.199 runtime/panic.go:1229 +0x38 fp=0x7b97932ba00 sp=0x7b97932b9d0 pc=0x93918
#24 1.200 runtime.(*mspan).reportZombies(0x55474772a8)
#24 1.200 runtime/mgcsweep.go:893 +0x314 fp=0x7b97932ba80 sp=0x7b97932ba00 pc=0x4a834
Full log can be found at https://gist.github.com/egonelbre/15e79abdd3d298028791d33f2392d865
The relevant information about qemu version:
$ docker buildx create --name multiplatform --driver docker-container --bootstrap
$ docker exec buildx_buildkit_multiplatform0 buildkit-qemu-aarch64 --version
qemu-aarch64 version 10.0.4 (v10.0.4)
Copyright (c) 2003-2025 Fabrice Bellard and the QEMU Project developers
$ docker exec buildx_buildkit_multiplatform0 uname -a
Linux 6f5951803e5a 5.15.0-164-generic #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025 x86_64 Linux
One common denominator seems to be Ubuntu 22.04 host that also @wadey mentioned.
A related issue on arm64 #76985.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
BugReportIssues describing a possible bug in the Go implementation.Issues describing a possible bug in the Go implementation.NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.compiler/runtimeIssues related to the Go compiler and/or runtime.Issues related to the Go compiler and/or runtime.