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

cmd/go: get in docker buildx gets SIGSEGV error #40969

Closed
ahmetozer opened this issue Aug 21, 2020 · 1 comment
Closed

cmd/go: get in docker buildx gets SIGSEGV error #40969

ahmetozer opened this issue Aug 21, 2020 · 1 comment
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.

Comments

@ahmetozer
Copy link

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

$ go version
go version go1.15 linux/amd64

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

$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOENV="/root/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build091967167=/tmp/go-build -gno-record-gcc-switches"

$uname -a
Linux d5badc077a48-sv 4.14.188-mainline-rev1 #1 SMP Mon Jul 20 19:43:29 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

What did you do?

https://gitlab.com/ahmetozer/net-tools-service/-/jobs/697169653

What did you see instead?

 > [linux/arm/v7 stage-0 4/6] RUN go get -d -v ./...:
#25 2.766 fatal error: unexpected signal during runtime execution
#25 2.797 [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1c9f0]
#25 2.803
#25 2.803 runtime stack:
#25 2.806 runtime: unexpected return pc for runtime.notetsleep_internal called from 0xc2e88c
#25 2.818 stack: frame={sp:0xfffefd48, fp:0xfffefd68} stack=[0xff7f0da4,0xfffefde0)
#25 2.828 fffefcc8:  0000001f  0007159c <runtime.fatalthrow.func1+44>  0001c9f0 <runtime.notetsleep_internal+508>  00000000
#25 2.852 fffefcd8:  00000001  00547e17  00046324 <runtime.fatalthrow+68>  00852900
#25 2.885 fffefce8:  00046184 <runtime.throw+92>  fffefd18  008648e0  fffefd18
#25 2.898 fffefcf8:  00046184 <runtime.throw+92>  00852900  00046184 <runtime.throw+92>  fffefd08
#25 2.905 fffefd08:  00071570 <runtime.fatalthrow.func1+0>  00852900  00046184 <runtime.throw+92>  fffefd18
#25 2.918 fffefd18:  0005c5ec <runtime.sigpanic+920>  fffefd20  00071504 <runtime.throw.func1+0>  00550247
#25 2.928 fffefd28:  0000002a  0001c9f0 <runtime.notetsleep_internal+508>  00550247  0000002a
#25 2.937 fffefd38:  00000000  ffffff92  00852900  00042cf8 <runtime.futexsleep+220>
#25 2.946 fffefd48: <00c2e88c  00000000  00000001  00018601 <runtime.(*cpuProfile).addNonGo+253>
#25 2.957 fffefd58:  000543d4 <runtime.preemptall+96>  00c2e6c0  0004bd70 <runtime.forEachP+904>  00c22000
#25 2.962 fffefd68: >0004bd8c <runtime.forEachP+932>  00852a00  00000002  00000000
#25 2.965 fffefd78:  00c10008  0006fa64 <runtime.gcMarkDone.func1+64>  00852a94  000186a0 <runtime.(*cpuProfile).addExtra+88>
#25 2.979 fffefd88:  00000000  00000000  00000001  00000001
#25 2.981 fffefd98:  00000002  00000000  00c23500  00853108
#25 2.983 fffefda8:  00852900  00c10008  00c23500  00076648 <runtime.systemstack+132>
#25 2.988 fffefdb8:  0058370c  00000002  00000004  00c00b60
#25 2.991 fffefdc8:  0004b530 <runtime.mstart+0>  000764b8 <runtime.rt0_go+160>  000764b0 <runtime.rt0_go+152>  00000000
#25 2.998 fffefdd8:  ff7f0da4  00852900
#25 3.005 runtime.throw(0x550247, 0x2a)
#25 3.007       /usr/local/go/src/runtime/panic.go:1116 +0x5c
#25 3.011 runtime.sigpanic()
#25 3.011       /usr/local/go/src/runtime/signal_unix.go:704 +0x398
#25 3.013 runtime: unexpected return pc for runtime.notetsleep_internal called from 0xc2e88c
#25 3.014 stack: frame={sp:0xfffefd48, fp:0xfffefd68} stack=[0xff7f0da4,0xfffefde0)
#25 3.018 fffefcc8:  0000001f  0007159c <runtime.fatalthrow.func1+44>  0001c9f0 <runtime.notetsleep_internal+508>  00000000
#25 3.024 fffefcd8:  00000001  00547e17  00046324 <runtime.fatalthrow+68>  00852900
#25 3.028 fffefce8:  00046184 <runtime.throw+92>  fffefd18  008648e0  fffefd18
#25 3.036 fffefcf8:  00046184 <runtime.throw+92>  00852900  00046184 <runtime.throw+92>  fffefd08
#25 3.044 fffefd08:  00071570 <runtime.fatalthrow.func1+0>  00852900  00046184 <runtime.throw+92>  fffefd18
#25 3.057 fffefd18:  0005c5ec <runtime.sigpanic+920>  fffefd20  00071504 <runtime.throw.func1+0>  00550247
#25 3.062 fffefd28:  0000002a  0001c9f0 <runtime.notetsleep_internal+508>  00550247  0000002a
#25 3.068 fffefd38:  00000000  ffffff92  00852900  00042cf8 <runtime.futexsleep+220>
#25 3.081 fffefd48: <00c2e88c  00000000  00000001  00018601 <runtime.(*cpuProfile).addNonGo+253>
#25 3.086 fffefd58:  000543d4 <runtime.preemptall+96>  00c2e6c0  0004bd70 <runtime.forEachP+904>  00c22000
#25 3.093 fffefd68: >0004bd8c <runtime.forEachP+932>  00852a00  00000002  00000000
#25 3.108 fffefd78:  00c10008  0006fa64 <runtime.gcMarkDone.func1+64>  00852a94  000186a0 <runtime.(*cpuProfile).addExtra+88>
#25 3.123 fffefd88:  00000000  00000000  00000001  00000001
#25 3.128 fffefd98:  00000002  00000000  00c23500  00853108
#25 3.134 fffefda8:  00852900  00c10008  00c23500  00076648 <runtime.systemstack+132>
#25 3.142 fffefdb8:  0058370c  00000002  00000004  00c00b60
#25 3.148 fffefdc8:  0004b530 <runtime.mstart+0>  000764b8 <runtime.rt0_go+160>  000764b0 <runtime.rt0_go+152>  00000000
#25 3.159 fffefdd8:  ff7f0da4  00852900
#25 3.163 runtime.notetsleep_internal(0x852a00, 0x2, 0x0, 0xc10008)
#25 3.167       /usr/local/go/src/runtime/lock_futex.go:205 +0x1fc
#25 3.178
#25 3.182 goroutine 4 [GC worker (idle)]:
#25 3.188 runtime.systemstack_switch()
#25 3.189       /usr/local/go/src/runtime/asm_arm.s:294 +0x4 fp=0xc2bf6c sp=0xc2bf68 pc=0x765b8
#25 3.195 runtime.gcMarkDone()
#25 3.197       /usr/local/go/src/runtime/mgc.go:1467 +0xe4 fp=0xc2bf98 sp=0xc2bf6c pc=0x2c830
#25 3.202 runtime.gcBgMarkWorker(0xc23500)
#25 3.204       /usr/local/go/src/runtime/mgc.go:2018 +0x260 fp=0xc2bfe4 sp=0xc2bf98 pc=0x2dd9c
#25 3.211 runtime.goexit()
#25 3.212       /usr/local/go/src/runtime/asm_arm.s:857 +0x4 fp=0xc2bfe4 sp=0xc2bfe4 pc=0x783e4
#25 3.216 created by runtime.gcBgMarkStartWorkers
#25 3.217       /usr/local/go/src/runtime/mgc.go:1839 +0x68
#25 3.235
#25 3.235 goroutine 1 [running]:
#25 3.238       goroutine running on other thread; stack unavailable
#25 3.485 qemu: uncaught target signal 4 (Illegal instruction) - core dumped
#25 3.492 Illegal instruction
------
failed to solve: rpc error: code = Unknown desc = executor failed running [/bin/sh -c go get -d -v ./...]: buildkit-runc did not terminate successfully

I do not get a any error on amd64 on golang official container but when i try to build multi platform with docker buildx, go get command has a error on arm and arm64.
So i try golang:alpine it gets a same error, I change kernel version and get same result.

Currently to temporarily, I create a alpine container and install go and git with package manager (apk) and replace FROM golang with my container. Now it is work.

/ # go version
go version go1.13.14 linux/amd64

https://gitlab.com/ahmetozer/net-tools-service/-/jobs/698402255

@cagedmantis cagedmantis changed the title go get in docker buildx gets SIGSEGV error cmd/go: get in docker buildx gets SIGSEGV error Aug 25, 2020
@cagedmantis cagedmantis added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Aug 26, 2020
@cagedmantis
Copy link
Contributor

A better place to report this may be the docker buildx issue tracker. Since docker buildx is an experimental feature and it seems to be initiating the go get command, they may have a clear understanding of what is happening. Closing this issue. Please comment if you disagree or if I have misunderstood.

@golang golang locked and limited conversation to collaborators Aug 26, 2021
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