Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue building go on docker arm/v/7 with alpine image #35254

Closed
niedfelj opened this issue Oct 30, 2019 · 2 comments
Closed

Issue building go on docker arm/v/7 with alpine image #35254

niedfelj opened this issue Oct 30, 2019 · 2 comments
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.

Comments

@niedfelj
Copy link

niedfelj commented Oct 30, 2019

What version of Go are you using (go version)?

1.12.12-r0

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

#7 33.84 Architecture
#7 33.88 Linux buildkitsandbox 4.15.0-45-generic #48-Ubuntu SMP Tue Jan 29 16:28:13 UTC 2019 armv7l Linux
#7 36.25 GOARCH="arm"
#7 36.25 GOBIN=""
#7 36.25 GOCACHE="/root/.cache/go-build"
#7 36.25 GOEXE=""
#7 36.26 GOFLAGS=""
#7 36.26 GOHOSTARCH="arm"
#7 36.26 GOHOSTOS="linux"
#7 36.26 GOOS="linux"
#7 36.26 GOPATH="/go"
#7 36.26 GOPROXY=""
#7 36.26 GORACE=""
#7 36.26 GOROOT="/usr/lib/go"
#7 36.26 GOTMPDIR=""
#7 36.26 GOTOOLDIR="/usr/lib/go/pkg/tool/linux_arm"
#7 36.26 GCCGO="gccgo"
#7 36.26 GOARM="7"
#7 36.26 CC="gcc"
#7 36.26 CXX="g++"
#7 36.26 CGO_ENABLED="1"
#7 36.26 GOMOD=""
#7 36.26 CGO_CFLAGS="-g -O2"
#7 36.26 CGO_CPPFLAGS=""
#7 36.26 CGO_CXXFLAGS="-g -O2"
#7 36.26 CGO_FFLAGS="-g -O2"
#7 36.26 CGO_LDFLAGS="-g -O2"
#7 36.26 PKG_CONFIG="pkg-config"
#7 36.26 GOGCCFLAGS="-fPIC -marm -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build635569535=/tmp/go-build -gno-record-gcc-switches"

What did you do?

Running into an issue compiling a program running under alpine/docker using the cross-platform version of docker (qemu). I've detailed everything on the balena forum with a repo that can be checked out.

https://forums.balena.io/t/cant-compile-golang-on-armv7-via-balena-cross-compile-or-docker-edge-arm-support/40591/2

What did you expect to see?

It should compile the program correctly. It works under Ubuntu on every platform/image. Works with Alpine images on actual armv7 hardware but not under docker/qemu on amd64/x86 hardware when trying to run arm images.

What did you see instead?

Everything I try to build gives an error similar to this:

#7 39.86 # command-line-arguments
#7 39.86 runtime: pointer 0xa00020 to unused region of span span.base()=0x800000 span.limit=0x81a5e0 span.state=1
#7 39.86 runtime: found in object at *(0xfffc5008+0x7fe8)
#7 39.86 object=0xfffc5008 s=nil
#7 39.86 fatal error: found bad pointer in Go heap (incorrect use of unsafe or cgo?)
#7 39.86 
#7 39.86 runtime stack:
#7 39.86 runtime.throw(0xffda8946, 0x3e)
#7 39.86 	/usr/lib/go/src/runtime/panic.go:617 +0x60 fp=0x435ed8 sp=0x435ec4 pc=0xffbc1408
#7 39.86 runtime.findObject(0xa00020, 0xfffc5008, 0x7fe8, 0x0, 0x0, 0x0)
#7 39.86 	/usr/lib/go/src/runtime/mbitmap.go:397 +0x37c fp=0x435efc sp=0x435ed8 pc=0xffba5424
#7 39.86 runtime.scanblock(0xfffc5008, 0x40000, 0xff286c20, 0x41dc60, 0x0)
#7 39.86 	/usr/lib/go/src/runtime/mgcmark.go:1070 +0xa0 fp=0x435f28 sp=0x435efc pc=0xffbb3318
#7 39.86 runtime.markrootBlock(0xfffc5008, 0x6d90, 0xff286c20, 0x41dc60, 0x0)
#7 39.86 	/usr/lib/go/src/runtime/mgcmark.go:251 +0x68 fp=0x435f40 sp=0x435f28 pc=0xffbb0e14
#7 39.86 runtime.markroot(0x41dc60, 0x2)
#7 39.86 	/usr/lib/go/src/runtime/mgcmark.go:161 +0x378 fp=0x435f84 sp=0x435f40 pc=0xffbb0d00
#7 39.86 runtime.gcDrain(0x41dc60, 0x7)
#7 39.86 	/usr/lib/go/src/runtime/mgcmark.go:899 +0x118 fp=0x435fcc sp=0x435f84 pc=0xffbb2a20
#7 39.86 runtime.gcBgMarkWorker.func2()
#7 39.86 	/usr/lib/go/src/runtime/mgc.go:1926 +0x180 fp=0x435fe8 sp=0x435fcc pc=0xffbeba70
#7 39.86 runtime.systemstack(0x42a3c0)
#7 39.86 	/usr/lib/go/src/runtime/asm_arm.s:354 +0x90 fp=0x435fec sp=0x435fe8 pc=0xffbedfb4
#7 39.86 runtime.mstart()
#7 39.86 	/usr/lib/go/src/runtime/proc.go:1153 fp=0x435fec sp=0x435fec pc=0xffbc5d00
#7 39.86 
#7 39.86 goroutine 4 [GC worker (idle)]:
#7 39.86 runtime.systemstack_switch()
#7 39.86 	/usr/lib/go/src/runtime/asm_arm.s:298 +0x4 fp=0x427f98 sp=0x427f94 pc=0xffbedf18
#7 39.86 runtime.gcBgMarkWorker(0x41d300)
#7 39.86 	/usr/lib/go/src/runtime/mgc.go:1890 +0x1d0 fp=0x427fe4 sp=0x427f98 pc=0xffbae304
#7 39.86 runtime.goexit()
#7 39.86 	/usr/lib/go/src/runtime/asm_arm.s:868 +0x4 fp=0x427fe4 sp=0x427fe4 pc=0xffbefcc4
#7 39.86 created by runtime.gcBgMarkStartWorkers
#7 39.86 	/usr/lib/go/src/runtime/mgc.go:1784 +0x74
#7 39.86 
#7 39.86 goroutine 1 [runnable]:
#7 39.86 cmd/link/internal/objfile.(*objReader).readFull(0x7e167c, 0x48e0e0, 0x16, 0xd2)
#7 39.86 	/usr/lib/go/src/cmd/link/internal/objfile/objfile.go:373 +0x100 fp=0x7e1468 sp=0x7e1468 pc=0xffcbbd20
#7 39.86 cmd/link/internal/objfile.(*objReader).readSymName(0x7e167c, 0xffd9aefe, 0x0)
#7 39.86 	/usr/lib/go/src/cmd/link/internal/objfile/objfile.go:522 +0x3f8 fp=0x7e14e8 sp=0x7e1468 pc=0xffcbce90
#7 39.86 cmd/link/internal/objfile.(*objReader).readRef(0x7e167c)
#7 39.86 	/usr/lib/go/src/cmd/link/internal/objfile/objfile.go:384 +0x68 fp=0x7e1554 sp=0x7e14e8 pc=0xffcbbd9c
#7 39.86 cmd/link/internal/objfile.(*objReader).loadObjFile(0x7e167c)
#7 39.86 	/usr/lib/go/src/cmd/link/internal/objfile/objfile.go:110 +0x288 fp=0x7e1614 sp=0x7e1554 pc=0xffcb967c
#7 39.86 cmd/link/internal/objfile.Load(0xfffc7810, 0x46e120, 0x452368, 0x45c310, 0x2be63b, 0x0, 0x462480, 0x2b)
#7 39.86 	/usr/lib/go/src/cmd/link/internal/objfile/objfile.go:70 +0x144 fp=0x7e1708 sp=0x7e1614 pc=0xffcb9200
#7 39.86 cmd/link/internal/ld.ldobj(0x45e0a0, 0x452368, 0x45c310, 0x2be6da, 0x0, 0x462480, 0x2b, 0x7b408b, 0x23, 0x0)
#7 39.86 	/usr/lib/go/src/cmd/link/internal/ld/lib.go:1659 +0x994 fp=0x7e1800 sp=0x7e1708 pc=0xffd1c240
#7 39.86 cmd/link/internal/ld.loadobjfile(0x45e0a0, 0x45c310)
#7 39.86 	/usr/lib/go/src/cmd/link/internal/ld/lib.go:889 +0x3c8 fp=0x7e18d4 sp=0x7e1800 pc=0xffd15d4c
#7 39.86 cmd/link/internal/ld.(*Link).loadlib(0x45e0a0)
#7 39.86 	/usr/lib/go/src/cmd/link/internal/ld/lib.go:381 +0x178 fp=0x7e19c4 sp=0x7e18d4 pc=0xffd1249c
#7 39.86 cmd/link/internal/ld.Main(0xfffc7810, 0x4, 0x8, 0x1, 0xd, 0xe, 0xffd9ea48, 0x17, 0xffd9f303, 0x18, ...)
#7 39.86 	/usr/lib/go/src/cmd/link/internal/ld/main.go:207 +0xd3c fp=0x7e1a78 sp=0x7e19c4 pc=0xffd2d6cc
#7 39.86 main.main()
#7 39.86 	/usr/lib/go/src/cmd/link/main.go:65 +0x14c fp=0x7e1fc4 sp=0x7e1a78 pc=0xffd95594
#7 39.86 runtime.main()
#7 39.86 	/usr/lib/go/src/runtime/proc.go:200 +0x260 fp=0x7e1fe4 sp=0x7e1fc4 pc=0xffbc2e40
#7 39.86 runtime.goexit()
#7 39.86 	/usr/lib/go/src/runtime/asm_arm.s:868 +0x4 fp=0x7e1fe4 sp=0x7e1fe4 pc=0xffbefcc4
#7 39.86 
#7 39.86 goroutine 2 [force gc (idle)]:
#7 39.86 runtime.gopark(0xffe97c24, 0xfffdb148, 0x1410, 0x1)
#7 39.86 	/usr/lib/go/src/runtime/proc.go:301 +0x10c fp=0x426fd8 sp=0x426fc4 pc=0xffbc3350
#7 39.86 runtime.goparkunlock(...)
#7 39.86 	/usr/lib/go/src/runtime/proc.go:307
#7 39.86 runtime.forcegchelper()
#7 39.86 	/usr/lib/go/src/runtime/proc.go:250 +0xd0 fp=0x426fec sp=0x426fd8 pc=0xffbc31a0
#7 39.86 runtime.goexit()
#7 39.86 	/usr/lib/go/src/runtime/asm_arm.s:868 +0x4 fp=0x426fec sp=0x426fec pc=0xffbefcc4
#7 39.86 created by runtime.init.4
#7 39.86 	/usr/lib/go/src/runtime/proc.go:239 +0x28
#7 39.86 
#7 39.86 goroutine 3 [GC sweep wait]:
#7 39.86 runtime.gopark(0xffe97c24, 0xfffdb230, 0x140c, 0x1)
#7 39.86 	/usr/lib/go/src/runtime/proc.go:301 +0x10c fp=0x4277d0 sp=0x4277bc pc=0xffbc3350
#7 39.86 runtime.goparkunlock(...)
#7 39.86 	/usr/lib/go/src/runtime/proc.go:307
#7 39.86 runtime.bgsweep(0x444000)
#7 39.86 	/usr/lib/go/src/runtime/mgcsweep.go:70 +0xa0 fp=0x4277e4 sp=0x4277d0 pc=0xffbb4c54
#7 39.86 runtime.goexit()
#7 39.86 	/usr/lib/go/src/runtime/asm_arm.s:868 +0x4 fp=0x4277e4 sp=0x4277e4 pc=0xffbefcc4
#7 39.86 created by runtime.gcenable
#7 39.86 	/usr/lib/go/src/runtime/mgc.go:208 +0x48
#7 39.86 
#7 39.86 goroutine 17 [finalizer wait]:
#7 39.86 runtime.gopark(0xffe97c24, 0xfffed128, 0x140f, 0x1)
#7 39.86 	/usr/lib/go/src/runtime/proc.go:301 +0x10c fp=0x4227a0 sp=0x42278c pc=0xffbc3350
#7 39.86 runtime.goparkunlock(...)
#7 39.86 	/usr/lib/go/src/runtime/proc.go:307
#7 39.86 runtime.runfinq()
#7 39.86 	/usr/lib/go/src/runtime/mfinal.go:175 +0xbc fp=0x4227ec sp=0x4227a0 pc=0xffba904c
#7 39.86 runtime.goexit()
#7 39.86 	/usr/lib/go/src/runtime/asm_arm.s:868 +0x4 fp=0x4227ec sp=0x4227ec pc=0xffbefcc4
#7 39.86 created by runtime.createfing
#7 39.86 	/usr/lib/go/src/runtime/mfinal.go:156 +0x4c
#7 39.86 
#7 39.86 goroutine 18 [GC worker (idle)]:
#7 39.86 runtime.gopark(0xffe97b7c, 0x4180b8, 0x471417, 0x0)
#7 39.86 	/usr/lib/go/src/runtime/proc.go:301 +0x10c fp=0x426798 sp=0x426784 pc=0xffbc3350
#7 39.86 runtime.gcBgMarkWorker(0x41c000)
#7 39.86 	/usr/lib/go/src/runtime/mgc.go:1836 +0xf0 fp=0x4267e4 sp=0x426798 pc=0xffbae224
#7 39.86 runtime.goexit()
#7 39.86 	/usr/lib/go/src/runtime/asm_arm.s:868 +0x4 fp=0x4267e4 sp=0x4267e4 pc=0xffbefcc4
#7 39.86 created by runtime.gcBgMarkStartWorkers
#7 39.86 	/usr/lib/go/src/runtime/mgc.go:1784 +0x74
------
failed to solve: rpc error: code = Unknown desc = failed to solve with frontend dockerfile.v0: failed to build LLB: executor failed running [/bin/sh -c cd /src && ./build-hello.sh "$(cat VERSION)"]: buildkit-runc did not terminate sucessfully
@bcmills
Copy link
Contributor

bcmills commented Nov 5, 2019

Does this issue reproduce with the latest release? The go version you've posted is 1.12.12, but the latest release is 1.13.4.

See also #1508, #33746

@bcmills bcmills added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Nov 5, 2019
@gopherbot
Copy link

Timed out in state WaitingForInfo. Closing.

(I am just a bot, though. Please speak up if this is a mistake or you have the requested information.)

@golang golang locked and limited conversation to collaborators Dec 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

3 participants