Closed
Description
What version of Go are you using (go version
)?
$ go version go version go1.18 linux/amd64
Does this issue reproduce with the latest release?
Yes, with a mor everbose output (see below)
What operating system and processor architecture are you using (go env
)?
go env
Output
$ go env GO111MODULE="" GOARCH="amd64" GOBIN="" GOCACHE="/home/behm015/.cache/go-build" GOENV="/home/behm015/.config/go/env" GOEXE="" GOEXPERIMENT="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOINSECURE="" GOMODCACHE="/home/behm015/go/pkg/mod" GONOPROXY="smgit.arvato-systems.de" GONOSUMDB="smgit.arvato-systems.de" GOOS="linux" GOPATH="/home/behm015/go" GOPRIVATE="smgit.arvato-systems.de" GOPROXY="https://proxy.golang.org,direct" GOROOT="/usr/local/go" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64" GOVCS="" GOVERSION="go1.18" GCCGO="gccgo" GOAMD64="v1" AR="ar" CC="gcc" CXX="g++" CGO_ENABLED="1" GOMOD="/home/behm015/Development/osfacts/go.mod" GOWORK="" 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-build4121020829=/tmp/go-build -gno-record-gcc-switches"
What did you do?
I compiled this project https://github.com/jxsl13/osfacts/tree/master/cmd on an Ubuntu 22.04 and moved the binary to a SLES 10 machine in order to run it.
Ubuntu (uname -a
) compilation environment
Linux devbox 5.4.0-136-generic #153-Ubuntu SMP Thu Nov 24 15:56:58 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
build command
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o osfacts ./cmd
SLES 10 (uname -a
) execution environment
Linux somehostname 2.6.16.60-0.132.1-smp #1 SMP Thu Mar 5 09:07:41 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
The library simply looks for files and looks into those files to check the contents.
./osfacts
What did you expect to see?
{
"family": "linux",
"arch": "amd64",
"distribution": "SLES",
"version": "10.4"
}
What did you see instead?
futexwakeup addr=0x5adee8 returned -38
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x1006 pc=0x42e2dd]
runtime stack:
runtime.throw({0x4f4575?, 0xa?})
/usr/local/go/src/runtime/panic.go:992 +0x71
runtime.sigpanic()
/usr/local/go/src/runtime/signal_unix.go:802 +0x3a9
runtime.futexwakeup(0x5adee8, 0x1e000?)
/usr/local/go/src/runtime/os_linux.go:90 +0x9d
runtime.notewakeup(0xc0ffffffff?)
/usr/local/go/src/runtime/lock_futex.go:144 +0x29
runtime.startlockedm(0xc0000021a0?)
/usr/local/go/src/runtime/proc.go:2450 +0x5e
runtime.schedule()
/usr/local/go/src/runtime/proc.go:3222 +0x73
runtime.park_m(0xc000002d00?)
/usr/local/go/src/runtime/proc.go:3336 +0x14d
runtime.mcall()
/usr/local/go/src/runtime/asm_amd64.s:425 +0x43
goroutine 1 [chan receive, locked to thread]:
runtime.gopark(0xc000060000?, 0xc00003e720?, 0x45?, 0xc6?, 0x0?)
/usr/local/go/src/runtime/proc.go:361 +0xd6
runtime.chanrecv(0xc00005c000, 0x0, 0x1)
/usr/local/go/src/runtime/chan.go:577 +0x56c
runtime.chanrecv1(0x0?, 0x2?)
/usr/local/go/src/runtime/chan.go:440 +0x18
runtime.gcenable()
/usr/local/go/src/runtime/mgc.go:180 +0xc5
runtime.main()
/usr/local/go/src/runtime/proc.go:209 +0x13d
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1571 +0x1
I recompiled the application with go 1.19 and tried again:
the new version seems to return a more verbose debug output.
What version of Go are you using (go version
)?
$ go version go version go1.19 linux/amd64
What operating system and processor architecture are you using (go env
)?
go env
Output
$ go env GO111MODULE="" GOARCH="amd64" GOBIN="" GOCACHE="/home/behm015/.cache/go-build" GOENV="/home/behm015/.config/go/env" GOEXE="" GOEXPERIMENT="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOINSECURE="" GOMODCACHE="/home/behm015/go/pkg/mod" GONOPROXY="smgit.arvato-systems.de" GONOSUMDB="smgit.arvato-systems.de" GOOS="linux" GOPATH="/home/behm015/go" GOPRIVATE="smgit.arvato-systems.de" GOPROXY="https://proxy.golang.org,direct" GOROOT="/home/behm015/sdk/go1.19" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/home/behm015/sdk/go1.19/pkg/tool/linux_amd64" GOVCS="" GOVERSION="go1.19" GCCGO="gccgo" GOAMD64="v1" AR="ar" CC="gcc" CXX="g++" CGO_ENABLED="1" GOMOD="/home/behm015/Development/osfacts/go.mod" GOWORK="" 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 -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build2341465830=/tmp/go-build -gno-record-gcc-switches"
What did you expect to see?
{
"family": "linux",
"arch": "amd64",
"distribution": "SLES",
"version": "10.4"
}
What did you see instead?
futexwakeup addr=0x5ba008 returned -38
futexwakeup addr=0xc000080148 returned -38
futexwakeup addr=0x5ba008 returned -38
futexwakeup addr=0x5e8498 returned -38
futexwakeup addr=0x5e8498 returned -38
futexwakeup addr=0x5e8498 returned -38
futexwakeup addr=0x5e8498 returned -38
futexwakeup addr=0x5e8498 returned -38
futexwakeup addr=0x5e8498 returned -38
futexwakeup addr=0x5e8498 returned -38
futexwakeup addr=0x5e8498 returned -38
futexwakeup addr=0x5e8498 returned -38
futexwakeup addr=0x5e8498 returned -38
futexwakeup addr=0x5e8498 returned -38
futexwakeup addr=0x5e8498 returned -38
futexwakeup addr=0x5e8498 returned -38
futexwakeup addr=0x5e8498 returned -38
futexwakeup addr=0x5e8498 returned -38
futexwakeup addr=0x5e8498 returned -38
futexwakeup addr=0x5e8498 returned -38
futexwakeup addr=0x5e8498 returned -38
futexwakeup addr=0x5e8498 returned -38
futexwakeup addr=0x5e8498 returned -38
futexwakeup addr=0x5e8498 returned -38
futexwakeup addr=0x5e8498 returned -38
futexwakeup addr=0x5e8498 returned -38
futexwakeup addr=0x5e8498 returned -38
futexwakeup addr=0x5e8498 returned -38
futexwakeup addr=0x5e8498 returned -38
futexwakeup addr=0x5e8498 returned -38
futexwakeup addr=0x5e8498 returned -38
futexwakeup addr=0x5e8498 returned -38
futexwakeup addr=0x5e8498 returned -38
futexwakeup addr=0x5e8498 returned -38
futexwakeup addr=0x5e8498 returned -38
futexwakeup addr=0x5e8498 returned -38
futexwakeup addr=0x5e8498 returned -38
futexwakeup addr=0x5e8498 returned -38
futexwakeup addr=0x5e8498 returned -38
futexwakeup addr=0x5e8498 returned -38
futexwakeup addr=0x5e8498 returned -38
futexwakeup addr=0x5e8498 returned -38
futexwakeup addr=0x5e8498 returned -38
futexwakeup addr=0x5e8498 returned -38
futexwakeup addr=0x5e8498 returned -38
futexwakeup addr=0x5e8498 returned -38
futexwakeup addr=0x5e8498 returned -38
futexwakeup addr=0x5e8498 returned -38
futexwakeup addr=0x5e8498 returned -38
futexwakeup addr=0x5e8498 returned -38
futexwakeup addr=0x5e8498 returned -38
futexwakeup addr=0x5e8498 returned -38
fatal: morestack on g0
SIGTRAP: trace trap
PC=0x45f8c2 m=2 sigcode=128
goroutine 0 [idle]:
runtime.abort()
/home/behm015/sdk/go1.19/src/runtime/asm_amd64.s:1059 +0x2 fp=0xc000054370 sp=0xc000054368 pc=0x45f8c2
runtime.morestack()
/home/behm015/sdk/go1.19/src/runtime/asm_amd64.s:538 +0x25 fp=0xc000054378 sp=0xc000054370 pc=0x45da45
goroutine 1 [running, locked to thread]:
goroutine running on other thread; stack unavailable
goroutine 2 [force gc (idle)]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
/home/behm015/sdk/go1.19/src/runtime/proc.go:363 +0xd6 fp=0xc000040fb0 sp=0xc000040f90 pc=0x4360d6
runtime.goparkunlock(...)
/home/behm015/sdk/go1.19/src/runtime/proc.go:369
runtime.forcegchelper()
/home/behm015/sdk/go1.19/src/runtime/proc.go:302 +0xad fp=0xc000040fe0 sp=0xc000040fb0 pc=0x435f6d
runtime.goexit()
/home/behm015/sdk/go1.19/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc000040fe8 sp=0xc000040fe0 pc=0x45fa41
created by runtime.init.6
/home/behm015/sdk/go1.19/src/runtime/proc.go:290 +0x25
goroutine 3 [GC sweep wait]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
/home/behm015/sdk/go1.19/src/runtime/proc.go:363 +0xd6 fp=0xc000041790 sp=0xc000041770 pc=0x4360d6
runtime.goparkunlock(...)
/home/behm015/sdk/go1.19/src/runtime/proc.go:369
runtime.bgsweep(0x0?)
/home/behm015/sdk/go1.19/src/runtime/mgcsweep.go:278 +0x8e fp=0xc0000417c8 sp=0xc000041790 pc=0x42320e
runtime.gcenable.func1()
/home/behm015/sdk/go1.19/src/runtime/mgc.go:178 +0x26 fp=0xc0000417e0 sp=0xc0000417c8 pc=0x4180c6
runtime.goexit()
/home/behm015/sdk/go1.19/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc0000417e8 sp=0xc0000417e0 pc=0x45fa41
created by runtime.gcenable
/home/behm015/sdk/go1.19/src/runtime/mgc.go:178 +0x6b
goroutine 4 [GC scavenge wait]:
runtime.gopark(0xc000060000?, 0x51aaa8?, 0x1?, 0x0?, 0x0?)
/home/behm015/sdk/go1.19/src/runtime/proc.go:363 +0xd6 fp=0xc000041f70 sp=0xc000041f50 pc=0x4360d6
runtime.goparkunlock(...)
/home/behm015/sdk/go1.19/src/runtime/proc.go:369
runtime.(*scavengerState).park(0x5b99e0)
/home/behm015/sdk/go1.19/src/runtime/mgcscavenge.go:389 +0x53 fp=0xc000041fa0 sp=0xc000041f70 pc=0x4212b3
runtime.bgscavenge(0x0?)
/home/behm015/sdk/go1.19/src/runtime/mgcscavenge.go:617 +0x45 fp=0xc000041fc8 sp=0xc000041fa0 pc=0x421885
runtime.gcenable.func2()
/home/behm015/sdk/go1.19/src/runtime/mgc.go:179 +0x26 fp=0xc000041fe0 sp=0xc000041fc8 pc=0x418066
runtime.goexit()
/home/behm015/sdk/go1.19/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc000041fe8 sp=0xc000041fe0 pc=0x45fa41
created by runtime.gcenable
/home/behm015/sdk/go1.19/src/runtime/mgc.go:179 +0xaa
goroutine 17 [runnable]:
runtime.runfinq()
/home/behm015/sdk/go1.19/src/runtime/mfinal.go:162 fp=0xc0000407e0 sp=0xc0000407d8 pc=0x4170c0
runtime.goexit()
/home/behm015/sdk/go1.19/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc0000407e8 sp=0xc0000407e0 pc=0x45fa41
created by runtime.createfing
/home/behm015/sdk/go1.19/src/runtime/mfinal.go:157 +0x45
rax 0x17
rbx 0x4f62dd
rcx 0x461275
rdx 0x17
rdi 0x2
rsi 0x4f62dd
rbp 0xc0000543a8
rsp 0xc000054368
r8 0x0
r9 0x0
r10 0x0
r11 0x246
r12 0x1c9
r13 0x0
r14 0xc0000069c0
r15 0x2b89a098611a
rip 0x45f8c2
rflags 0x202
cs 0x33
fs 0x0
gs 0x0